From 8ea8421be70d244ca5fd74af3b1498a1e72a71a5 Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Tue, 5 May 2020 18:28:51 -0700 Subject: [PATCH 001/125] add appservice-kube extension --- .github/CODEOWNERS | 2 + src/appservice-kube/HISTORY.rst | 8 + src/appservice-kube/README.rst | 5 + .../azext_appservice_kube/__init__.py | 37 + .../azext_appservice_kube/_client_factory.py | 56 + .../azext_appservice_kube/_completers.py | 53 + .../azext_appservice_kube/_constants.py | 65 + .../azext_appservice_kube/_help.py | 107 + .../azext_appservice_kube/_params.py | 178 + .../azext_appservice_kube/_utils.py | 81 + .../azext_appservice_kube/_validators.py | 122 + .../azext_appservice_kube/azext_metadata.json | 4 + .../azext_appservice_kube/commands.py | 79 + .../azext_appservice_kube/custom.py | 1340 + .../azext_appservice_kube/tests/__init__.py | 5 + .../tests/latest/__init__.py | 5 + .../latest/test_appservice_kube_scenario.py | 48 + .../vendored_sdks/__init__.py | 6 + .../vendored_sdks/azure_mgmt_web/__init__.py | 19 + .../azure_mgmt_web/_configuration.py | 49 + .../azure_mgmt_web/_operations_mixin.py | 653 + .../_web_site_management_client.py | 418 + .../vendored_sdks/azure_mgmt_web/models.py | 9 + .../azure_mgmt_web/v2015_04_01/__init__.py | 19 + .../v2015_04_01/_configuration.py | 49 + .../_web_site_management_client.py | 60 + .../v2015_04_01/models/__init__.py | 271 + .../v2015_04_01/models/_models.py | 3126 ++ .../v2015_04_01/models/_models_py3.py | 3126 ++ .../v2015_04_01/models/_paged_models.py | 92 + .../_web_site_management_client_enums.py | 182 + .../v2015_04_01/operations/__init__.py | 20 + ...domain_registration_provider_operations.py | 106 + .../operations/_domains_operations.py | 1104 + .../_top_level_domains_operations.py | 255 + .../azure_mgmt_web/v2015_04_01/version.py | 13 + .../azure_mgmt_web/v2015_08_01/__init__.py | 19 + .../v2015_08_01/_configuration.py | 49 + .../_web_site_management_client.py | 55 + .../v2015_08_01/models/__init__.py | 255 + .../v2015_08_01/models/_models.py | 3126 ++ .../v2015_08_01/models/_models_py3.py | 3126 ++ .../v2015_08_01/models/_paged_models.py | 53 + .../_web_site_management_client_enums.py | 180 + .../v2015_08_01/operations/__init__.py | 18 + ...p_service_certificate_orders_operations.py | 1439 + ...ficate_registration_provider_operations.py | 106 + .../azure_mgmt_web/v2015_08_01/version.py | 13 + .../azure_mgmt_web/v2016_03_01/__init__.py | 19 + .../v2016_03_01/_configuration.py | 49 + .../_web_site_management_client.py | 81 + .../v2016_03_01/models/__init__.py | 469 + .../v2016_03_01/models/_models.py | 5418 ++++ .../v2016_03_01/models/_models_py3.py | 5418 ++++ .../v2016_03_01/models/_paged_models.py | 209 + .../_web_site_management_client_enums.py | 287 + .../v2016_03_01/operations/__init__.py | 30 + .../operations/_billing_meters_operations.py | 112 + .../operations/_certificates_operations.py | 444 + .../_deleted_web_apps_operations.py | 108 + .../operations/_diagnostics_operations.py | 1758 + .../operations/_provider_operations.py | 246 + .../operations/_recommendations_operations.py | 644 + .../_resource_health_metadata_operations.py | 465 + .../_web_site_management_client_operations.py | 989 + .../azure_mgmt_web/v2016_03_01/version.py | 13 + .../azure_mgmt_web/v2016_08_01/__init__.py | 19 + .../v2016_08_01/_configuration.py | 49 + .../_web_site_management_client.py | 50 + .../v2016_08_01/models/__init__.py | 477 + .../v2016_08_01/models/_models.py | 6213 ++++ .../v2016_08_01/models/_models_py3.py | 6213 ++++ .../v2016_08_01/models/_paged_models.py | 326 + .../_web_site_management_client_enums.py | 292 + .../v2016_08_01/operations/__init__.py | 16 + .../operations/_web_apps_operations.py | 23095 +++++++++++++ .../azure_mgmt_web/v2016_08_01/version.py | 13 + .../azure_mgmt_web/v2016_09_01/__init__.py | 19 + .../v2016_09_01/_configuration.py | 49 + .../_web_site_management_client.py | 55 + .../v2016_09_01/models/__init__.py | 289 + .../v2016_09_01/models/_models.py | 3614 +++ .../v2016_09_01/models/_models_py3.py | 3614 +++ .../v2016_09_01/models/_paged_models.py | 170 + .../_web_site_management_client_enums.py | 175 + .../v2016_09_01/operations/__init__.py | 18 + .../_app_service_environments_operations.py | 3146 ++ .../_app_service_plans_operations.py | 2133 ++ .../azure_mgmt_web/v2016_09_01/version.py | 13 + .../azure_mgmt_web/v2018_02_01/__init__.py | 19 + .../v2018_02_01/_configuration.py | 49 + .../_web_site_management_client.py | 116 + .../v2018_02_01/models/__init__.py | 946 + .../v2018_02_01/models/_models.py | 12295 +++++++ .../v2018_02_01/models/_models_py3.py | 12295 +++++++ .../v2018_02_01/models/_paged_models.py | 729 + .../_web_site_management_client_enums.py | 559 + .../v2018_02_01/operations/__init__.py | 44 + ...p_service_certificate_orders_operations.py | 1427 + .../_app_service_environments_operations.py | 3376 ++ .../_app_service_plans_operations.py | 2114 ++ ...ficate_registration_provider_operations.py | 104 + .../operations/_certificates_operations.py | 439 + .../_deleted_web_apps_operations.py | 238 + .../operations/_diagnostics_operations.py | 1735 + ...domain_registration_provider_operations.py | 104 + .../operations/_domains_operations.py | 1093 + .../operations/_provider_operations.py | 244 + .../operations/_recommendations_operations.py | 1078 + .../_resource_health_metadata_operations.py | 465 + .../_top_level_domains_operations.py | 251 + .../operations/_web_apps_operations.py | 26850 +++++++++++++++ .../_web_site_management_client_operations.py | 1129 + .../azure_mgmt_web/v2018_02_01/version.py | 13 + .../azure_mgmt_web/v2018_11_01/__init__.py | 19 + .../v2018_11_01/_configuration.py | 49 + .../_web_site_management_client.py | 50 + .../v2018_11_01/models/__init__.py | 216 + .../v2018_11_01/models/_models.py | 2750 ++ .../v2018_11_01/models/_models_py3.py | 2750 ++ .../v2018_11_01/models/_paged_models.py | 27 + .../_web_site_management_client_enums.py | 180 + .../v2018_11_01/operations/__init__.py | 16 + .../operations/_certificates_operations.py | 439 + .../azure_mgmt_web/v2018_11_01/version.py | 13 + .../azure_mgmt_web/v2019_08_01/__init__.py | 19 + .../v2019_08_01/_configuration.py | 49 + .../_web_site_management_client.py | 126 + .../v2019_08_01/models/__init__.py | 1049 + .../v2019_08_01/models/_models.py | 13656 ++++++++ .../v2019_08_01/models/_models_py3.py | 13656 ++++++++ .../v2019_08_01/models/_paged_models.py | 794 + .../_web_site_management_client_enums.py | 637 + .../v2019_08_01/operations/__init__.py | 48 + ...p_service_certificate_orders_operations.py | 1423 + .../_app_service_environments_operations.py | 2858 ++ .../_app_service_plans_operations.py | 1946 ++ ...ficate_registration_provider_operations.py | 104 + .../operations/_certificates_operations.py | 437 + .../_deleted_web_apps_operations.py | 238 + .../operations/_diagnostics_operations.py | 1713 + ...domain_registration_provider_operations.py | 104 + .../operations/_domains_operations.py | 1090 + .../_kube_environments_operations.py | 508 + .../operations/_provider_operations.py | 246 + .../operations/_recommendations_operations.py | 1070 + .../_resource_health_metadata_operations.py | 468 + .../operations/_static_sites_operations.py | 1820 ++ .../_top_level_domains_operations.py | 251 + .../operations/_web_apps_operations.py | 26990 ++++++++++++++++ .../_web_site_management_client_operations.py | 1061 + .../azure_mgmt_web/v2019_08_01/version.py | 13 + .../vendored_sdks/azure_mgmt_web/version.py | 13 + .../azext_appservice_kube/vsts_cd_provider.py | 60 + src/appservice-kube/setup.cfg | 2 + src/appservice-kube/setup.py | 62 + src/index.json | 458 + 157 files changed, 234218 insertions(+) create mode 100644 src/appservice-kube/HISTORY.rst create mode 100644 src/appservice-kube/README.rst create mode 100644 src/appservice-kube/azext_appservice_kube/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/_client_factory.py create mode 100644 src/appservice-kube/azext_appservice_kube/_completers.py create mode 100644 src/appservice-kube/azext_appservice_kube/_constants.py create mode 100644 src/appservice-kube/azext_appservice_kube/_help.py create mode 100644 src/appservice-kube/azext_appservice_kube/_params.py create mode 100644 src/appservice-kube/azext_appservice_kube/_utils.py create mode 100644 src/appservice-kube/azext_appservice_kube/_validators.py create mode 100644 src/appservice-kube/azext_appservice_kube/azext_metadata.json create mode 100644 src/appservice-kube/azext_appservice_kube/commands.py create mode 100644 src/appservice-kube/azext_appservice_kube/custom.py create mode 100644 src/appservice-kube/azext_appservice_kube/tests/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/tests/latest/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domain_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_top_level_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_app_service_certificate_orders_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_certificate_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_billing_meters_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_certificates_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_deleted_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_diagnostics_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_recommendations_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_resource_health_metadata_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_web_site_management_client_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_environments_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_plans_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_certificate_orders_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_environments_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_plans_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificate_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificates_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_deleted_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_diagnostics_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domain_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_recommendations_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_resource_health_metadata_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_top_level_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_site_management_client_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/_certificates_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_certificate_orders_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_environments_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_plans_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificate_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificates_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_deleted_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_diagnostics_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domain_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_recommendations_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_resource_health_metadata_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_static_sites_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_top_level_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_site_management_client_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vsts_cd_provider.py create mode 100644 src/appservice-kube/setup.cfg create mode 100644 src/appservice-kube/setup.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 66f026834e8..e8fb3cba540 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -132,6 +132,8 @@ /src/kusto/ @ilayr @orhasban @astauben +/src/appservice-kube/ @ebencarek @calcha + /src/custom-providers/ @jsntcy /src/costmanagement/ @haroldrandom diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst new file mode 100644 index 00000000000..8c34bccfff8 --- /dev/null +++ b/src/appservice-kube/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/appservice-kube/README.rst b/src/appservice-kube/README.rst new file mode 100644 index 00000000000..686f74888f6 --- /dev/null +++ b/src/appservice-kube/README.rst @@ -0,0 +1,5 @@ +Microsoft Azure CLI 'appservice-kube' Extension +========================================== + +This package is for the 'appservice-kube' extension. +i.e. 'az appservice-kube' \ No newline at end of file diff --git a/src/appservice-kube/azext_appservice_kube/__init__.py b/src/appservice-kube/azext_appservice_kube/__init__.py new file mode 100644 index 00000000000..3e25dbacf42 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/__init__.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azure.cli.core.profiles import register_resource_type + +from azext_appservice_kube._help import helps # pylint: disable=unused-import +from azext_appservice_kube._client_factory import CUSTOM_MGMT_APPSERVICE + + +class AppserviceCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + register_resource_type('latest', CUSTOM_MGMT_APPSERVICE, '2019-08-01') + + appservice_kube_custom = CliCommandType( + operations_tmpl='azext_appservice_kube.custom#{}') + super(AppserviceCommandsLoader, self).__init__(cli_ctx=cli_ctx, + custom_command_type=appservice_kube_custom, + resource_type=CUSTOM_MGMT_APPSERVICE) + + def load_command_table(self, args): + super(AppserviceCommandsLoader, self).load_command_table(args) + from azext_appservice_kube.commands import load_command_table + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + super(AppserviceCommandsLoader, self).load_arguments(command) + from azext_appservice_kube._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = AppserviceCommandsLoader diff --git a/src/appservice-kube/azext_appservice_kube/_client_factory.py b/src/appservice-kube/azext_appservice_kube/_client_factory.py new file mode 100644 index 00000000000..c6ebf729914 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_client_factory.py @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core.profiles import ResourceType, CustomResourceType + +CUSTOM_MGMT_APPSERVICE = CustomResourceType('azext_appservice_kube.vendored_sdks.azure_mgmt_web', + 'WebSiteManagementClient') + + +# pylint: disable=inconsistent-return-statements +def ex_handler_factory(creating_plan=False, no_throw=False): + def _polish_bad_errors(ex): + import json + from knack.util import CLIError + try: + detail = json.loads(ex.response.text)['Message'] + if creating_plan: + if 'Requested features are not supported in region' in detail: + detail = ("Plan with linux worker is not supported in current region. For " + + "supported regions, please refer to https://docs.microsoft.com/" + "azure/app-service-web/app-service-linux-intro") + elif 'Not enough available reserved instance servers to satisfy' in detail: + detail = ("Plan with Linux worker can only be created in a group " + + "which has never contained a Windows worker, and vice versa. " + + "Please use a new resource group. Original error:" + detail) + ex = CLIError(detail) + except Exception: # pylint: disable=broad-except + pass + if no_throw: + return ex + raise ex + return _polish_bad_errors + + +def web_client_factory(cli_ctx, **_): + return get_mgmt_service_client(cli_ctx, CUSTOM_MGMT_APPSERVICE) + + +def cf_kube_environments(cli_ctx, *_): + return web_client_factory(cli_ctx).kube_environments + + +def cf_plans(cli_ctx, *_): + return web_client_factory(cli_ctx).app_service_plans + + +def cf_compute_service(cli_ctx, *_): + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_COMPUTE) + + +def cf_resource_groups(cli_ctx, subscription_id=None): + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, + subscription_id=subscription_id).resource_groups diff --git a/src/appservice-kube/azext_appservice_kube/_completers.py b/src/appservice-kube/azext_appservice_kube/_completers.py new file mode 100644 index 00000000000..5f34510b1bb --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_completers.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.decorators import Completer +from ._utils import _get_location_from_resource_group +from ._constants import KUBE_DEFAULT_SKU + + +@Completer +def get_vm_size_completion_list(cmd, prefix, namespace): # pylint: disable=unused-argument + """Return the intersection of the VM sizes allowed by the ACS SDK with those returned by the Compute Service.""" + from azure.mgmt.containerservice.models import ContainerServiceVMSizeTypes + + location = _get_location(cmd.cli_ctx, namespace) + result = get_vm_sizes(cmd.cli_ctx, location) + return set(r.name for r in result) & set(c.value for c in ContainerServiceVMSizeTypes) + + +@Completer +def get_kube_sku_completion_list(cmd, prefix, namespace): # pylint: disable=unused-argument + """ + Return the VM sizes allowed by AKS, or 'ANY' + """ + return get_vm_size_completion_list(cmd, prefix, namespace) & set(KUBE_DEFAULT_SKU) + + +def get_vm_sizes(cli_ctx, location): + from ._client_factory import cf_compute_service + return cf_compute_service(cli_ctx).virtual_machine_sizes.list(location) + + +def _get_location(cli_ctx, namespace): + """ + Return an Azure location by using an explicit `--location` argument, then by `--resource-group`, and + finally by the subscription if neither argument was provided. + """ + from msrestazure.azure_exceptions import CloudError + from azure.cli.core.commands.parameters import get_one_of_subscription_locations + + location = None + if getattr(namespace, 'location', None): + location = namespace.location + elif getattr(namespace, 'resource_group_name', None): + try: + location = _get_location_from_resource_group(cli_ctx, namespace.resource_group_name) + except CloudError as err: + from argcomplete import warn + warn('Warning: {}'.format(err.message)) + if not location: + location = get_one_of_subscription_locations(cli_ctx) + return location diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py new file mode 100644 index 00000000000..1077b0aed4b --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +KUBE_DEFAULT_SKU = "ANY" +KUBE_ASP_KIND = "K8SE" +KUBE_APP_KIND = "kubeapp" + +LINUX_RUNTIMES = ['dotnet', 'node', 'python', 'java'] +WINDOWS_RUNTIMES = ['dotnet', 'node', 'java', 'powershell'] + +NODE_VERSION_DEFAULT = "10.14" + +FUNCTIONS_VERSIONS = ['2', '3'] + +# functions version : default node version +FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION = { + '2': '~10', + '3': '~12' +} +# functions version -> runtime : default runtime version +FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION = { + '2': { + 'node': '8', + 'dotnet': '2', + 'python': '3.7', + 'java': '8' + }, + '3': { + 'node': '12', + 'dotnet': '3', + 'python': '3.7', + 'java': '8' + } +} +# functions version -> runtime : runtime versions +FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS = { + '2': { + 'node': ['8', '10'], + 'python': ['3.6', '3.7'], + 'dotnet': ['2'], + 'java': ['8'] + }, + '3': { + 'node': ['10', '12'], + 'python': ['3.6', '3.7', '3.8'], + 'dotnet': ['3'], + 'java': ['8'] + } +} +# dotnet runtime version : dotnet linuxFxVersion +DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION = { + '2': '2.2', + '3': '3.1' +} + +MULTI_CONTAINER_TYPES = ['COMPOSE', 'KUBE'] + +OS_TYPES = ['Windows', 'Linux'] + +CONTAINER_APPSETTING_NAMES = ['DOCKER_REGISTRY_SERVER_URL', 'DOCKER_REGISTRY_SERVER_USERNAME', + 'DOCKER_REGISTRY_SERVER_PASSWORD', "WEBSITES_ENABLE_APP_SERVICE_STORAGE"] +APPSETTINGS_TO_MASK = ['DOCKER_REGISTRY_SERVER_PASSWORD'] diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py new file mode 100644 index 00000000000..5ecca9f6d64 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -0,0 +1,107 @@ +# 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. +# -------------------------------------------------------------------------------------------- + +from knack.help_files import helps +# pylint: disable=line-too-long, too-many-lines + +helps['appservice plan create'] = """ +type: command +short-summary: Create an app service plan. +examples: + - name: Create a basic app service plan. + text: > + az appservice plan create -g MyResourceGroup -n MyPlan + - name: Create a standard app service plan with with four Linux workers. + text: > + az appservice plan create -g MyResourceGroup -n MyPlan \\ + --is-linux --number-of-workers 4 --sku S1 + - name: Create an app service plan for app service environment. + text: > + az appservice plan create -g MyResourceGroup -n MyPlan \\ + --app-service-environment MyAppServiceEnvironment --sku I1 + - name: Create an app service plan for a kubernetes environment. + text: > + az appservice plan create -g MyResourceGroup -n MyPlan \\ + --kube-environment MyKubeEnvironment --kube-sku ANY +""" + +helps['appservice plan update'] = """ +type: command +short-summary: Update an app service plan. See https://docs.microsoft.com/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan to learn more +examples: + - name: Update an app service plan. (autogenerated) + text: az appservice plan update --name MyAppServicePlan --resource-group MyResourceGroup --sku F1 + crafted: true + - name: Update a kubernetes app service plan. + text: > + az appservice plan update --name MyAppServicePlan --resource-group MyResourceGroup \\ + --kube-sku Standard_DS2_v2 --number-of-workers 3 +""" + +helps['appservice kube'] = """ + type: group + short-summary: Manage Kubernetes Environments +""" + +helps['appservice kube create'] = """ + type: command + short-summary: Create a Kubernetes Environment. + examples: + - name: Create Kubernetes Environment with default values. + text: | + az appservice kube create -n MyKubeEnvironment -g MyResourceGroup \\ + --client-id MyServicePrincipalClientId \\ + --client-secret MyServicePrincipalClientSecret +""" + +helps['appservice kube update'] = """ + type: command + short-summary: Update a Kubernetes Environment. + examples: + - name: Update the Kubernetes Environment's Log Analytics workspace ID. + text: | + az appservice kube update -n MyKubeEnvironment -g MyResourceGroup \\ + --workspace-id MyLogAnalyticsWorkspaceResourceId +""" + +helps['appservice kube show'] = """ + type: command + short-summary: Show the details of a kubernetes environment. + examples: + - name: Show the details of a Kubernetes Environment. + text: | + az appservice kube show -n MyKubeEnvironment -g MyResourceGroup +""" + +helps['appservice kube list'] = """ + type: command + short-summary: List kubernetes environments by subscription or resource group. + examples: + - name: List Kubernetes Environments by subscription. + text: | + az appservice kube list + - name: List Kubernetes Environments by resource group. + text: | + az appservice kube list -g MyResourceGroup +""" + +helps['appservice kube delete'] = """ + type: command + short-summary: Delete kubernetes environment. + examples: + - name: Delete Kubernetes Environment. + text: az appservice kube delete -g MyResourceGroup -n MyKubeEnvironment +""" + +helps['appservice kube wait'] = """ + type: command + short-summary: Wait for a Kubernetes Environment to reach a desired state. + examples: + - name: Wait for a Kubernetes Environment to be provisioned, polling every 60 seconds. + text: | + az appservice kube wait -g MyResourceGroup -n MyKubeEnvironment \\ + --created --interval 60 +""" diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py new file mode 100644 index 00000000000..03967dd1854 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -0,0 +1,178 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + +from knack.arguments import CLIArgumentType + +from azure.cli.core.commands.parameters import (resource_group_name_type, get_location_type, + get_resource_name_completion_list, + get_three_state_flag, get_enum_type, tags_type) + +from ._completers import get_kube_sku_completion_list, get_vm_size_completion_list +from ._constants import (FUNCTIONS_VERSIONS, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, KUBE_DEFAULT_SKU, + LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES, OS_TYPES) +from ._validators import validate_site_create, validate_asp_create, validate_nodes_count, validate_nodepool_name + + +def load_arguments(self, _): + # pylint: disable=too-many-statements + # pylint: disable=line-too-long + name_arg_type = CLIArgumentType(options_list=['--name', '-n'], metavar='NAME') + sku_arg_type = CLIArgumentType(help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large)', + arg_type=get_enum_type(['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3'])) + webapp_name_arg_type = CLIArgumentType(configured_default='web', options_list=['--name', '-n'], metavar='NAME', + completer=get_resource_name_completion_list('Microsoft.Web/sites'), id_part='name', + help="name of the web app. You can configure the default using `az configure --defaults web=`") + + K8SENetworkPlugin = self.get_models('K8SENetworkPlugin') + + # combine all runtime versions for all functions versions + functionapp_runtime_to_version = {} + for functions_version in FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS.values(): + for runtime, val in functions_version.items(): + # dotnet version is not configurable, so leave out of help menu + if runtime != 'dotnet': + functionapp_runtime_to_version[runtime] = functionapp_runtime_to_version.get(runtime, set()).union(val) + + functionapp_runtime_to_version_texts = [] + for runtime, runtime_versions in functionapp_runtime_to_version.items(): + runtime_versions_list = list(runtime_versions) + runtime_versions_list.sort(key=float) + functionapp_runtime_to_version_texts.append(runtime + ' -> [' + ', '.join(runtime_versions_list) + ']') + + with self.argument_context('webapp') as c: + c.ignore('app_instance') + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('location', arg_type=get_location_type(self.cli_ctx)) + c.argument('slot', options_list=['--slot', '-s'], help="the name of the slot. Default to the productions slot if not specified") + c.argument('name', configured_default='web', arg_type=name_arg_type, + completer=get_resource_name_completion_list('Microsoft.Web/sites'), id_part='name', + help="name of the web app. You can configure the default using `az configure --defaults web=`") + + with self.argument_context('webapp create') as c: + c.argument('name', options_list=['--name', '-n'], help='name of the new web app', validator=validate_site_create) + c.argument('startup_file', help="Linux only. The web's startup file") + c.argument('docker_registry_server_user', options_list=['--docker-registry-server-user', '-s'], help='the container registry server username') + c.argument('docker_registry_server_password', options_list=['--docker-registry-server-password', '-w'], help='The container registry server password. Required for private registries.') + c.argument('multicontainer_config_type', options_list=['--multicontainer-config-type'], help="Linux only.", arg_type=get_enum_type(MULTI_CONTAINER_TYPES)) + c.argument('multicontainer_config_file', options_list=['--multicontainer-config-file'], help="Linux only. Config file for multicontainer apps. (local or remote)") + c.argument('runtime', options_list=['--runtime', '-r'], help="canonicalized web runtime in the format of Framework|Version, e.g. \"PHP|5.6\". Use `az webapp list-runtimes` for available list") # TODO ADD completer + c.argument('plan', options_list=['--plan', '-p'], configured_default='appserviceplan', + completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), + help="name or resource id of the app service plan. Use 'appservice plan create' to get one") + c.ignore('language') + c.ignore('using_webapp_up') + + with self.argument_context('webapp show') as c: + c.argument('name', arg_type=webapp_name_arg_type) + + with self.argument_context('functionapp') as c: + c.ignore('app_instance') + c.argument('name', arg_type=name_arg_type, id_part='name', help='name of the function app') + c.argument('slot', options_list=['--slot', '-s'], + help="the name of the slot. Default to the productions slot if not specified") + + with self.argument_context('functionapp create') as c: + c.argument('plan', options_list=['--plan', '-p'], configured_default='appserviceplan', + completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), + help="name or resource id of the function app service plan. Use 'appservice plan create' to get one") + c.argument('new_app_name', options_list=['--name', '-n'], help='name of the new function app') + c.argument('storage_account', options_list=['--storage-account', '-s'], + help='Provide a string value of a Storage Account in the provided Resource Group. Or Resource ID of a Storage Account in a different Resource Group') + c.argument('consumption_plan_location', options_list=['--consumption-plan-location', '-c'], + help="Geographic location where Function App will be hosted. Use `az functionapp list-consumption-locations` to view available locations.") + c.argument('functions_version', help='The functions app version.', arg_type=get_enum_type(FUNCTIONS_VERSIONS)) + c.argument('runtime', help='The functions runtime stack.', arg_type=get_enum_type(set(LINUX_RUNTIMES).union(set(WINDOWS_RUNTIMES)))) + c.argument('runtime_version', help='The version of the functions runtime stack. ' + 'Allowed values for each --runtime are: ' + ', '.join(functionapp_runtime_to_version_texts)) + c.argument('os_type', arg_type=get_enum_type(OS_TYPES), help="Set the OS type for the app to be created.") + c.argument('app_insights_key', help="Instrumentation key of App Insights to be added.") + c.argument('app_insights', help="Name of the existing App Insights project to be added to the Function app. Must be in the same resource group.") + c.argument('disable_app_insights', arg_type=get_three_state_flag(return_label=True), help="Disable creating application insights resource during functionapp create. No logs will be available.") + c.argument('docker_registry_server_user', help='The container registry server username.') + c.argument('docker_registry_server_password', help='The container registry server password. Required for private registries.') + + for scope in ['webapp', 'functionapp']: + with self.argument_context(scope + ' create') as c: + c.argument('deployment_container_image_name', options_list=['--deployment-container-image-name', '-i'], help='Linux only. Container image name from Docker Hub, e.g. publisher/image-name:tag') + c.argument('deployment_local_git', action='store_true', options_list=['--deployment-local-git', '-l'], help='enable local git') + c.argument('deployment_zip', options_list=['--deployment-zip', '-z'], help='perform deployment using zip file') + c.argument('deployment_source_url', options_list=['--deployment-source-url', '-u'], help='Git repository URL to link with manual integration') + c.argument('deployment_source_branch', options_list=['--deployment-source-branch', '-b'], help='the branch to deploy') + c.argument('min_worker_count', help='Minimum number of workers to be allocated.', type=int, default=None, is_preview=True) + c.argument('max_worker_count', help='Maximum number of workers to be allocated.', type=int, default=None, is_preview=True) + c.argument('tags', arg_type=tags_type) + + with self.argument_context('appservice') as c: + c.argument('resource_group_name', arg_type=resource_group_name_type) + c.argument('location', arg_type=get_location_type(self.cli_ctx)) + + with self.argument_context('appservice plan') as c: + c.argument('name', arg_type=name_arg_type, help='The name of the app service plan', + completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), + configured_default='appserviceplan', id_part='name') + c.argument('number_of_workers', help='Number of workers to be allocated.', type=int, default=1) + c.argument('admin_site_name', help='The name of the admin web app.', deprecate_info=c.deprecate(expiration='0.2.17')) + c.ignore('max_burst') + + with self.argument_context('appservice plan create') as c: + c.argument('name', arg_type=name_arg_type, help="Name of the new app service plan", completer=None, + validator=validate_asp_create) + c.argument('app_service_environment', options_list=['--app-service-environment', '-e'], + help="Name or ID of the app service environment") + c.argument('kube_environment', options_list=['--kube-environment', '-k'], help='Name or ID of the kubernetes environment', is_preview=True) + c.argument('sku', arg_type=sku_arg_type) + c.argument('kube_sku', required=False, help='VM size or ANY', default=KUBE_DEFAULT_SKU, completer=get_kube_sku_completion_list, is_preview=True) + c.argument('is_linux', action='store_true', required=False, help='host web app on Linux worker') + c.argument('hyper_v', action='store_true', required=False, help='Host web app on Windows container', is_preview=True) + c.argument('per_site_scaling', action='store_true', required=False, help='Enable per-app scaling at the ' + 'App Service plan level to allow for ' + 'scaling an app independently from ' + 'the App Service plan that hosts it.') + c.argument('tags', arg_type=tags_type) + + with self.argument_context('appservice plan update') as c: + c.argument('sku', arg_type=sku_arg_type) + c.argument('kube_sku', required=False, help='VM size or ANY', completer=get_kube_sku_completion_list, is_preview=True) + c.ignore('allow_pending_state') + + # App Service on Kubernetes Commands + with self.argument_context('appservice kube create') as c: + c.argument('kube_name', arg_type=name_arg_type, help='Name of the kubernetes environment.') + c.argument('node_count', type=int, help='Number of nodes in the default node pool.', validator=validate_nodes_count) + c.argument('max_count', type=int, help='Maximum number of nodes for autoscaling.', validator=validate_nodes_count) + c.argument('nodepool_name', help='Name of the cluster\'s default node pool.', validator=validate_nodepool_name) + c.argument('node_vm_size', help='Size of the default node pool\'s VMs.', + completer=get_vm_size_completion_list) + c.argument('client_id', help='Service principal client id.') + c.argument('client_secret', help='Service principal client secret.') + c.argument('internal_load_balancing', arg_type=get_three_state_flag(), help='Whether the Kube Environment is only visible within Vnet/Subnet.') + c.argument('network_plugin', default='kubenet', arg_type=get_enum_type(K8SENetworkPlugin), help='If vnet subnet is not specified, only kubenet is supported') + c.argument('subnet', help='Name or ID of existing subnet. To create vnet and/or subnet \ + use `az network vnet [subnet] create`') + c.argument('vnet_name', help='Name of the vnet. Mandatory if only subnet name is specified.') + c.argument('dns_service_ip', help='Kubernetes Dns Service IP within service_cidr (commonly, .10 address). This is required if a vnet subnet is specified.') + c.argument('service_cidr', help='Address space to be used by services (nodeport/clusterip/loadbalancer). It must be within the vnet but not used by subnet. This is required if a vnet subnet is specified') + c.argument('docker_bridge_cidr', help='This lets the cluster nodes communicate with the underlying management platform. This IP address must NOT be within the virtual network IP address range of your cluster, and shouldn\'t overlap with other address ranges in use on your network. Default (by AKS) is 172.17.0.1/16. If your VNET overlapped with this, you must specify others.') + c.argument('workspace_id', help='Log analytics workspace ID') + c.argument('tags', arg_type=tags_type) + + with self.argument_context('appservice kube update') as c: + c.argument('kube_name', arg_type=name_arg_type, help='Name of the kubernetes environment.') + c.argument('client_id', help='Service principal client id.') + c.argument('client_secret', help='Service principal client secret.') + c.argument('workspace_id', help='Log analytics workspace ID') + c.argument('tags', arg_type=tags_type) + + with self.argument_context('appservice kube delete') as c: + c.argument('name', arg_type=name_arg_type, help='Name of the Kubernetes Environment.') + c.argument('force_delete', options_list=['--force', '-f'], arg_type=get_three_state_flag(), help='Force deletion even if the Kubernetes ' + 'Environment contains resources.') + + with self.argument_context('appservice kube show') as c: + c.argument('name', arg_type=name_arg_type, help='Name of the Kubernetes Environment.') + + with self.argument_context('appservice kube wait') as c: + c.argument('name', arg_type=name_arg_type, help='Name of the Kubernetes Environment.') diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py new file mode 100644 index 00000000000..7c5967eacf8 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -0,0 +1,81 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.util import CLIError + +from ._client_factory import web_client_factory, cf_resource_groups + + +def _normalize_sku(sku): + sku = sku.upper() + if sku == 'FREE': + return 'F1' + if sku == 'SHARED': + return 'D1' + return sku + + +def get_sku_name(tier): # pylint: disable=too-many-return-statements + tier = tier.upper() + if tier in ['F1', 'FREE']: + return 'FREE' + if tier in ['D1', "SHARED"]: + return 'SHARED' + if tier in ['B1', 'B2', 'B3', 'BASIC']: + return 'BASIC' + if tier in ['S1', 'S2', 'S3']: + return 'STANDARD' + if tier in ['P1', 'P2', 'P3']: + return 'PREMIUM' + if tier in ['P1V2', 'P2V2', 'P3V2']: + return 'PREMIUMV2' + if tier in ['PC2', 'PC3', 'PC4']: + return 'PremiumContainer' + if tier in ['EP1', 'EP2', 'EP3']: + return 'ElasticPremium' + if tier in ['I1', 'I2', 'I3']: + return 'Isolated' + raise CLIError("Invalid sku(pricing tier), please refer to command help for valid values") + + +def validate_subnet_id(cli_ctx, subnet, vnet_name, resource_group_name): + from msrestazure.tools import is_valid_resource_id + subnet_is_id = is_valid_resource_id(subnet) + + if subnet_is_id and not vnet_name: + return subnet + if subnet and not subnet_is_id and vnet_name: + from msrestazure.tools import resource_id + from azure.cli.core.commands.client_factory import get_subscription_id + return resource_id( + subscription=get_subscription_id(cli_ctx), + resource_group=resource_group_name, + namespace='Microsoft.Network', + type='virtualNetworks', + name=vnet_name, + child_type_1='subnets', + child_name_1=subnet) + raise CLIError('Usage error: --subnet ID | --subnet NAME --vnet-name NAME') + + +def _generic_site_operation(cli_ctx, resource_group_name, name, operation_name, slot=None, + extra_parameter=None, client=None): + client = client or web_client_factory(cli_ctx) + operation = getattr(client.web_apps, + operation_name if slot is None else operation_name + '_slot') + if slot is None: + return (operation(resource_group_name, name) + if extra_parameter is None else operation(resource_group_name, + name, extra_parameter)) + + return (operation(resource_group_name, name, slot) + if extra_parameter is None else operation(resource_group_name, + name, extra_parameter, slot)) + + +def _get_location_from_resource_group(cli_ctx, resource_group_name): + client = cf_resource_groups(cli_ctx) + group = client.get(resource_group_name) + return group.location diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py new file mode 100644 index 00000000000..13b1bd49064 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -0,0 +1,122 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.util import CLIError +from msrestazure.tools import is_valid_resource_id, parse_resource_id +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from ._client_factory import web_client_factory +from ._utils import _normalize_sku + + +def validate_asp_sku(cmd, namespace): + import json + client = web_client_factory(cmd.cli_ctx) + serverfarm = namespace.name + resource_group_name = namespace.resource_group_name + asp = client.app_service_plans.get(resource_group_name, serverfarm, None, raw=True) + if asp.response.status_code != 200: + raise CLIError(asp.response.text) + # convert byte array to json + output_str = asp.response.content.decode('utf8') + res = json.loads(output_str) + + # Isolated SKU is supported only for ASE + if namespace.sku in ['I1', 'I2', 'I3']: + if res.get('properties').get('hostingEnvironment') is None: + raise CLIError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + else: + if res.get('properties').get('hostingEnvironment') is not None: + raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + + +def validate_asp_create(cmd, namespace): + """Validate the SiteName that is being used to create is available + This API requires that the RG is already created""" + client = web_client_factory(cmd.cli_ctx) + if isinstance(namespace.name, str) and isinstance(namespace.resource_group_name, str): + resource_group_name = namespace.resource_group_name + if isinstance(namespace.location, str): + location = namespace.location + else: + from azure.cli.core.profiles import ResourceType + rg_client = get_mgmt_service_client(cmd.cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) + + group = rg_client.resource_groups.get(resource_group_name) + location = group.location + validation_payload = { + "name": namespace.name, + "type": "Microsoft.Web/serverfarms", + "location": location, + "properties": { + "skuName": _normalize_sku(namespace.sku) or 'B1', + "capacity": namespace.number_of_workers or 1, + "needLinuxWorkers": namespace.is_linux, + "isXenon": namespace.hyper_v + } + } + validation = client.validate(resource_group_name, validation_payload) + if validation.status.lower() == "failure" and validation.error.code != 'ServerFarmAlreadyExists': + raise CLIError(validation.error.message) + + +def validate_site_create(cmd, namespace): + """Validate the SiteName that is being used to create is available + This API requires that the RG is already created""" + client = web_client_factory(cmd.cli_ctx) + if isinstance(namespace.name, str) and isinstance(namespace.resource_group_name, str) \ + and isinstance(namespace.plan, str): + resource_group_name = namespace.resource_group_name + plan = namespace.plan + if is_valid_resource_id(plan): + parsed_result = parse_resource_id(plan) + plan_info = client.app_service_plans.get(parsed_result['resource_group'], parsed_result['name']) + else: + plan_info = client.app_service_plans.get(resource_group_name, plan) + # verify that the name is available for create + validation_payload = { + "name": namespace.name, + "type": "Microsoft.Web/sites", + "location": plan_info.location, + "properties": { + "serverfarmId": plan_info.id + } + } + validation = client.validate(resource_group_name, validation_payload) + if validation.status.lower() == "failure" and validation.error.code != 'SiteAlreadyExists': + raise CLIError(validation.error.message) + + +def validate_nodes_count(namespace): + """Validates that node_count and max_count is set between 1-100""" + if namespace.node_count is not None: + if namespace.node_count < 1 or namespace.node_count > 100: + raise CLIError('--node-count must be in the range [1,100]') + if namespace.max_count is not None: + if namespace.max_count < 1 or namespace.max_count > 100: + raise CLIError('--max-count must be in the range [1,100]') + + +def validate_nodepool_name(namespace): + """Validates a nodepool name to be at most 12 characters, alphanumeric only.""" + if namespace.nodepool_name != "": + if len(namespace.nodepool_name) > 12: + raise CLIError('--nodepool-name can contain at most 12 characters') + if not namespace.nodepool_name.isalnum(): + raise CLIError('--nodepool-name should contain only alphanumeric characters') + + +def validate_app_or_slot_exists_in_rg(cmd, namespace): + """Validate that the App/slot exists in the RG provided""" + client = web_client_factory(cmd.cli_ctx) + webapp = namespace.name + resource_group_name = namespace.resource_group_name + if isinstance(namespace.slot, str): + app = client.web_apps.get_slot(resource_group_name, webapp, namespace.slot, raw=True) + else: + app = client.web_apps.get(resource_group_name, webapp, None, raw=True) + if app.response.status_code != 200: + raise CLIError(app.response.text) diff --git a/src/appservice-kube/azext_appservice_kube/azext_metadata.json b/src/appservice-kube/azext_appservice_kube/azext_metadata.json new file mode 100644 index 00000000000..55c81bf3328 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67" +} \ No newline at end of file diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py new file mode 100644 index 00000000000..5aab5716505 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -0,0 +1,79 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +from azure.cli.core.commands import CliCommandType + +from ._client_factory import cf_kube_environments, cf_plans +from ._validators import validate_asp_sku, validate_app_or_slot_exists_in_rg + + +def transform_web_output(web): + props = ['name', 'state', 'location', 'resourceGroup', 'defaultHostName', 'appServicePlanId', 'ftpPublishingUrl'] + result = {k: web[k] for k in web if k in props} + # to get width under control, also the plan usually is in the same RG + result['appServicePlan'] = result.pop('appServicePlanId').split('/')[-1] + return result + + +def ex_handler_factory(creating_plan=False): + def _polish_bad_errors(ex): + import json + from knack.util import CLIError + try: + if 'text/plain' in ex.response.headers['Content-Type']: # HTML Response + detail = ex.response.text + else: + detail = json.loads(ex.response.text)['Message'] + if creating_plan: + if 'Requested features are not supported in region' in detail: + detail = ("Plan with linux worker is not supported in current region. For " + + "supported regions, please refer to https://docs.microsoft.com/" + "azure/app-service-web/app-service-linux-intro") + elif 'Not enough available reserved instance servers to satisfy' in detail: + detail = ("Plan with Linux worker can only be created in a group " + + "which has never contained a Windows worker, and vice versa. " + + "Please use a new resource group. Original error:" + detail) + ex = CLIError(detail) + except Exception: # pylint: disable=broad-except + pass + raise ex + return _polish_bad_errors + + +def load_command_table(self, _): + + kube_environments_sdk = CliCommandType( + operations_tmpl='azext_appservice_kube.vendored_sdks.azure_mgmt_web.operations#KubeEnvironmentsOperations.{}', + client_factory=cf_kube_environments + ) + + appservice_plan_sdk = CliCommandType( + operations_tmpl='azure.mgmt.web.operations#AppServicePlansOperations.{}', + client_factory=cf_plans + ) + + with self.command_group('appservice kube', kube_environments_sdk, is_preview=True) as g: + g.show_command('show') + g.wait_command('wait') + g.custom_command('list', 'list_kube_environments', client_factory=cf_kube_environments) + g.custom_command('create', 'create_kube_environment', client_factory=cf_kube_environments, supports_no_wait=True) + g.custom_command('update', 'update_kube_environment', client_factory=cf_kube_environments, supports_no_wait=True) + g.command('delete', 'delete', supports_no_wait=True, confirmation=True) + + with self.command_group('appservice plan', appservice_plan_sdk) as g: + g.custom_command('create', 'create_app_service_plan', supports_no_wait=True, + exception_handler=ex_handler_factory(creating_plan=True)) + g.generic_update_command('update', custom_func_name='update_app_service_plan', setter_arg_name='app_service_plan', + validator=validate_asp_sku, supports_no_wait=True) + + with self.command_group('webapp') as g: + g.custom_command('create', 'create_webapp', exception_handler=ex_handler_factory()) + g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output, + validator=validate_app_or_slot_exists_in_rg) + + with self.command_group('functionapp') as g: + g.custom_command('create', 'create_function', exception_handler=ex_handler_factory()) + g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py new file mode 100644 index 00000000000..538b54be815 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -0,0 +1,1340 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import time + +from binascii import hexlify +from os import urandom +import json +import ssl +import sys +import platform + +try: + from urllib.parse import urlparse +except ImportError: + from urlparse import urlparse # pylint: disable=import-error + +from knack.util import CLIError +from knack.log import get_logger + +from azure.cli.core.util import sdk_no_wait, shell_safe_json_parse, get_json_object, in_cloud_console +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core.commands import LongRunningOperation + +from azure.mgmt.storage import StorageManagementClient +from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient + +from msrestazure.tools import is_valid_resource_id, parse_resource_id + +from six.moves.urllib.request import urlopen + +from ._constants import (FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION, FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION, + FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_VERSION_DEFAULT, + DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, + KUBE_ASP_KIND, KUBE_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES, + CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) + +from ._utils import (_normalize_sku, get_sku_name, validate_subnet_id, _generic_site_operation, + _get_location_from_resource_group) + +from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory +from .vsts_cd_provider import VstsContinuousDeliveryProvider + +logger = get_logger(__name__) + + +# pylint: disable=too-many-locals,too-many-lines + +def create_kube_environment(cmd, + client, + kube_name, + resource_group_name, + client_id, + client_secret, + node_count=3, + max_count=3, + location=None, + nodepool_name='nodepool1', + node_vm_size='Standard_DS2_v2', + network_plugin='kubenet', + internal_load_balancing=False, + subnet=None, + vnet_name=None, + dns_service_ip=None, + service_cidr=None, + docker_bridge_cidr=None, + workspace_id=None, + tags=None, + no_wait=False): + + KubeEnvironmentResource, KubeNodePool = cmd.get_models('KubeEnvironmentResource', 'KubeNodePool') + location = location or _get_location_from_resource_group(cmd.cli_ctx, resource_group_name) + + if subnet is not None: + subnet_id = validate_subnet_id(cmd.cli_ctx, subnet, vnet_name, resource_group_name) + else: + subnet_id = None + + # TODO: add some verifications + # TODO: support creating service principal automatically + + node_pool_def = KubeNodePool( + vm_size=node_vm_size, + node_count=node_count, + max_node_count=max_count, + name=nodepool_name) + + kube_def = KubeEnvironmentResource( + location=location, + tags=tags, + node_pools=[node_pool_def], + internal_load_balancer_enabled=internal_load_balancing, + vnet_subnet_id=subnet_id, + network_plugin=network_plugin, + service_cidr=service_cidr, + dns_service_ip=dns_service_ip, + docker_bridge_cidr=docker_bridge_cidr, + service_principal_client_id=client_id, + service_principal_client_secret=client_secret, + log_analytics_workspace_id=workspace_id) + + return sdk_no_wait(no_wait, client.create, resource_group_name, kube_name, kube_def) + + +def list_kube_environments(client, resource_group_name=None): + if resource_group_name is None: + return client.kube_environments.list_by_subscription() + return client.kube_environments.list_by_resource_group(resource_group_name) + + +def update_kube_environment(cmd, + kube_name, + resource_group_name, + client_id=None, + client_secret=None, + workspace_id=None, + tags=None, + no_wait=False): + raise CLIError("Update is not yet supported for Kubernetes Environments.") + + +def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, + app_service_environment=None, kube_environment=None, sku='B1', kube_sku=KUBE_DEFAULT_SKU, + number_of_workers=None, location=None, tags=None, no_wait=False): + HostingEnvironmentProfile, SkuDescription, AppServicePlan, KubeEnvironmentProfile = cmd.get_models( + 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan', 'KubeEnvironmentProfile') + sku = _normalize_sku(sku) + _validate_asp_sku(app_service_environment, sku) + if is_linux and hyper_v: + raise CLIError('usage error: --is-linux | --hyper-v') + + kind = None + + client = web_client_factory(cmd.cli_ctx) + if app_service_environment: + if hyper_v: + raise CLIError('Windows containers is not yet supported in app service environment') + ase_id = _validate_app_service_environment_id(cmd.cli_ctx, app_service_environment, resource_group_name) + ase_def = HostingEnvironmentProfile(id=ase_id) + ase_list = client.app_service_environments.list() + ase_found = False + for ase in ase_list: + if ase.id.lower() == ase_id.lower(): + location = ase.location + ase_found = True + break + if not ase_found: + raise CLIError("App service environment '{}' not found in subscription.".format(ase_id)) + else: # Non-ASE + ase_def = None + + if kube_environment and ase_def is None: + kube_id = _resolve_kube_environment_id(cmd.cli_ctx, kube_environment, resource_group_name) + kube_def = KubeEnvironmentProfile(id=kube_id) + kind = KUBE_ASP_KIND + parsed_id = parse_resource_id(kube_id) + kube_name = parsed_id.get("name") + kube_rg = parsed_id.get("resource_group") + if kube_name is not None and kube_rg is not None: + kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) + if kube_env is not None: + location = kube_env.location + else: + raise CLIError("Kube Environment '{}' not found in subscription.".format(kube_id)) + else: + kube_def = None + + if location is None: + location = _get_location_from_resource_group(cmd.cli_ctx, resource_group_name) + + if kube_environment: + sku_def = SkuDescription(tier=kube_sku, name="KUBE", capacity=number_of_workers) + else: + # the api is odd on parameter naming, have to live with it for now + sku_def = SkuDescription(tier=get_sku_name(sku), name=sku, capacity=number_of_workers) + + plan_def = AppServicePlan(location=location, tags=tags, sku=sku_def, kind=kind, + reserved=(is_linux or None), hyper_v=(hyper_v or None), name=name, + per_site_scaling=per_site_scaling, hosting_environment_profile=ase_def, + kube_environment_profile=kube_def) + return sdk_no_wait(no_wait, client.app_service_plans.create_or_update, name=name, + resource_group_name=resource_group_name, app_service_plan=plan_def) + + +def update_app_service_plan(instance, sku=None, number_of_workers=None, kube_sku=KUBE_DEFAULT_SKU): + if number_of_workers is None and sku is None: + logger.warning( + 'No update is done. Specify --sku and/or --kube-sku and/or --number-of-workers.') + sku_def = instance.sku + if sku is not None: + sku = _normalize_sku(sku) + sku_def.tier = get_sku_name(sku) + sku_def.name = sku + + if kube_sku is not None: + sku_def.tier = kube_sku + + if number_of_workers is not None: + sku_def.capacity = number_of_workers + instance.sku = sku_def + + return instance + + +def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches + deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', + deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None, + multicontainer_config_type=None, multicontainer_config_file=None, tags=None, + using_webapp_up=False, language=None, + min_worker_count=None, max_worker_count=None): + SiteConfig, SkuDescription, Site, NameValuePair = cmd.get_models( + 'SiteConfig', 'SkuDescription', 'Site', 'NameValuePair') + if deployment_source_url and deployment_local_git: + raise CLIError('usage error: --deployment-source-url | --deployment-local-git') + + docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) + + client = web_client_factory(cmd.cli_ctx) + if is_valid_resource_id(plan): + parse_result = parse_resource_id(plan) + plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) + else: + plan_info = client.app_service_plans.get(resource_group_name, plan) + if not plan_info: + raise CLIError("The plan '{}' doesn't exist".format(plan)) + is_linux = plan_info.reserved + node_default_version = NODE_VERSION_DEFAULT + location = plan_info.location + # This is to keep the existing appsettings for a newly created webapp on existing webapp name. + name_validation = client.check_name_availability(name, 'Site') + if not name_validation.name_available: + existing_app_settings = _generic_site_operation(cmd.cli_ctx, resource_group_name, + name, 'list_application_settings') + settings = [] + for k, v in existing_app_settings.properties.items(): + settings.append(NameValuePair(name=k, value=v)) + site_config = SiteConfig(app_settings=settings) + else: + site_config = SiteConfig(app_settings=[]) + if isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() not in ['F1', 'FREE', 'SHARED', 'D1', + 'B1', 'B2', 'B3', 'BASIC']: + site_config.always_on = True + webapp_def = Site(location=location, site_config=site_config, server_farm_id=plan_info.id, tags=tags, + https_only=using_webapp_up) + + is_kube = False + if plan_info.kind.upper() == KUBE_ASP_KIND: + webapp_def.kind = KUBE_APP_KIND + is_kube = True + + if is_kube: + if min_worker_count is not None: + site_config.number_of_workers = min_worker_count + + if max_worker_count is not None: + site_config.app_settings.append(NameValuePair(name='K8SE_APP_MAX_INSTANCE_COUNT', value=max_worker_count)) + + helper = _StackRuntimeHelper(cmd, client, linux=(is_linux or is_kube)) + + if is_linux or is_kube: + if not validate_container_app_create_options(runtime, deployment_container_image_name, + multicontainer_config_type, multicontainer_config_file): + raise CLIError("usage error: --runtime | --deployment-container-image-name |" + " --multicontainer-config-type TYPE --multicontainer-config-file FILE") + if startup_file: + site_config.app_command_line = startup_file + + if runtime: + site_config.linux_fx_version = runtime + match = helper.resolve(runtime) + if not match: + raise CLIError("Linux Runtime '{}' is not supported." + "Please invoke 'list-runtimes' to cross check".format(runtime)) + elif deployment_container_image_name: + site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) + if name_validation.name_available: + site_config.app_settings.append(NameValuePair(name="WEBSITES_ENABLE_APP_SERVICE_STORAGE", + value="false")) + elif multicontainer_config_type and multicontainer_config_file: + encoded_config_file = _get_linux_multicontainer_encoded_config_from_file(multicontainer_config_file) + site_config.linux_fx_version = _format_fx_version(encoded_config_file, multicontainer_config_type) + + elif plan_info.is_xenon: # windows container webapp + site_config.windows_fx_version = _format_fx_version(deployment_container_image_name) + + elif runtime: # windows webapp with runtime specified + if any([startup_file, deployment_container_image_name, multicontainer_config_file, multicontainer_config_type]): + raise CLIError("usage error: --startup-file or --deployment-container-image-name or " + "--multicontainer-config-type and --multicontainer-config-file is " + "only appliable on linux webapp") + match = helper.resolve(runtime) + if not match: + raise CLIError("Runtime '{}' is not supported. Please invoke 'list-runtimes' to cross check".format(runtime)) # pylint: disable=line-too-long + match['setter'](cmd=cmd, stack=match, site_config=site_config) + # Be consistent with portal: any windows webapp should have this even it doesn't have node in the stack + if not match['displayName'].startswith('node'): + if name_validation.name_available: + site_config.app_settings.append(NameValuePair(name="WEBSITE_NODE_DEFAULT_VERSION", + value=node_default_version)) + else: # windows webapp without runtime specified + if name_validation.name_available: + site_config.app_settings.append(NameValuePair(name="WEBSITE_NODE_DEFAULT_VERSION", + value=node_default_version)) + + if site_config.app_settings: + for setting in site_config.app_settings: + logger.info('Will set appsetting %s', setting) + if using_webapp_up: # when the routine is invoked as a help method for webapp up + if name_validation.name_available: + logger.info("will set appsetting for enabling build") + site_config.app_settings.append(NameValuePair(name="SCM_DO_BUILD_DURING_DEPLOYMENT", value=True)) + if language is not None and language.lower() == 'dotnetcore': + if name_validation.name_available: + site_config.app_settings.append(NameValuePair(name='ANCM_ADDITIONAL_ERROR_PAGE_LINK', + value='https://{}.scm.azurewebsites.net/detectors' + .format(name))) + + poller = client.web_apps.create_or_update(resource_group_name, name, webapp_def) + webapp = LongRunningOperation(cmd.cli_ctx)(poller) + + if is_kube: + return webapp + + # Ensure SCC operations follow right after the 'create', no precedent appsetting update commands + _set_remote_or_local_git(cmd, webapp, resource_group_name, name, deployment_source_url, + deployment_source_branch, deployment_local_git) + + _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name) + + if deployment_container_image_name: + update_container_settings(cmd, resource_group_name, name, docker_registry_server_url, + deployment_container_image_name, docker_registry_server_user, + docker_registry_server_password=docker_registry_server_password) + + return webapp + + +def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): + webapp = app_instance + if not app_instance: # when the routine is invoked as a help method, not through commands + webapp = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) + if not webapp: + raise CLIError("'{}' app doesn't exist".format(name)) + _rename_server_farm_props(webapp) + + # TODO: get rid of this conditional once the api's are implemented for kubapps + if KUBE_APP_KIND.lower() not in webapp.kind.lower(): + _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot) + + return webapp + + +def create_function(cmd, resource_group_name, name, storage_account, plan=None, + os_type=None, functions_version=None, runtime=None, runtime_version=None, + consumption_plan_location=None, app_insights=None, app_insights_key=None, + disable_app_insights=None, deployment_source_url=None, + deployment_source_branch='master', deployment_local_git=None, + docker_registry_server_password=None, docker_registry_server_user=None, + deployment_container_image_name=None, tags=None, + min_worker_count=None, max_worker_count=None): + # pylint: disable=too-many-statements, too-many-branches + if functions_version is None: + logger.warning("No functions version specified so defaulting to 2. In the future, specifying a version will " + "be required. To create a 2.x function you would pass in the flag `--functions-version 2`") + functions_version = '2' + if deployment_source_url and deployment_local_git: + raise CLIError('usage error: --deployment-source-url | --deployment-local-git') + if bool(plan) == bool(consumption_plan_location): + raise CLIError("usage error: --plan NAME_OR_ID | --consumption-plan-location LOCATION") + SiteConfig, Site, NameValuePair = cmd.get_models('SiteConfig', 'Site', 'NameValuePair') + docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) + + site_config = SiteConfig(app_settings=[]) + functionapp_def = Site(location=None, site_config=site_config, tags=tags) + client = web_client_factory(cmd.cli_ctx) + plan_info = None + if runtime is not None: + runtime = runtime.lower() + + if consumption_plan_location: + locations = list_consumption_locations(cmd) + location = next((l for l in locations if l['name'].lower() == consumption_plan_location.lower()), None) + if location is None: + raise CLIError("Location is invalid. Use: az functionapp list-consumption-locations") + functionapp_def.location = consumption_plan_location + functionapp_def.kind = 'functionapp' + # if os_type is None, the os type is windows + is_linux = os_type and os_type.lower() == 'linux' + + else: # apps with SKU based plan + if is_valid_resource_id(plan): + parse_result = parse_resource_id(plan) + plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) + else: + plan_info = client.app_service_plans.get(resource_group_name, plan) + if not plan_info: + raise CLIError("The plan '{}' doesn't exist".format(plan)) + location = plan_info.location + is_linux = plan_info.reserved + functionapp_def.server_farm_id = plan + functionapp_def.location = location + + is_kube = False + if plan_info.kind.upper() == KUBE_ASP_KIND: + is_kube = True + + if is_kube: + if min_worker_count is not None: + site_config.number_of_workers = min_worker_count + + if max_worker_count is not None: + site_config.app_settings.append(NameValuePair(name='K8SE_APP_MAX_INSTANCE_COUNT', value=max_worker_count)) + + if is_linux and not runtime and (consumption_plan_location or not deployment_container_image_name): + raise CLIError( + "usage error: --runtime RUNTIME required for linux functions apps without custom image.") + + if runtime: + if is_linux and runtime not in LINUX_RUNTIMES: + raise CLIError("usage error: Currently supported runtimes (--runtime) in linux function apps are: {}." + .format(', '.join(LINUX_RUNTIMES))) + if not is_linux and runtime not in WINDOWS_RUNTIMES: + raise CLIError("usage error: Currently supported runtimes (--runtime) in windows function apps are: {}." + .format(', '.join(WINDOWS_RUNTIMES))) + site_config.app_settings.append(NameValuePair(name='FUNCTIONS_WORKER_RUNTIME', value=runtime)) + + if runtime_version is not None: + if runtime is None: + raise CLIError('Must specify --runtime to use --runtime-version') + allowed_versions = FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS[functions_version][runtime] + if runtime_version not in allowed_versions: + if runtime == 'dotnet': + raise CLIError('--runtime-version is not supported for --runtime dotnet. Dotnet version is determined ' + 'by --functions-version. Dotnet version {} is not supported by Functions version {}.' + .format(runtime_version, functions_version)) + raise CLIError('--runtime-version {} is not supported for the selected --runtime {} and ' + '--functions-version {}. Supported versions are: {}.' + .format(runtime_version, runtime, functions_version, ', '.join(allowed_versions))) + if runtime == 'dotnet': + logger.warning('--runtime-version is not supported for --runtime dotnet. Dotnet version is determined by ' + '--functions-version. Dotnet version will be %s for this function app.', + FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION[functions_version][runtime]) + + con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) + + if is_linux: + functionapp_def.kind = 'functionapp,linux' + functionapp_def.reserved = True + is_consumption = consumption_plan_location is not None + if not is_consumption: + site_config.app_settings.append(NameValuePair(name='MACHINEKEY_DecryptionKey', + value=str(hexlify(urandom(32)).decode()).upper())) + if deployment_container_image_name: + functionapp_def.kind = 'functionapp,linux,container' + site_config.app_settings.append(NameValuePair(name='DOCKER_CUSTOM_IMAGE_NAME', + value=deployment_container_image_name)) + site_config.app_settings.append(NameValuePair(name='FUNCTION_APP_EDIT_MODE', value='readOnly')) + site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', + value='false')) + site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) + else: + site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', + value='true')) + if runtime not in FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS[functions_version]: + raise CLIError("An appropriate linux image for runtime:'{}', " + "functions_version: '{}' was not found".format(runtime, functions_version)) + if deployment_container_image_name is None: + site_config.linux_fx_version = _get_linux_fx_functionapp(functions_version, runtime, runtime_version) + elif is_kube: + functionapp_def.kind = 'kubeapp,functionapp,linux' + functionapp_def.reserved = True + site_config.app_settings.append(NameValuePair(name='WEBSITES_PORT', value='80')) + site_config.app_settings.append(NameValuePair(name='FUNCTIONS_EXTENSION_VERSION', value='~2')) + site_config.app_settings.append(NameValuePair(name='MACHINEKEY_DecryptionKey', + value=str(hexlify(urandom(32)).decode()).upper())) + if deployment_container_image_name: + functionapp_def.kind = 'kubeapp,functionapp,linux,container' + site_config.app_settings.append(NameValuePair(name='DOCKER_CUSTOM_IMAGE_NAME', + value=deployment_container_image_name)) + site_config.app_settings.append(NameValuePair(name='FUNCTION_APP_EDIT_MODE', value='readOnly')) + site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) + else: + site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', value='true')) + site_config.linux_fx_version = _get_linux_fx_kube_functionapp(runtime, runtime_version) + else: + functionapp_def.kind = 'functionapp' + if runtime == "java": + site_config.java_version = _get_java_version_functionapp(functions_version, runtime_version) + + # adding appsetting to site to make it a function + site_config.app_settings.append(NameValuePair(name='FUNCTIONS_EXTENSION_VERSION', + value=_get_extension_version_functionapp(functions_version))) + site_config.app_settings.append(NameValuePair(name='AzureWebJobsStorage', value=con_string)) + site_config.app_settings.append(NameValuePair(name='AzureWebJobsDashboard', value=con_string)) + site_config.app_settings.append(NameValuePair(name='WEBSITE_NODE_DEFAULT_VERSION', + value=_get_website_node_version_functionapp(functions_version, + runtime, + runtime_version))) + + # If plan is not consumption or elastic premium, we need to set always on + if consumption_plan_location is None and not is_plan_elastic_premium(cmd, plan_info): + site_config.always_on = True + + # If plan is elastic premium or windows consumption, we need these app settings + is_windows_consumption = consumption_plan_location is not None and not is_linux + if is_plan_elastic_premium(cmd, plan_info) or is_windows_consumption: + site_config.app_settings.append(NameValuePair(name='WEBSITE_CONTENTAZUREFILECONNECTIONSTRING', + value=con_string)) + site_config.app_settings.append(NameValuePair(name='WEBSITE_CONTENTSHARE', value=name.lower())) + + create_app_insights = False + + if app_insights_key is not None: + site_config.app_settings.append(NameValuePair(name='APPINSIGHTS_INSTRUMENTATIONKEY', + value=app_insights_key)) + elif app_insights is not None: + instrumentation_key = get_app_insights_key(cmd.cli_ctx, resource_group_name, app_insights) + site_config.app_settings.append(NameValuePair(name='APPINSIGHTS_INSTRUMENTATIONKEY', + value=instrumentation_key)) + elif not disable_app_insights: + create_app_insights = True + + poller = client.web_apps.create_or_update(resource_group_name, name, functionapp_def) + functionapp = LongRunningOperation(cmd.cli_ctx)(poller) + + if consumption_plan_location and is_linux: + logger.warning("Your Linux function app '%s', that uses a consumption plan has been successfully " + "created but is not active until content is published using " + "Azure Portal or the Functions Core Tools.", name) + else: + _set_remote_or_local_git(cmd, functionapp, resource_group_name, name, deployment_source_url, + deployment_source_branch, deployment_local_git) + + if create_app_insights: + try: + try_create_application_insights(cmd, functionapp) + except Exception: # pylint: disable=broad-except + logger.warning('Error while trying to create and configure an Application Insights for the Function App. ' + 'Please use the Azure Portal to create and configure the Application Insights, if needed.') + + if deployment_container_image_name: + update_container_settings_functionapp(cmd, resource_group_name, name, docker_registry_server_url, + deployment_container_image_name, docker_registry_server_user, + docker_registry_server_password) + + return functionapp + + +def update_container_settings_functionapp(cmd, resource_group_name, name, docker_registry_server_url=None, + docker_custom_image_name=None, docker_registry_server_user=None, + docker_registry_server_password=None, slot=None): + return update_container_settings(cmd, resource_group_name, name, docker_registry_server_url, + docker_custom_image_name, docker_registry_server_user, None, + docker_registry_server_password, multicontainer_config_type=None, + multicontainer_config_file=None, slot=slot) + + +def update_container_settings(cmd, resource_group_name, name, docker_registry_server_url=None, + docker_custom_image_name=None, docker_registry_server_user=None, + websites_enable_app_service_storage=None, docker_registry_server_password=None, + multicontainer_config_type=None, multicontainer_config_file=None, slot=None): + settings = [] + if docker_registry_server_url is not None: + settings.append('DOCKER_REGISTRY_SERVER_URL=' + docker_registry_server_url) + + if (not docker_registry_server_user and not docker_registry_server_password and + docker_registry_server_url and '.azurecr.io' in docker_registry_server_url): + logger.warning('No credential was provided to access Azure Container Registry. Trying to look up...') + parsed = urlparse(docker_registry_server_url) + registry_name = (parsed.netloc if parsed.scheme else parsed.path).split('.')[0] + try: + docker_registry_server_user, docker_registry_server_password = _get_acr_cred(cmd.cli_ctx, registry_name) + except Exception as ex: # pylint: disable=broad-except + logger.warning("Retrieving credentials failed with an exception:'%s'", ex) # consider throw if needed + + if docker_registry_server_user is not None: + settings.append('DOCKER_REGISTRY_SERVER_USERNAME=' + docker_registry_server_user) + if docker_registry_server_password is not None: + settings.append('DOCKER_REGISTRY_SERVER_PASSWORD=' + docker_registry_server_password) + if docker_custom_image_name is not None: + _add_fx_version(cmd, resource_group_name, name, docker_custom_image_name, slot) + if websites_enable_app_service_storage: + settings.append('WEBSITES_ENABLE_APP_SERVICE_STORAGE=' + websites_enable_app_service_storage) + + if docker_registry_server_user or docker_registry_server_password or docker_registry_server_url or websites_enable_app_service_storage: # pylint: disable=line-too-long + update_app_settings(cmd, resource_group_name, name, settings, slot) + settings = get_app_settings(cmd, resource_group_name, name, slot) + + if multicontainer_config_file and multicontainer_config_type: + encoded_config_file = _get_linux_multicontainer_encoded_config_from_file(multicontainer_config_file) + linux_fx_version = _format_fx_version(encoded_config_file, multicontainer_config_type) + update_site_configs(cmd, resource_group_name, name, linux_fx_version=linux_fx_version, slot=slot) + elif multicontainer_config_file or multicontainer_config_type: + logger.warning('Must change both settings --multicontainer-config-file FILE --multicontainer-config-type TYPE') + + return _mask_creds_related_appsettings(_filter_for_container_settings(cmd, resource_group_name, name, settings, + slot=slot)) + + +def validate_container_app_create_options(runtime=None, deployment_container_image_name=None, + multicontainer_config_type=None, multicontainer_config_file=None): + if bool(multicontainer_config_type) != bool(multicontainer_config_file): + return False + opts = [runtime, deployment_container_image_name, multicontainer_config_type] + return len([x for x in opts if x]) == 1 # you can only specify one out the combinations + + +def parse_docker_image_name(deployment_container_image_name): + if not deployment_container_image_name: + return None + slash_ix = deployment_container_image_name.rfind('/') + docker_registry_server_url = deployment_container_image_name[0:slash_ix] + if slash_ix == -1 or ("." not in docker_registry_server_url and ":" not in docker_registry_server_url): + return None + return docker_registry_server_url + + +def list_consumption_locations(cmd): + client = web_client_factory(cmd.cli_ctx) + regions = client.list_geo_regions(sku='Dynamic') + return [{'name': x.name.lower().replace(' ', '')} for x in regions] + + +def is_plan_elastic_premium(cmd, plan_info): + SkuDescription, AppServicePlan = cmd.get_models('SkuDescription', 'AppServicePlan') + if isinstance(plan_info, AppServicePlan): + if isinstance(plan_info.sku, SkuDescription): + return plan_info.sku.tier == 'ElasticPremium' + return False + + +def get_app_insights_key(cli_ctx, resource_group, name): + appinsights_client = get_mgmt_service_client(cli_ctx, ApplicationInsightsManagementClient) + appinsights = appinsights_client.components.get(resource_group, name) + if appinsights is None or appinsights.instrumentation_key is None: + raise CLIError("App Insights {} under resource group {} was not found.".format(name, resource_group)) + return appinsights.instrumentation_key + + +def try_create_application_insights(cmd, functionapp): + creation_failed_warn = 'Unable to create the Application Insights for the Function App. ' \ + 'Please use the Azure Portal to manually create and configure the Application Insights, ' \ + 'if needed.' + + ai_resource_group_name = functionapp.resource_group + ai_name = functionapp.name + ai_location = functionapp.location + + app_insights_client = get_mgmt_service_client(cmd.cli_ctx, ApplicationInsightsManagementClient) + ai_properties = { + "name": ai_name, + "location": ai_location, + "kind": "web", + "properties": { + "Application_Type": "web" + } + } + appinsights = app_insights_client.components.create_or_update(ai_resource_group_name, ai_name, ai_properties) + if appinsights is None or appinsights.instrumentation_key is None: + logger.warning(creation_failed_warn) + return + + # We make this success message as a warning to no interfere with regular JSON output in stdout + logger.warning('Application Insights \"%s\" was created for this Function App. ' + 'You can visit https://portal.azure.com/#resource%s/overview to view your ' + 'Application Insights component', appinsights.name, appinsights.id) + + update_app_settings(cmd, functionapp.resource_group, functionapp.name, + ['APPINSIGHTS_INSTRUMENTATIONKEY={}'.format(appinsights.instrumentation_key)]) + + +def update_app_settings(cmd, resource_group_name, name, settings=None, slot=None, slot_settings=None): + if not settings and not slot_settings: + raise CLIError('Usage Error: --settings |--slot-settings') + + settings = settings or [] + slot_settings = slot_settings or [] + + app_settings = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, + 'list_application_settings', slot) + result, slot_result = {}, {} + # pylint: disable=too-many-nested-blocks + for src, dest in [(settings, result), (slot_settings, slot_result)]: + for s in src: + try: + temp = shell_safe_json_parse(s) + if isinstance(temp, list): # a bit messy, but we'd like accept the output of the "list" command + for t in temp: + if t.get('slotSetting', True): + slot_result[t['name']] = t['value'] + # Mark each setting as the slot setting + else: + result[t['name']] = t['value'] + else: + dest.update(temp) + except CLIError: + setting_name, value = s.split('=', 1) + dest[setting_name] = value + + result.update(slot_result) + for setting_name, value in result.items(): + app_settings.properties[setting_name] = value + client = web_client_factory(cmd.cli_ctx) + + result = _generic_settings_operation(cmd.cli_ctx, resource_group_name, name, + 'update_application_settings', + app_settings.properties, slot, client) + + app_settings_slot_cfg_names = [] + if slot_result: + new_slot_setting_names = slot_result.keys() + slot_cfg_names = client.web_apps.list_slot_configuration_names(resource_group_name, name) + slot_cfg_names.app_setting_names = slot_cfg_names.app_setting_names or [] + slot_cfg_names.app_setting_names += new_slot_setting_names + app_settings_slot_cfg_names = slot_cfg_names.app_setting_names + client.web_apps.update_slot_configuration_names(resource_group_name, name, slot_cfg_names) + + return _build_app_settings_output(result.properties, app_settings_slot_cfg_names) + + +def get_app_settings(cmd, resource_group_name, name, slot=None): + result = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'list_application_settings', slot) + client = web_client_factory(cmd.cli_ctx) + slot_app_setting_names = client.web_apps.list_slot_configuration_names(resource_group_name, name).app_setting_names + return _build_app_settings_output(result.properties, slot_app_setting_names) + + +# for any modifications to the non-optional parameters, adjust the reflection logic accordingly +# in the method +# pylint: disable=unused-argument +def update_site_configs(cmd, resource_group_name, name, slot=None, number_of_workers=None, linux_fx_version=None, + windows_fx_version=None, pre_warmed_instance_count=None, php_version=None, + python_version=None, net_framework_version=None, + java_version=None, java_container=None, java_container_version=None, + remote_debugging_enabled=None, web_sockets_enabled=None, + always_on=None, auto_heal_enabled=None, + use32_bit_worker_process=None, + min_tls_version=None, + http20_enabled=None, + app_command_line=None, + ftps_state=None, + generic_configurations=None): + configs = get_site_configs(cmd, resource_group_name, name, slot) + if number_of_workers is not None: + number_of_workers = validate_range_of_int_flag('--number-of-workers', number_of_workers, min_val=0, max_val=20) + if linux_fx_version: + if linux_fx_version.strip().lower().startswith('docker|'): + update_app_settings(cmd, resource_group_name, name, ["WEBSITES_ENABLE_APP_SERVICE_STORAGE=false"]) + else: + delete_app_settings(cmd, resource_group_name, name, ["WEBSITES_ENABLE_APP_SERVICE_STORAGE"]) + + if pre_warmed_instance_count is not None: + pre_warmed_instance_count = validate_range_of_int_flag('--prewarmed-instance-count', pre_warmed_instance_count, + min_val=0, max_val=20) + import inspect + frame = inspect.currentframe() + bool_flags = ['remote_debugging_enabled', 'web_sockets_enabled', 'always_on', + 'auto_heal_enabled', 'use32_bit_worker_process', 'http20_enabled'] + int_flags = ['pre_warmed_instance_count', 'number_of_workers'] + # note: getargvalues is used already in azure.cli.core.commands. + # and no simple functional replacement for this deprecating method for 3.5 + args, _, _, values = inspect.getargvalues(frame) # pylint: disable=deprecated-method + + for arg in args[3:]: + if arg in int_flags and values[arg] is not None: + values[arg] = validate_and_convert_to_int(arg, values[arg]) + if arg != 'generic_configurations' and values.get(arg, None): + setattr(configs, arg, values[arg] if arg not in bool_flags else values[arg] == 'true') + + generic_configurations = generic_configurations or [] + result = {} + for s in generic_configurations: + try: + result.update(get_json_object(s)) + except CLIError: + config_name, value = s.split('=', 1) + result[config_name] = value + + for config_name, value in result.items(): + setattr(configs, config_name, value) + + return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'update_configuration', slot, configs) + + +def validate_range_of_int_flag(flag_name, value, min_val, max_val): + value = validate_and_convert_to_int(flag_name, value) + if min_val > value or value > max_val: + raise CLIError("Usage error: {} is expected to be between {} and {} (inclusive)".format(flag_name, min_val, + max_val)) + return value + + +def validate_and_convert_to_int(flag, val): + try: + return int(val) + except ValueError: + raise CLIError("Usage error: {} is expected to have an int value.".format(flag)) + + +def delete_app_settings(cmd, resource_group_name, name, setting_names, slot=None): + app_settings = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'list_application_settings', slot) + client = web_client_factory(cmd.cli_ctx) + + slot_cfg_names = client.web_apps.list_slot_configuration_names(resource_group_name, name) + is_slot_settings = False + for setting_name in setting_names: + app_settings.properties.pop(setting_name, None) + if slot_cfg_names.app_setting_names and setting_name in slot_cfg_names.app_setting_names: + slot_cfg_names.app_setting_names.remove(setting_name) + is_slot_settings = True + + if is_slot_settings: + client.web_apps.update_slot_configuration_names(resource_group_name, name, slot_cfg_names) + + result = _generic_settings_operation(cmd.cli_ctx, resource_group_name, name, + 'update_application_settings', + app_settings.properties, slot, client) + + return _build_app_settings_output(result.properties, slot_cfg_names.app_setting_names) + + +def config_source_control(cmd, resource_group_name, name, repo_url, repository_type='git', branch=None, # pylint: disable=too-many-locals + manual_integration=None, git_token=None, slot=None, cd_app_type=None, + app_working_dir=None, nodejs_task_runner=None, python_framework=None, + python_version=None, cd_account_create=None, cd_project_url=None, test=None, + slot_swap=None, private_repo_username=None, private_repo_password=None): + client = web_client_factory(cmd.cli_ctx) + location = _get_location_from_webapp(client, resource_group_name, name) + + if cd_project_url: + # Add default values + cd_app_type = 'AspNet' if cd_app_type is None else cd_app_type + python_framework = 'Django' if python_framework is None else python_framework + python_version = 'Python 3.5.3 x86' if python_version is None else python_version + + webapp_list = None if test is None else list_webapp(resource_group_name) + vsts_provider = VstsContinuousDeliveryProvider() + cd_app_type_details = { + 'cd_app_type': cd_app_type, + 'app_working_dir': app_working_dir, + 'nodejs_task_runner': nodejs_task_runner, + 'python_framework': python_framework, + 'python_version': python_version + } + try: + status = vsts_provider.setup_continuous_delivery(cmd.cli_ctx, resource_group_name, name, repo_url, + branch, git_token, slot_swap, cd_app_type_details, + cd_project_url, cd_account_create, location, test, + private_repo_username, private_repo_password, webapp_list) + except RuntimeError as ex: + raise CLIError(ex) + logger.warning(status.status_message) + return status + non_vsts_params = [cd_app_type, app_working_dir, nodejs_task_runner, python_framework, + python_version, cd_account_create, test, slot_swap] + if any(non_vsts_params): + raise CLIError('Following parameters are of no use when cd_project_url is None: ' + + 'cd_app_type, app_working_dir, nodejs_task_runner, python_framework,' + + 'python_version, cd_account_create, test, slot_swap') + from azure.mgmt.web.models import SiteSourceControl, SourceControl + if git_token: + sc = SourceControl(location=location, source_control_name='GitHub', token=git_token) + client.update_source_control('GitHub', sc) + + source_control = SiteSourceControl(location=location, repo_url=repo_url, branch=branch, + is_manual_integration=manual_integration, + is_mercurial=(repository_type != 'git')) + + # SCC config can fail if previous commands caused SCMSite shutdown, so retry here. + for i in range(5): + try: + poller = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, + 'create_or_update_source_control', + slot, source_control) + return LongRunningOperation(cmd.cli_ctx)(poller) + except Exception as ex: # pylint: disable=broad-except + import re + ex = ex_handler_factory(no_throw=True)(ex) + # for non server errors(50x), just throw; otherwise retry 4 times + if i == 4 or not re.findall(r'\(50\d\)', str(ex)): + raise + logger.warning('retrying %s/4', i + 1) + time.sleep(5) # retry in a moment + + +def list_webapp(cmd, resource_group_name=None): + result = _list_app(cmd.cli_ctx, resource_group_name) + return [r for r in result if 'function' not in r.kind] + + +def get_site_configs(cmd, resource_group_name, name, slot=None): + return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get_configuration', slot) + + +# for generic updater +def get_webapp(cmd, resource_group_name, name, slot=None): + return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) + + +def enable_local_git(cmd, resource_group_name, name, slot=None): + SiteConfigResource = cmd.get_models('SiteConfigResource') + client = web_client_factory(cmd.cli_ctx) + location = _get_location_from_webapp(client, resource_group_name, name) + site_config = SiteConfigResource(location=location) + site_config.scm_type = 'LocalGit' + if slot is None: + client.web_apps.create_or_update_configuration(resource_group_name, name, site_config) + else: + client.web_apps.create_or_update_configuration_slot(resource_group_name, name, + site_config, slot) + + return {'url': _get_local_git_url(cmd.cli_ctx, client, resource_group_name, name, slot)} + + +def url_validator(url): + try: + result = urlparse(url) + return all([result.scheme, result.netloc, result.path]) + except ValueError: + return False + + +def list_publish_profiles(cmd, resource_group_name, name, slot=None): + import xmltodict + + content = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, + 'list_publishing_profile_xml_with_secrets', slot) + full_xml = '' + for f in content: + full_xml += f.decode() + + profiles = xmltodict.parse(full_xml, xml_attribs=True)['publishData']['publishProfile'] + converted = [] + for profile in profiles: + new = {} + for key in profile: + # strip the leading '@' xmltodict put in for attributes + new[key.lstrip('@')] = profile[key] + converted.append(new) + + return converted + + +# private helpers + +def _get_local_git_url(cli_ctx, client, resource_group_name, name, slot=None): + user = client.get_publishing_user() + result = _generic_site_operation(cli_ctx, resource_group_name, name, 'get_source_control', slot) + parsed = urlparse(result.repo_url) + return '{}://{}@{}/{}.git'.format(parsed.scheme, user.publishing_user_name, + parsed.netloc, name) + + +def _get_location_from_webapp(client, resource_group_name, webapp): + webapp = client.web_apps.get(resource_group_name, webapp) + if not webapp: + raise CLIError("'{}' app doesn't exist".format(webapp)) + return webapp.location + + +def _list_app(cli_ctx, resource_group_name=None): + client = web_client_factory(cli_ctx) + if resource_group_name: + result = list(client.web_apps.list_by_resource_group(resource_group_name)) + else: + result = list(client.web_apps.list()) + for webapp in result: + _rename_server_farm_props(webapp) + return result + + +def _resolve_kube_environment_id(cli_ctx, kube_environment, resource_group_name): + if is_valid_resource_id(kube_environment): + return kube_environment + + from msrestazure.tools import resource_id + from azure.cli.core.commands.client_factory import get_subscription_id + return resource_id( + subscription=get_subscription_id(cli_ctx), + resource_group=resource_group_name, + namespace='Microsoft.Web', + type='kubeEnvironments', + name=kube_environment) + + +def _validate_asp_sku(app_service_environment, sku): + # Isolated SKU is supported only for ASE + if sku in ['I1', 'I2', 'I3']: + if not app_service_environment: + raise CLIError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + else: + if app_service_environment: + raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + + +def _validate_app_service_environment_id(cli_ctx, ase, resource_group_name): + ase_is_id = is_valid_resource_id(ase) + if ase_is_id: + return ase + + from msrestazure.tools import resource_id + from azure.cli.core.commands.client_factory import get_subscription_id + return resource_id( + subscription=get_subscription_id(cli_ctx), + resource_group=resource_group_name, + namespace='Microsoft.Web', + type='hostingEnvironments', + name=ase) + + +def _get_extension_version_functionapp(functions_version): + if functions_version is not None: + return '~{}'.format(functions_version) + return '~2' + + +def _get_linux_fx_functionapp(functions_version, runtime, runtime_version): + if runtime_version is None: + runtime_version = FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION[functions_version][runtime] + if runtime == 'dotnet': + runtime_version = DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION[runtime_version] + else: + runtime = runtime.upper() + return '{}|{}'.format(runtime, runtime_version) + + +def _get_linux_fx_kube_functionapp(runtime, runtime_version): + if runtime.upper() == "DOTNET": + runtime = "DOTNETCORE" + return '{}|{}'.format(runtime.upper(), runtime_version) + + +def _get_website_node_version_functionapp(functions_version, runtime, runtime_version): + if runtime is None or runtime != 'node': + return FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION[functions_version] + if runtime_version is not None: + return '~{}'.format(runtime_version) + return FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION[functions_version] + + +def _get_java_version_functionapp(functions_version, runtime_version): + if runtime_version is None: + runtime_version = FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION[functions_version]['java'] + if runtime_version == '8': + return '1.8' + return runtime_version + + +def _validate_and_get_connection_string(cli_ctx, resource_group_name, storage_account): + sa_resource_group = resource_group_name + if is_valid_resource_id(storage_account): + sa_resource_group = parse_resource_id(storage_account)['resource_group'] + storage_account = parse_resource_id(storage_account)['name'] + storage_client = get_mgmt_service_client(cli_ctx, StorageManagementClient) + storage_properties = storage_client.storage_accounts.get_properties(sa_resource_group, + storage_account) + error_message = '' + endpoints = storage_properties.primary_endpoints + sku = storage_properties.sku.name + allowed_storage_types = ['Standard_GRS', 'Standard_RAGRS', 'Standard_LRS', 'Standard_ZRS', 'Premium_LRS'] + + for e in ['blob', 'queue', 'table']: + if not getattr(endpoints, e, None): + error_message = "Storage account '{}' has no '{}' endpoint. It must have table, queue, and blob endpoints all enabled".format(storage_account, e) # pylint: disable=line-too-long + if sku not in allowed_storage_types: + error_message += 'Storage type {} is not allowed'.format(sku) + + if error_message: + raise CLIError(error_message) + + obj = storage_client.storage_accounts.list_keys(sa_resource_group, storage_account) # pylint: disable=no-member + try: + keys = [obj.keys[0].value, obj.keys[1].value] # pylint: disable=no-member + except AttributeError: + # Older API versions have a slightly different structure + keys = [obj.key1, obj.key2] # pylint: disable=no-member + + endpoint_suffix = cli_ctx.cloud.suffixes.storage_endpoint + connection_string = 'DefaultEndpointsProtocol={};EndpointSuffix={};AccountName={};AccountKey={}'.format( + "https", + endpoint_suffix, + storage_account, + keys[0]) # pylint: disable=no-member + + return connection_string + + +def _format_fx_version(custom_image_name, container_config_type=None): + fx_version = custom_image_name.strip() + fx_version_lower = fx_version.lower() + # handles case of only spaces + if fx_version: + if container_config_type: + fx_version = '{}|{}'.format(container_config_type, custom_image_name) + elif not fx_version_lower.startswith('docker|'): + fx_version = '{}|{}'.format('DOCKER', custom_image_name) + else: + fx_version = ' ' + return fx_version + + +def _set_remote_or_local_git(cmd, webapp, resource_group_name, name, deployment_source_url=None, + deployment_source_branch='master', deployment_local_git=None): + if deployment_source_url: + logger.warning("Linking to git repository '%s'", deployment_source_url) + try: + config_source_control(cmd, resource_group_name, name, deployment_source_url, 'git', + deployment_source_branch, manual_integration=True) + except Exception as ex: # pylint: disable=broad-except + ex = ex_handler_factory(no_throw=True)(ex) + logger.warning("Link to git repository failed due to error '%s'", ex) + + if deployment_local_git: + local_git_info = enable_local_git(cmd, resource_group_name, name) + logger.warning("Local git is configured with url of '%s'", local_git_info['url']) + setattr(webapp, 'deploymentLocalGitUrl', local_git_info['url']) + + +def _get_acr_cred(cli_ctx, registry_name): + from azure.mgmt.containerregistry import ContainerRegistryManagementClient + from azure.cli.core.commands.parameters import get_resources_in_subscription + client = get_mgmt_service_client(cli_ctx, ContainerRegistryManagementClient).registries + + result = get_resources_in_subscription(cli_ctx, 'Microsoft.ContainerRegistry/registries') + result = [item for item in result if item.name.lower() == registry_name] + if not result or len(result) > 1: + raise CLIError("No resource or more than one were found with name '{}'.".format(registry_name)) + resource_group_name = parse_resource_id(result[0].id)['resource_group'] + + registry = client.get(resource_group_name, registry_name) + + if registry.admin_user_enabled: # pylint: disable=no-member + cred = client.list_credentials(resource_group_name, registry_name) + return cred.username, cred.passwords[0].value + raise CLIError("Failed to retrieve container registry credentials. Please either provide the " + "credentials or run 'az acr update -n {} --admin-enabled true' to enable " + "admin first.".format(registry_name)) + + +def _add_fx_version(cmd, resource_group_name, name, custom_image_name, slot=None): + fx_version = _format_fx_version(custom_image_name) + web_app = get_webapp(cmd, resource_group_name, name, slot) + linux_fx = fx_version if web_app.reserved else None + windows_fx = fx_version if web_app.is_xenon else None + return update_site_configs(cmd, resource_group_name, name, + linux_fx_version=linux_fx, windows_fx_version=windows_fx, slot=slot) + + +def _get_fx_version(cmd, resource_group_name, name, slot=None): + site_config = get_site_configs(cmd, resource_group_name, name, slot) + return site_config.linux_fx_version or site_config.windows_fx_version or '' + + +def _ssl_context(): + if sys.version_info < (3, 4) or (in_cloud_console() and platform.system() == 'Windows'): + try: + return ssl.SSLContext(ssl.PROTOCOL_TLS) # added in python 2.7.13 and 3.6 + except AttributeError: + return ssl.SSLContext(ssl.PROTOCOL_TLSv1) + + return ssl.create_default_context() + + +def _get_linux_multicontainer_encoded_config_from_file(file_name): + from base64 import b64encode + config_file_bytes = None + if url_validator(file_name): + response = urlopen(file_name, context=_ssl_context()) + config_file_bytes = response.read() + else: + with open(file_name, 'rb') as f: + config_file_bytes = f.read() + # Decode base64 encoded byte array into string + return b64encode(config_file_bytes).decode('utf-8') + + +def _get_linux_multicontainer_decoded_config(cmd, resource_group_name, name, slot=None): + from base64 import b64decode + linux_fx_version = _get_fx_version(cmd, resource_group_name, name, slot) + if not any([linux_fx_version.startswith(s) for s in MULTI_CONTAINER_TYPES]): + raise CLIError("Cannot decode config that is not one of the" + " following types: {}".format(','.join(MULTI_CONTAINER_TYPES))) + return b64decode(linux_fx_version.split('|')[1].encode('utf-8')) + + +# TODO: remove this when #3660(service tracking issue) is resolved +def _mask_creds_related_appsettings(settings): + for x in [x1 for x1 in settings if x1 in APPSETTINGS_TO_MASK]: + settings[x] = None + return settings + + +def _filter_for_container_settings(cmd, resource_group_name, name, settings, + show_multicontainer_config=None, slot=None): + result = [x for x in settings if x['name'] in CONTAINER_APPSETTING_NAMES] + fx_version = _get_fx_version(cmd, resource_group_name, name, slot).strip() + if fx_version: + added_image_name = {'name': 'DOCKER_CUSTOM_IMAGE_NAME', + 'value': fx_version} + result.append(added_image_name) + if show_multicontainer_config: + decoded_value = _get_linux_multicontainer_decoded_config(cmd, resource_group_name, name, slot) + decoded_image_name = {'name': 'DOCKER_CUSTOM_IMAGE_NAME_DECODED', + 'value': decoded_value} + result.append(decoded_image_name) + return result + + +def _generic_settings_operation(cli_ctx, resource_group_name, name, operation_name, + setting_properties, slot=None, client=None): + client = client or web_client_factory(cli_ctx) + operation = getattr(client.web_apps, operation_name if slot is None else operation_name + '_slot') + if slot is None: + return operation(resource_group_name, name, str, setting_properties) + + return operation(resource_group_name, name, slot, str, setting_properties) + + +def _build_app_settings_output(app_settings, slot_cfg_names): + slot_cfg_names = slot_cfg_names or [] + return [{'name': p, + 'value': app_settings[p], + 'slotSetting': p in slot_cfg_names} for p in _mask_creds_related_appsettings(app_settings)] + + +def _rename_server_farm_props(webapp): + # Should be renamed in SDK in a future release + setattr(webapp, 'app_service_plan_id', webapp.server_farm_id) + del webapp.server_farm_id + return webapp + + +def _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot=None): + profiles = list_publish_profiles(cmd, resource_group_name, name, slot) + url = next(p['publishUrl'] for p in profiles if p['publishMethod'] == 'FTP') + setattr(webapp, 'ftpPublishingUrl', url) + return webapp + + +# help class handles runtime stack in format like 'node|6.1', 'php|5.5' +class _StackRuntimeHelper(object): + + def __init__(self, cmd, client, linux=False): + self._cmd = cmd + self._client = client + self._linux = linux + self._stacks = [] + + def resolve(self, display_name): + self._load_stacks() + return next((s for s in self._stacks if s['displayName'].lower() == display_name.lower()), + None) + + @property + def stacks(self): + self._load_stacks() + return self._stacks + + @staticmethod + def update_site_config(stack, site_config, cmd=None): + for k, v in stack['configs'].items(): + setattr(site_config, k, v) + return site_config + + @staticmethod + def update_site_appsettings(cmd, stack, site_config): + NameValuePair = cmd.get_models('NameValuePair') + if site_config.app_settings is None: + site_config.app_settings = [] + site_config.app_settings += [NameValuePair(name=k, value=v) for k, v in stack['configs'].items()] + return site_config + + def _load_stacks(self): + if self._stacks: + return + os_type = ('Linux' if self._linux else 'Windows') + raw_stacks = self._client.provider.get_available_stacks(os_type_selected=os_type, raw=True) + bytes_value = raw_stacks._get_next().content # pylint: disable=protected-access + json_value = bytes_value.decode('utf8') + json_stacks = json.loads(json_value) + stacks = json_stacks['value'] + result = [] + if self._linux: + for properties in [(s['properties']) for s in stacks]: + for major in properties['majorVersions']: + default_minor = next((m for m in (major['minorVersions'] or []) if m['isDefault']), + None) + result.append({ + 'displayName': (default_minor['runtimeVersion'] + if default_minor else major['runtimeVersion']) + }) + else: # Windows stacks + config_mappings = { + 'node': 'WEBSITE_NODE_DEFAULT_VERSION', + 'python': 'python_version', + 'php': 'php_version', + 'aspnet': 'net_framework_version' + } + + # get all stack version except 'java' + for stack in stacks: + if stack['name'] not in config_mappings: + continue + name, properties = stack['name'], stack['properties'] + for major in properties['majorVersions']: + default_minor = next((m for m in (major['minorVersions'] or []) if m['isDefault']), + None) + result.append({ + 'displayName': name + '|' + major['displayVersion'], + 'configs': { + config_mappings[name]: (default_minor['runtimeVersion'] + if default_minor else major['runtimeVersion']) + } + }) + + # deal with java, which pairs with java container version + java_stack = next((s for s in stacks if s['name'] == 'java')) + java_container_stack = next((s for s in stacks if s['name'] == 'javaContainers')) + for java_version in java_stack['properties']['majorVersions']: + for fx in java_container_stack['properties']['frameworks']: + for fx_version in fx['majorVersions']: + result.append({ + 'displayName': 'java|{}|{}|{}'.format(java_version['displayVersion'], + fx['display'], + fx_version['displayVersion']), + 'configs': { + 'java_version': java_version['runtimeVersion'], + 'java_container': fx['name'], + 'java_container_version': fx_version['runtimeVersion'] + } + }) + + for r in result: + r['setter'] = (_StackRuntimeHelper.update_site_appsettings if 'node' in + r['displayName'] else _StackRuntimeHelper.update_site_config) + self._stacks = result diff --git a/src/appservice-kube/azext_appservice_kube/tests/__init__.py b/src/appservice-kube/azext_appservice_kube/tests/__init__.py new file mode 100644 index 00000000000..99c0f28cd71 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/tests/__init__.py @@ -0,0 +1,5 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- diff --git a/src/appservice-kube/azext_appservice_kube/tests/latest/__init__.py b/src/appservice-kube/azext_appservice_kube/tests/latest/__init__.py new file mode 100644 index 00000000000..99c0f28cd71 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/tests/latest/__init__.py @@ -0,0 +1,5 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- diff --git a/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py b/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py new file mode 100644 index 00000000000..dcb56ccb2f0 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py @@ -0,0 +1,48 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import unittest + +from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, RoleBasedServicePrincipalPreparer) + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +class AppserviceKubernetesScenarioTest(ScenarioTest): + @AllowLargeResponse() + @ResourceGroupPreparer(location='North Central US (Stage)') + @RoleBasedServicePrincipalPreparer() + def test_kube_environment_create(self, resource_group, sp_name, sp_password): + kube_env_name = self.create_random_name('kube_env_test', 16) + + self.kwargs.update({ + 'name': kube_env_name + }) + + create_cmd = 'appservice kube create -g {rg} -n {name} ' \ + '--client-id {sp} --client-secret {sp_pass}' + + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('name', '{name}'), + self.check('servicePrincipalClientId', '{sp}') + ]) + + count = len(self.cmd('appservice kube list -g {rg}').get_output_in_json()) + + self.cmd('appservice kube show -g {rg} -n {name}', checks=[ + self.check('name', '{name}'), + self.check('resourceGroup', '{rg}'), + self.check('servicePrincipalClientId', '{sp}') + ]) + + self.cmd('appservice-kube delete -g {rg} -n {name}') + + final_count = len(self.cmd('appservice-kube list').get_output_in_json()) + + self.assertTrue(final_count, count - 1) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/__init__.py new file mode 100644 index 00000000000..a5b81f3bde4 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +__import__('pkg_resources').declare_namespace(__name__) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py new file mode 100644 index 00000000000..a748425a4eb --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py @@ -0,0 +1,653 @@ +# 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 msrest import Serializer, Deserializer + + +class WebSiteManagementClientOperationsMixin(object): + + + def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): + """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. 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.v2019_08_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceNameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('check_name_availability') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.check_name_availability(name, type, is_fqdn, custom_headers, raw, **operation_config) + + def get_publishing_user(self, custom_headers=None, raw=False, **operation_config): + """Gets publishing user. + + Description for Gets publishing user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('get_publishing_user') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.get_publishing_user(custom_headers, raw, **operation_config) + + def get_source_control(self, source_control_type, custom_headers=None, raw=False, **operation_config): + """Gets source control token. + + Description for Gets source control token. + + :param source_control_type: Type of source control + :type source_control_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('get_source_control') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.get_source_control(source_control_type, custom_headers, raw, **operation_config) + + def get_subscription_deployment_locations(self, custom_headers=None, raw=False, **operation_config): + """Gets list of available geo regions plus ministamps. + + Description for Gets list of available geo regions plus ministamps. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentLocations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('get_subscription_deployment_locations') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.get_subscription_deployment_locations(custom_headers, raw, **operation_config) + + def list_billing_meters(self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BillingMeter + :rtype: + ~azure.mgmt.web.v2019_08_01.models.BillingMeterPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeter] + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('list_billing_meters') + if api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.list_billing_meters(billing_location, os_type, custom_headers, raw, **operation_config) + + def list_geo_regions(self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values + include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', + 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + :type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName + :param linux_workers_enabled: Specify true if you want to + filter to only regions that support Linux workers. + :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify true if you want to + filter to only regions that support Xenon workers. + :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify true if you + want to filter to only regions that support Linux Consumption Workers. + :type linux_dynamic_workers_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GeoRegion + :rtype: + ~azure.mgmt.web.v2019_08_01.models.GeoRegionPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegion] + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('list_geo_regions') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.list_geo_regions(sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled, custom_headers, raw, **operation_config) + + def list_premier_add_on_offers(self, custom_headers=None, raw=False, **operation_config): + """List all premier add-on offers. + + Description for List all premier add-on offers. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PremierAddOnOffer + :rtype: + ~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOffer] + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('list_premier_add_on_offers') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.list_premier_add_on_offers(custom_headers, raw, **operation_config) + + def list_site_identifiers_assigned_to_host_name(self, name=None, custom_headers=None, raw=False, **operation_config): + """List all apps that are assigned to a hostname. + + Description for List all apps that are assigned to a hostname. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2019_08_01.models.IdentifierPaged[~azure.mgmt.web.v2019_08_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('list_site_identifiers_assigned_to_host_name') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.list_site_identifiers_assigned_to_host_name(name, custom_headers, raw, **operation_config) + + def list_skus(self, custom_headers=None, raw=False, **operation_config): + """List all SKUs. + + Description for List all SKUs. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SkuInfos or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('list_skus') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.list_skus(custom_headers, raw, **operation_config) + + def list_source_controls(self, custom_headers=None, raw=False, **operation_config): + """Gets the source controls available for Azure websites. + + Description for Gets the source controls available for Azure websites. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SourceControlPaged[~azure.mgmt.web.v2019_08_01.models.SourceControl] + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('list_source_controls') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.list_source_controls(custom_headers, raw, **operation_config) + + def move(self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('move') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.move(resource_group_name, target_resource_group, resources, custom_headers, raw, **operation_config) + + def update_publishing_user(self, user_details, custom_headers=None, raw=False, **operation_config): + """Updates publishing user. + + Description for Updates publishing user. + + :param user_details: Details of publishing user + :type user_details: ~azure.mgmt.web.v2019_08_01.models.User + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('update_publishing_user') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.update_publishing_user(user_details, custom_headers, raw, **operation_config) + + def update_source_control(self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('update_source_control') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.update_source_control(source_control_type, request_message, custom_headers, raw, **operation_config) + + def validate(self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.ValidateRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('validate') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.validate(resource_group_name, validate_request, custom_headers, raw, **operation_config) + + def validate_container_settings(self, validate_container_settings_request, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Validate if the container settings are correct. + + Validate if the container settings are correct. + + :param validate_container_settings_request: + :type validate_container_settings_request: + ~azure.mgmt.web.v2018_02_01.models.ValidateContainerSettingsRequest + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('validate_container_settings') + if api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.validate_container_settings(validate_container_settings_request, resource_group_name, custom_headers, raw, **operation_config) + + def validate_move(self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('validate_move') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.validate_move(resource_group_name, target_resource_group, resources, custom_headers, raw, **operation_config) + + def verify_hosting_environment_vnet(self, parameters, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetValidationFailureDetails or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + api_version = self._get_api_version('verify_hosting_environment_vnet') + if api_version == '2016-03-01': + from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.verify_hosting_environment_vnet(parameters, custom_headers, raw, **operation_config) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py new file mode 100644 index 00000000000..adbb949b12a --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py @@ -0,0 +1,418 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin +from ._configuration import WebSiteManagementClientConfiguration +from ._operations_mixin import WebSiteManagementClientOperationsMixin + + +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiClientMixin, SDKClient): + """WebSite Management Client + + This ready contains multiple API versions, to help you deal with all Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, uses latest API version available on public Azure. + For production, you should stick a particular api-version and/or profile. + The profile sets a mapping between the operation group and an API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :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 profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + """ + + DEFAULT_API_VERSION = '2019-08-01' + _PROFILE_TAG = "azure.mgmt.web.WebSiteManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + 'billing_meters': '2016-03-01', + 'validate_container_settings': '2018-02-01', + }}, + _PROFILE_TAG + " latest" + ) + + def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default): + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__( + credentials, + self.config, + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2015-04-01: :mod:`v2015_04_01.models` + * 2015-08-01: :mod:`v2015_08_01.models` + * 2016-03-01: :mod:`v2016_03_01.models` + * 2016-08-01: :mod:`v2016_08_01.models` + * 2016-09-01: :mod:`v2016_09_01.models` + * 2018-02-01: :mod:`v2018_02_01.models` + * 2018-11-01: :mod:`v2018_11_01.models` + * 2019-08-01: :mod:`v2019_08_01.models` + """ + if api_version == '2015-04-01': + from .v2015_04_01 import models + return models + elif api_version == '2015-08-01': + from .v2015_08_01 import models + return models + elif api_version == '2016-03-01': + from .v2016_03_01 import models + return models + elif api_version == '2016-08-01': + from .v2016_08_01 import models + return models + elif api_version == '2016-09-01': + from .v2016_09_01 import models + return models + elif api_version == '2018-02-01': + from .v2018_02_01 import models + return models + elif api_version == '2018-11-01': + from .v2018_11_01 import models + return models + elif api_version == '2019-08-01': + from .v2019_08_01 import models + return models + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + + @property + def app_service_certificate_orders(self): + """Instance depends on the API version: + + * 2015-08-01: :class:`AppServiceCertificateOrdersOperations` + * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` + * 2019-08-01: :class:`AppServiceCertificateOrdersOperations` + """ + api_version = self._get_api_version('app_service_certificate_orders') + if api_version == '2015-08-01': + from .v2015_08_01.operations import AppServiceCertificateOrdersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import AppServiceCertificateOrdersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AppServiceCertificateOrdersOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def app_service_environments(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`AppServiceEnvironmentsOperations` + * 2018-02-01: :class:`AppServiceEnvironmentsOperations` + * 2019-08-01: :class:`AppServiceEnvironmentsOperations` + """ + api_version = self._get_api_version('app_service_environments') + if api_version == '2016-09-01': + from .v2016_09_01.operations import AppServiceEnvironmentsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import AppServiceEnvironmentsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AppServiceEnvironmentsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def app_service_plans(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`AppServicePlansOperations` + * 2018-02-01: :class:`AppServicePlansOperations` + * 2019-08-01: :class:`AppServicePlansOperations` + """ + api_version = self._get_api_version('app_service_plans') + if api_version == '2016-09-01': + from .v2016_09_01.operations import AppServicePlansOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import AppServicePlansOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AppServicePlansOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def billing_meters(self): + """Instance depends on the API version: + + * 2016-03-01: :class:`BillingMetersOperations` + """ + api_version = self._get_api_version('billing_meters') + if api_version == '2016-03-01': + from .v2016_03_01.operations import BillingMetersOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".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: + + * 2015-08-01: :class:`CertificateRegistrationProviderOperations` + * 2018-02-01: :class:`CertificateRegistrationProviderOperations` + * 2019-08-01: :class:`CertificateRegistrationProviderOperations` + """ + api_version = self._get_api_version('certificate_registration_provider') + if api_version == '2015-08-01': + from .v2015_08_01.operations import CertificateRegistrationProviderOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import CertificateRegistrationProviderOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import CertificateRegistrationProviderOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def certificates(self): + """Instance depends on the API version: + + * 2016-03-01: :class:`CertificatesOperations` + * 2018-02-01: :class:`CertificatesOperations` + * 2018-11-01: :class:`CertificatesOperations` + * 2019-08-01: :class:`CertificatesOperations` + """ + api_version = self._get_api_version('certificates') + if api_version == '2016-03-01': + from .v2016_03_01.operations import CertificatesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import CertificatesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import CertificatesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import CertificatesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def deleted_web_apps(self): + """Instance depends on the API version: + + * 2016-03-01: :class:`DeletedWebAppsOperations` + * 2018-02-01: :class:`DeletedWebAppsOperations` + * 2019-08-01: :class:`DeletedWebAppsOperations` + """ + api_version = self._get_api_version('deleted_web_apps') + if api_version == '2016-03-01': + from .v2016_03_01.operations import DeletedWebAppsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import DeletedWebAppsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DeletedWebAppsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def diagnostics(self): + """Instance depends on the API version: + + * 2016-03-01: :class:`DiagnosticsOperations` + * 2018-02-01: :class:`DiagnosticsOperations` + * 2019-08-01: :class:`DiagnosticsOperations` + """ + api_version = self._get_api_version('diagnostics') + if api_version == '2016-03-01': + from .v2016_03_01.operations import DiagnosticsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import DiagnosticsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DiagnosticsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def domain_registration_provider(self): + """Instance depends on the API version: + + * 2015-04-01: :class:`DomainRegistrationProviderOperations` + * 2018-02-01: :class:`DomainRegistrationProviderOperations` + * 2019-08-01: :class:`DomainRegistrationProviderOperations` + """ + api_version = self._get_api_version('domain_registration_provider') + if api_version == '2015-04-01': + from .v2015_04_01.operations import DomainRegistrationProviderOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import DomainRegistrationProviderOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DomainRegistrationProviderOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def domains(self): + """Instance depends on the API version: + + * 2015-04-01: :class:`DomainsOperations` + * 2018-02-01: :class:`DomainsOperations` + * 2019-08-01: :class:`DomainsOperations` + """ + api_version = self._get_api_version('domains') + if api_version == '2015-04-01': + from .v2015_04_01.operations import DomainsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import DomainsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DomainsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def kube_environments(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`KubeEnvironmentsOperations` + """ + api_version = self._get_api_version('kube_environments') + if api_version == '2019-08-01': + from .v2019_08_01.operations import KubeEnvironmentsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".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: + + * 2016-03-01: :class:`ProviderOperations` + * 2018-02-01: :class:`ProviderOperations` + * 2019-08-01: :class:`ProviderOperations` + """ + api_version = self._get_api_version('provider') + if api_version == '2016-03-01': + from .v2016_03_01.operations import ProviderOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ProviderOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ProviderOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def recommendations(self): + """Instance depends on the API version: + + * 2016-03-01: :class:`RecommendationsOperations` + * 2018-02-01: :class:`RecommendationsOperations` + * 2019-08-01: :class:`RecommendationsOperations` + """ + api_version = self._get_api_version('recommendations') + if api_version == '2016-03-01': + from .v2016_03_01.operations import RecommendationsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RecommendationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RecommendationsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def resource_health_metadata(self): + """Instance depends on the API version: + + * 2016-03-01: :class:`ResourceHealthMetadataOperations` + * 2018-02-01: :class:`ResourceHealthMetadataOperations` + * 2019-08-01: :class:`ResourceHealthMetadataOperations` + """ + api_version = self._get_api_version('resource_health_metadata') + if api_version == '2016-03-01': + from .v2016_03_01.operations import ResourceHealthMetadataOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ResourceHealthMetadataOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ResourceHealthMetadataOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def static_sites(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`StaticSitesOperations` + """ + api_version = self._get_api_version('static_sites') + if api_version == '2019-08-01': + from .v2019_08_01.operations import StaticSitesOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def top_level_domains(self): + """Instance depends on the API version: + + * 2015-04-01: :class:`TopLevelDomainsOperations` + * 2018-02-01: :class:`TopLevelDomainsOperations` + * 2019-08-01: :class:`TopLevelDomainsOperations` + """ + api_version = self._get_api_version('top_level_domains') + if api_version == '2015-04-01': + from .v2015_04_01.operations import TopLevelDomainsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import TopLevelDomainsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import TopLevelDomainsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def web_apps(self): + """Instance depends on the API version: + + * 2016-08-01: :class:`WebAppsOperations` + * 2018-02-01: :class:`WebAppsOperations` + * 2019-08-01: :class:`WebAppsOperations` + """ + api_version = self._get_api_version('web_apps') + if api_version == '2016-08-01': + from .v2016_08_01.operations import WebAppsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import WebAppsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebAppsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py new file mode 100644 index 00000000000..f7ccf42a355 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.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. +# -------------------------------------------------------------------------- +from .v2016_03_01.models import * +from .v2018_02_01.models import * +from .v2019_08_01.models import * diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_web_site_management_client.py new file mode 100644 index 00000000000..2095c1d25e5 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_web_site_management_client.py @@ -0,0 +1,60 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import DomainsOperations +from .operations import TopLevelDomainsOperations +from .operations import DomainRegistrationProviderOperations +from . import models + + +class WebSiteManagementClient(SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar domains: Domains operations + :vartype domains: azure.mgmt.web.v2015_04_01.operations.DomainsOperations + :ivar top_level_domains: TopLevelDomains operations + :vartype top_level_domains: azure.mgmt.web.v2015_04_01.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProvider operations + :vartype domain_registration_provider: azure.mgmt.web.v2015_04_01.operations.DomainRegistrationProviderOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + 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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/__init__.py new file mode 100644 index 00000000000..fe5a475ae20 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/__init__.py @@ -0,0 +1,271 @@ +# 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 Address + from ._models_py3 import ApiDefinitionInfo + from ._models_py3 import AppServicePlan + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import Capability + from ._models_py3 import CloningInfo + from ._models_py3 import ConnStringInfo + from ._models_py3 import Contact + from ._models_py3 import CorsSettings + from ._models_py3 import CsmOperationDescription + from ._models_py3 import CsmOperationDescriptionProperties + from ._models_py3 import CsmOperationDisplay + from ._models_py3 import Dimension + from ._models_py3 import Domain + from ._models_py3 import DomainAvailablilityCheckResult + from ._models_py3 import DomainControlCenterSsoRequest + from ._models_py3 import DomainOwnershipIdentifier + from ._models_py3 import DomainPatchResource + from ._models_py3 import DomainPurchaseConsent + from ._models_py3 import DomainRecommendationSearchParameters + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Experiments + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostName + from ._models_py3 import HostNameSslState + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import Identifier + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricSpecification + from ._models_py3 import NameIdentifier + from ._models_py3 import NameValuePair + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceMetricName + from ._models_py3 import ServiceSpecification + from ._models_py3 import Site + from ._models_py3 import SiteConfig + from ._models_py3 import SiteLimits + from ._models_py3 import SiteMachineKey + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuDescription + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import SnapshotRecoveryRequest + from ._models_py3 import SnapshotRecoveryTarget + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import TldLegalAgreement + from ._models_py3 import TopLevelDomain + from ._models_py3 import TopLevelDomainAgreementOption + from ._models_py3 import User + from ._models_py3 import VirtualApplication + from ._models_py3 import VirtualDirectory + from ._models_py3 import VnetGateway + from ._models_py3 import VnetInfo + from ._models_py3 import VnetRoute +except (SyntaxError, ImportError): + from ._models import Address + from ._models import ApiDefinitionInfo + from ._models import AppServicePlan + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import Capability + from ._models import CloningInfo + from ._models import ConnStringInfo + from ._models import Contact + from ._models import CorsSettings + from ._models import CsmOperationDescription + from ._models import CsmOperationDescriptionProperties + from ._models import CsmOperationDisplay + from ._models import Dimension + from ._models import Domain + from ._models import DomainAvailablilityCheckResult + from ._models import DomainControlCenterSsoRequest + from ._models import DomainOwnershipIdentifier + from ._models import DomainPatchResource + from ._models import DomainPurchaseConsent + from ._models import DomainRecommendationSearchParameters + from ._models import ErrorResponse, ErrorResponseException + from ._models import Experiments + from ._models import HandlerMapping + from ._models import HostingEnvironmentProfile + from ._models import HostName + from ._models import HostNameSslState + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import Identifier + from ._models import IpSecurityRestriction + from ._models import ManagedServiceIdentity + from ._models import MetricAvailability + from ._models import MetricSpecification + from ._models import NameIdentifier + from ._models import NameValuePair + from ._models import ProxyOnlyResource + from ._models import PushSettings + from ._models import RampUpRule + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceMetricName + from ._models import ServiceSpecification + from ._models import Site + from ._models import SiteConfig + from ._models import SiteLimits + from ._models import SiteMachineKey + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import SnapshotRecoveryRequest + from ._models import SnapshotRecoveryTarget + from ._models import StatusCodesBasedTrigger + from ._models import TldLegalAgreement + from ._models import TopLevelDomain + from ._models import TopLevelDomainAgreementOption + from ._models import User + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetRoute +from ._paged_models import CsmOperationDescriptionPaged +from ._paged_models import DomainOwnershipIdentifierPaged +from ._paged_models import DomainPaged +from ._paged_models import NameIdentifierPaged +from ._paged_models import TldLegalAgreementPaged +from ._paged_models import TopLevelDomainPaged +from ._web_site_management_client_enums import ( + DomainStatus, + ProvisioningState, + AzureResourceType, + CustomHostNameDnsRecordType, + HostNameType, + DnsType, + DomainType, + RouteType, + ManagedServiceIdentityType, + AutoHealActionType, + ConnectionStringType, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + StatusOptions, +) + +__all__ = [ + 'Address', + 'ApiDefinitionInfo', + 'AppServicePlan', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'Capability', + 'CloningInfo', + 'ConnStringInfo', + 'Contact', + 'CorsSettings', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'Dimension', + 'Domain', + 'DomainAvailablilityCheckResult', + 'DomainControlCenterSsoRequest', + 'DomainOwnershipIdentifier', + 'DomainPatchResource', + 'DomainPurchaseConsent', + 'DomainRecommendationSearchParameters', + 'ErrorResponse', 'ErrorResponseException', + 'Experiments', + 'HandlerMapping', + 'HostingEnvironmentProfile', + 'HostName', + 'HostNameSslState', + 'HybridConnection', + 'HybridConnectionKey', + 'Identifier', + 'IpSecurityRestriction', + 'ManagedServiceIdentity', + 'MetricAvailability', + 'MetricSpecification', + 'NameIdentifier', + 'NameValuePair', + 'ProxyOnlyResource', + 'PushSettings', + 'RampUpRule', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceMetricName', + 'ServiceSpecification', + 'Site', + 'SiteConfig', + 'SiteLimits', + 'SiteMachineKey', + 'SkuCapacity', + 'SkuDescription', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'SnapshotRecoveryRequest', + 'SnapshotRecoveryTarget', + 'StatusCodesBasedTrigger', + 'TldLegalAgreement', + 'TopLevelDomain', + 'TopLevelDomainAgreementOption', + 'User', + 'VirtualApplication', + 'VirtualDirectory', + 'VnetGateway', + 'VnetInfo', + 'VnetRoute', + 'DomainPaged', + 'NameIdentifierPaged', + 'DomainOwnershipIdentifierPaged', + 'TopLevelDomainPaged', + 'TldLegalAgreementPaged', + 'CsmOperationDescriptionPaged', + 'DomainStatus', + 'ProvisioningState', + 'AzureResourceType', + 'CustomHostNameDnsRecordType', + 'HostNameType', + 'DnsType', + 'DomainType', + 'RouteType', + 'ManagedServiceIdentityType', + 'AutoHealActionType', + 'ConnectionStringType', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'StatusOptions', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models.py new file mode 100644 index 00000000000..ef083134b52 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models.py @@ -0,0 +1,3126 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Address(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.get('address1', None) + self.address2 = kwargs.get('address2', None) + self.city = kwargs.get('city', None) + self.country = kwargs.get('country', None) + self.postal_code = kwargs.get('postal_code', None) + self.state = kwargs.get('state', None) + + +class ApiDefinitionInfo(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 Resource(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: 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.get('location', None) + self.type = None + self.tags = kwargs.get('tags', None) + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2015_04_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2015_04_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2015_04_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2015_04_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, self).__init__(**kwargs) + self.app_service_plan_name = kwargs.get('app_service_plan_name', None) + self.worker_tier_name = kwargs.get('worker_tier_name', None) + self.status = None + self.subscription = None + self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None + self.is_spot = kwargs.get('is_spot', None) + self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.resource_group = None + self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', None) + + +class AutoHealActions(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.v2015_04_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2015_04_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': 'AutoHealActionType'}, + '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(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(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.v2015_04_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2015_04_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2015_04_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) + + +class Capability(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 CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + 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.get('source_web_app_id', 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) + self.ignore_quotas = kwargs.get('ignore_quotas', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2015_04_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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 Contact(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.v2015_04_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.get('email', None) + self.fax = kwargs.get('fax', None) + self.job_title = kwargs.get('job_title', None) + self.name_first = kwargs.get('name_first', None) + self.name_last = kwargs.get('name_last', None) + self.name_middle = kwargs.get('name_middle', None) + self.organization = kwargs.get('organization', None) + self.phone = kwargs.get('phone', None) + + +class CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2015_04_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2015_04_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(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2015_04_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(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 Dimension(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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2015_04_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.v2015_04_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.v2015_04_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2015_04_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2015_04_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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 DomainAvailablilityCheckResult(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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.v2015_04_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + def __init__(self, **kwargs): + super(DomainAvailablilityCheckResult, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.available = kwargs.get('available', None) + self.domain_type = kwargs.get('domain_type', None) + + +class DomainControlCenterSsoRequest(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 ProxyOnlyResource(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 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 DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2015_04_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.v2015_04_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.v2015_04_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2015_04_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2015_04_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(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 + 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 + """ + + _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(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 ErrorResponse(Model): + """Error Response. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Experiments(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2015_04_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 HandlerMapping(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 HostingEnvironmentProfile(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 HostName(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.v2015_04_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.v2015_04_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.v2015_04_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + 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 HostNameSslState(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.v2015_04_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 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.v2015_04_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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 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 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 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identifier, self).__init__(**kwargs) + self.identifier_id = kwargs.get('identifier_id', None) + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', '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) + + +class ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2015_04_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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.tenant_id = None + self.principal_id = None + + +class MetricAvailability(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(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.v2015_04_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2015_04_01.models.MetricAvailability] + """ + + _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]'}, + } + + 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) + + +class NameIdentifier(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 NameValuePair(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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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 RequestsBasedTrigger(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 ResourceMetricAvailability(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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2015_04_01.models.ResourceMetricName + :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.v2015_04_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricDefinition, self).__init__(**kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2015_04_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_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: Resource tags. + :type tags: dict[str, str] + :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.v2015_04_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2015_04_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.v2015_04_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2015_04_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2015_04_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2015_04_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2015_04_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2015_04_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2015_04_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = kwargs.get('https_only', None) + self.identity = kwargs.get('identity', None) + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2015_04_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2015_04_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2015_04_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2015_04_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' + :type scm_type: str or ~azure.mgmt.web.v2015_04_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2015_04_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2015_04_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2015_04_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2015_04_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2015_04_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2015_04_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2015_04_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2015_04_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2015_04_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2015_04_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2015_04_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) + self.http20_enabled = kwargs.get('http20_enabled', True) + self.min_tls_version = kwargs.get('min_tls_version', None) + + +class SiteLimits(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 SiteMachineKey(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 SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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.v2015_04_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.v2015_04_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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2015_04_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SnapshotRecoveryRequest, self).__init__(**kwargs) + self.snapshot_time = kwargs.get('snapshot_time', None) + self.recovery_target = kwargs.get('recovery_target', 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) + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.id = kwargs.get('id', None) + + +class StatusCodesBasedTrigger(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 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class TldLegalAgreement(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.get('agreement_key', None) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) + self.url = kwargs.get('url', 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 + :ivar domain_name: Name of the top level domain. + :vartype domain_name: str + :param privacy: If true, then the top level domain supports + domain privacy; otherwise, false. + :type privacy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_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'}, + 'domain_name': {'key': 'properties.name', 'type': 'str'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(TopLevelDomain, self).__init__(**kwargs) + self.domain_name = None + self.privacy = kwargs.get('privacy', None) + + +class TopLevelDomainAgreementOption(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + 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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + 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) + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2015_04_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(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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2015_04_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + 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) + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2015_04_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'}, + 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) + self.start_address = kwargs.get('start_address', None) + self.end_address = kwargs.get('end_address', None) + self.route_type = kwargs.get('route_type', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models_py3.py new file mode 100644 index 00000000000..dd0eb24ec94 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models_py3.py @@ -0,0 +1,3126 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Address(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: str=None, **kwargs) -> None: + 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 ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class Resource(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: 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: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.location = location + self.type = None + self.tags = tags + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2015_04_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2015_04_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2015_04_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2015_04_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_plan_name = app_service_plan_name + self.worker_tier_name = worker_tier_name + self.status = None + self.subscription = None + self.admin_site_name = admin_site_name + 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.number_of_sites = None + self.is_spot = is_spot + self.spot_expiration_time = spot_expiration_time + self.resource_group = None + self.reserved = reserved + self.target_worker_count = target_worker_count + self.target_worker_size_id = target_worker_size_id + self.provisioning_state = None + self.sku = sku + + +class AutoHealActions(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.v2015_04_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2015_04_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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.v2015_04_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2015_04_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2015_04_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + super(Capability, self).__init__(**kwargs) + self.name = name + self.value = value + self.reason = reason + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: + 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.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 + self.ignore_quotas = ignore_quotas + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2015_04_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class Contact(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.v2015_04_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: + 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 CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2015_04_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2015_04_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2015_04_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(CsmOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Dimension(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2015_04_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.v2015_04_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.v2015_04_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2015_04_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2015_04_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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 DomainAvailablilityCheckResult(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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.v2015_04_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: + super(DomainAvailablilityCheckResult, self).__init__(**kwargs) + self.name = name + self.available = available + self.domain_type = domain_type + + +class DomainControlCenterSsoRequest(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) -> None: + super(DomainControlCenterSsoRequest, self).__init__(**kwargs) + self.url = None + self.post_parameter_key = None + self.post_parameter_value = None + + +class ProxyOnlyResource(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: str=None, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = 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: str=None, ownership_id: str=None, **kwargs) -> None: + super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) + self.ownership_id = ownership_id + + +class DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2015_04_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2015_04_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.v2015_04_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.v2015_04_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2015_04_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2015_04_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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(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 + 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 + """ + + _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: + super(DomainPurchaseConsent, self).__init__(**kwargs) + self.agreement_keys = agreement_keys + self.agreed_by = agreed_by + self.agreed_at = agreed_at + + +class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: + super(DomainRecommendationSearchParameters, self).__init__(**kwargs) + self.keywords = keywords + self.max_domain_recommendations = max_domain_recommendations + + +class ErrorResponse(Model): + """Error Response. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Experiments(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2015_04_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostName(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.v2015_04_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.v2015_04_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.v2015_04_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: + 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 HostNameSslState(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.v2015_04_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 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.v2015_04_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) + self.send_key_name = None + self.send_key_value = 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.identifier_id = identifier_id + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: + super(IpSecurityRestriction, self).__init__(**kwargs) + self.ip_address = ip_address + self.subnet_mask = subnet_mask + + +class ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2015_04_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 + """ + + _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'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + + +class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricSpecification(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.v2015_04_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2015_04_01.models.MetricAvailability] + """ + + _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]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, **kwargs) -> None: + 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 + + +class NameIdentifier(Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +class ResourceMetricAvailability(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) -> None: + 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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2015_04_01.models.ResourceMetricName + :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.v2015_04_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2015_04_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_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: Resource tags. + :type tags: dict[str, str] + :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.v2015_04_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2015_04_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.v2015_04_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2015_04_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2015_04_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2015_04_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2015_04_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2015_04_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2015_04_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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.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.host_names_disabled = host_names_disabled + 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.snapshot_info = snapshot_info + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = https_only + self.identity = identity + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2015_04_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2015_04_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2015_04_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2015_04_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' + :type scm_type: str or ~azure.mgmt.web.v2015_04_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2015_04_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2015_04_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2015_04_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2015_04_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2015_04_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2015_04_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2015_04_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2015_04_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2015_04_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2015_04_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2015_04_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: + 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.linux_fx_version = linux_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.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.cors = cors + self.push = push + self.api_definition = api_definition + self.auto_swap_slot_name = auto_swap_slot_name + self.local_my_sql_enabled = local_my_sql_enabled + self.ip_security_restrictions = ip_security_restrictions + self.http20_enabled = http20_enabled + self.min_tls_version = min_tls_version + + +class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + super(SiteMachineKey, self).__init__(**kwargs) + self.validation = validation + self.validation_key = validation_key + self.decryption = decryption + self.decryption_key = decryption_key + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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.v2015_04_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.v2015_04_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + self.count = count + self.time_interval = time_interval + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2015_04_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: + super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) + self.snapshot_time = snapshot_time + self.recovery_target = recovery_target + self.overwrite = overwrite + self.recover_configuration = recover_configuration + self.ignore_conflicting_host_names = ignore_conflicting_host_names + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: + super(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = location + self.id = id + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + self.count = count + self.time_interval = time_interval + + +class TldLegalAgreement(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: str=None, **kwargs) -> None: + super(TldLegalAgreement, self).__init__(**kwargs) + self.agreement_key = agreement_key + self.title = title + self.content = content + self.url = url + + +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 + :ivar domain_name: Name of the top level domain. + :vartype domain_name: str + :param privacy: If true, then the top level domain supports + domain privacy; otherwise, false. + :type privacy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_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'}, + 'domain_name': {'key': 'properties.name', 'type': 'str'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, privacy: bool=None, **kwargs) -> None: + super(TopLevelDomain, self).__init__(kind=kind, **kwargs) + self.domain_name = None + self.privacy = privacy + + +class TopLevelDomainAgreementOption(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + """ + + _attribute_map = { + 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, + 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, + } + + def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: + super(TopLevelDomainAgreementOption, self).__init__(**kwargs) + self.include_privacy = include_privacy + self.for_transfer = for_transfer + + +class User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: + super(User, self).__init__(kind=kind, **kwargs) + self.user_name = user_name + 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 + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2015_04_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2015_04_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: + 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 + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2015_04_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'}, + 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + super(VnetRoute, self).__init__(kind=kind, **kwargs) + self.vnet_route_name = vnet_route_name + self.start_address = start_address + self.end_address = end_address + self.route_type = route_type diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_paged_models.py new file mode 100644 index 00000000000..8a4a1bd3928 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_paged_models.py @@ -0,0 +1,92 @@ +# 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 msrest.paging import Paged + + +class DomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`Domain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Domain]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainPaged, self).__init__(*args, **kwargs) +class NameIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`NameIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(NameIdentifierPaged, self).__init__(*args, **kwargs) +class DomainOwnershipIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) +class TopLevelDomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`TopLevelDomain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} + } + + def __init__(self, *args, **kwargs): + + super(TopLevelDomainPaged, self).__init__(*args, **kwargs) +class TldLegalAgreementPaged(Paged): + """ + A paging container for iterating over a list of :class:`TldLegalAgreement ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} + } + + def __init__(self, *args, **kwargs): + + super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) +class CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..22f218bb63e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_web_site_management_client_enums.py @@ -0,0 +1,182 @@ +# 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 + + +class DomainStatus(str, Enum): + + 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 ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class AzureResourceType(str, Enum): + + website = "Website" + traffic_manager = "TrafficManager" + + +class CustomHostNameDnsRecordType(str, Enum): + + cname = "CName" + a = "A" + + +class HostNameType(str, Enum): + + verified = "Verified" + managed = "Managed" + + +class DnsType(str, Enum): + + azure_dns = "AzureDns" + default_domain_registrar_dns = "DefaultDomainRegistrarDns" + + +class DomainType(str, Enum): + + regular = "Regular" + soft_deleted = "SoftDeleted" + + +class RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 ScmType(str, Enum): + + 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" + + +class ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/__init__.py new file mode 100644 index 00000000000..c190a5674c8 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/__init__.py @@ -0,0 +1,20 @@ +# 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 ._domains_operations import DomainsOperations +from ._top_level_domains_operations import TopLevelDomainsOperations +from ._domain_registration_provider_operations import DomainRegistrationProviderOperations + +__all__ = [ + 'DomainsOperations', + 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domain_registration_provider_operations.py new file mode 100644 index 00000000000..c2d79d623ed --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domain_registration_provider_operations.py @@ -0,0 +1,106 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DomainRegistrationProviderOperations(object): + """DomainRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2015-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2015_04_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2015_04_01.models.CsmOperationDescription] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py new file mode 100644 index 00000000000..921f7bcf808 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py @@ -0,0 +1,1104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DomainsOperations(object): + """DomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2015-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-01" + + self.config = config + + def check_availability( + self, name=None, custom_headers=None, raw=False, **operation_config): + """Check if a domain is available for registration. + + Check if a domain is available for registration. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainAvailablilityCheckResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2015_04_01.models.DomainAvailablilityCheckResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.check_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainAvailablilityCheckResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all domains in a subscription. + + Get all domains in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2015_04_01.models.DomainPaged[~azure.mgmt.web.v2015_04_01.models.Domain] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} + + def get_control_center_sso_request( + self, custom_headers=None, raw=False, **operation_config): + """Generate a single sign-on request for the domain management portal. + + Generate a single sign-on request for the domain management portal. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainControlCenterSsoRequest or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2015_04_01.models.DomainControlCenterSsoRequest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_control_center_sso_request.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainControlCenterSsoRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} + + def list_recommendations( + self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): + """Get domain name recommendations based on keywords. + + Get domain name recommendations based on keywords. + + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NameIdentifier + :rtype: + ~azure.mgmt.web.v2015_04_01.models.NameIdentifierPaged[~azure.mgmt.web.v2015_04_01.models.NameIdentifier] + :raises: :class:`CloudError` + """ + parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommendations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all domains in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2015_04_01.models.DomainPaged[~azure.mgmt.web.v2015_04_01.models.Domain] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} + + def get( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Get a domain. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_04_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'Domain') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a domain. + + 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.v2015_04_01.models.Domain + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2015_04_01.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2015_04_01.models.Domain]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def delete( + self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): + """Delete a domain. + + 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 true to delete + the domain immediately. The default is false which + deletes the domain after 24 hours. + :type force_hard_delete_domain: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + """Creates or updates a domain. + + 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.v2015_04_01.models.DomainPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_04_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'DomainPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def list_ownership_identifiers( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Lists domain ownership identifiers. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DomainOwnershipIdentifier + :rtype: + ~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifier] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_ownership_identifiers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} + + def get_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """Get ownership identifier for domain. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def create_or_update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """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 identifer. + + :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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.create_or_update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def delete_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """Delete ownership identifier for domain. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """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 identifer. + + :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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def renew( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Renew a domain. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_top_level_domains_operations.py new file mode 100644 index 00000000000..bdfe01b2f80 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_top_level_domains_operations.py @@ -0,0 +1,255 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class TopLevelDomainsOperations(object): + """TopLevelDomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2015-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all top-level domains supported for registration. + + Get all top-level domains supported for registration. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TopLevelDomain + :rtype: + ~azure.mgmt.web.v2015_04_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2015_04_01.models.TopLevelDomain] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} + + def get( + self, name, custom_headers=None, raw=False, **operation_config): + """Get details of a top-level domain. + + Get details of a top-level domain. + + :param name: Name of the top-level domain. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TopLevelDomain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_04_01.models.TopLevelDomain or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TopLevelDomain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} + + def list_agreements( + self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): + """Gets all legal agreements that user needs to accept before purchasing a + domain. + + 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 include_privacy: If true, then the list of + agreements will include agreements for domain privacy as well; + otherwise, false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TldLegalAgreement + :rtype: + ~azure.mgmt.web.v2015_04_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2015_04_01.models.TldLegalAgreement] + :raises: :class:`CloudError` + """ + agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_agreements.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/version.py @@ -0,0 +1,13 @@ +# 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_web_site_management_client.py new file mode 100644 index 00000000000..ffe20b2588d --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_web_site_management_client.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import AppServiceCertificateOrdersOperations +from .operations import CertificateRegistrationProviderOperations +from . import models + + +class WebSiteManagementClient(SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar app_service_certificate_orders: AppServiceCertificateOrders operations + :vartype app_service_certificate_orders: azure.mgmt.web.v2015_08_01.operations.AppServiceCertificateOrdersOperations + :ivar certificate_registration_provider: CertificateRegistrationProvider operations + :vartype certificate_registration_provider: azure.mgmt.web.v2015_08_01.operations.CertificateRegistrationProviderOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-08-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.certificate_registration_provider = CertificateRegistrationProviderOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/__init__.py new file mode 100644 index 00000000000..325f9d716c7 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/__init__.py @@ -0,0 +1,255 @@ +# 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 ApiDefinitionInfo + from ._models_py3 import AppServiceCertificate + from ._models_py3 import AppServiceCertificateOrder + from ._models_py3 import AppServiceCertificateOrderPatchResource + from ._models_py3 import AppServiceCertificatePatchResource + from ._models_py3 import AppServiceCertificateResource + from ._models_py3 import AppServicePlan + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import Capability + from ._models_py3 import CertificateDetails + from ._models_py3 import CertificateEmail + from ._models_py3 import CertificateOrderAction + from ._models_py3 import CloningInfo + from ._models_py3 import ConnStringInfo + from ._models_py3 import CorsSettings + from ._models_py3 import CsmOperationDescription + from ._models_py3 import CsmOperationDescriptionProperties + from ._models_py3 import CsmOperationDisplay + from ._models_py3 import Dimension + from ._models_py3 import Experiments + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostNameSslState + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import Identifier + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricSpecification + from ._models_py3 import NameIdentifier + from ._models_py3 import NameValuePair + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import ReissueCertificateOrderRequest + from ._models_py3 import RenewCertificateOrderRequest + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceMetricName + from ._models_py3 import ServiceSpecification + from ._models_py3 import Site + from ._models_py3 import SiteConfig + from ._models_py3 import SiteLimits + from ._models_py3 import SiteMachineKey + from ._models_py3 import SiteSeal + from ._models_py3 import SiteSealRequest + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuDescription + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import SnapshotRecoveryRequest + from ._models_py3 import SnapshotRecoveryTarget + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import User + from ._models_py3 import VirtualApplication + from ._models_py3 import VirtualDirectory + from ._models_py3 import VnetGateway + from ._models_py3 import VnetInfo + from ._models_py3 import VnetRoute +except (SyntaxError, ImportError): + from ._models import ApiDefinitionInfo + from ._models import AppServiceCertificate + from ._models import AppServiceCertificateOrder + from ._models import AppServiceCertificateOrderPatchResource + from ._models import AppServiceCertificatePatchResource + from ._models import AppServiceCertificateResource + from ._models import AppServicePlan + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import Capability + from ._models import CertificateDetails + from ._models import CertificateEmail + from ._models import CertificateOrderAction + from ._models import CloningInfo + from ._models import ConnStringInfo + from ._models import CorsSettings + from ._models import CsmOperationDescription + from ._models import CsmOperationDescriptionProperties + from ._models import CsmOperationDisplay + from ._models import Dimension + from ._models import Experiments + from ._models import HandlerMapping + from ._models import HostingEnvironmentProfile + from ._models import HostNameSslState + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import Identifier + from ._models import IpSecurityRestriction + from ._models import ManagedServiceIdentity + from ._models import MetricAvailability + from ._models import MetricSpecification + from ._models import NameIdentifier + from ._models import NameValuePair + from ._models import ProxyOnlyResource + from ._models import PushSettings + from ._models import RampUpRule + from ._models import ReissueCertificateOrderRequest + from ._models import RenewCertificateOrderRequest + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceMetricName + from ._models import ServiceSpecification + from ._models import Site + from ._models import SiteConfig + from ._models import SiteLimits + from ._models import SiteMachineKey + from ._models import SiteSeal + from ._models import SiteSealRequest + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import SnapshotRecoveryRequest + from ._models import SnapshotRecoveryTarget + from ._models import StatusCodesBasedTrigger + from ._models import User + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetRoute +from ._paged_models import AppServiceCertificateOrderPaged +from ._paged_models import AppServiceCertificateResourcePaged +from ._paged_models import CsmOperationDescriptionPaged +from ._web_site_management_client_enums import ( + KeyVaultSecretStatus, + CertificateProductType, + ProvisioningState, + CertificateOrderStatus, + CertificateOrderActionType, + RouteType, + ManagedServiceIdentityType, + AutoHealActionType, + ConnectionStringType, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + StatusOptions, +) + +__all__ = [ + 'ApiDefinitionInfo', + 'AppServiceCertificate', + 'AppServiceCertificateOrder', + 'AppServiceCertificateOrderPatchResource', + 'AppServiceCertificatePatchResource', + 'AppServiceCertificateResource', + 'AppServicePlan', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'Capability', + 'CertificateDetails', + 'CertificateEmail', + 'CertificateOrderAction', + 'CloningInfo', + 'ConnStringInfo', + 'CorsSettings', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'Dimension', + 'Experiments', + 'HandlerMapping', + 'HostingEnvironmentProfile', + 'HostNameSslState', + 'HybridConnection', + 'HybridConnectionKey', + 'Identifier', + 'IpSecurityRestriction', + 'ManagedServiceIdentity', + 'MetricAvailability', + 'MetricSpecification', + 'NameIdentifier', + 'NameValuePair', + 'ProxyOnlyResource', + 'PushSettings', + 'RampUpRule', + 'ReissueCertificateOrderRequest', + 'RenewCertificateOrderRequest', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceMetricName', + 'ServiceSpecification', + 'Site', + 'SiteConfig', + 'SiteLimits', + 'SiteMachineKey', + 'SiteSeal', + 'SiteSealRequest', + 'SkuCapacity', + 'SkuDescription', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'SnapshotRecoveryRequest', + 'SnapshotRecoveryTarget', + 'StatusCodesBasedTrigger', + 'User', + 'VirtualApplication', + 'VirtualDirectory', + 'VnetGateway', + 'VnetInfo', + 'VnetRoute', + 'AppServiceCertificateOrderPaged', + 'AppServiceCertificateResourcePaged', + 'CsmOperationDescriptionPaged', + 'KeyVaultSecretStatus', + 'CertificateProductType', + 'ProvisioningState', + 'CertificateOrderStatus', + 'CertificateOrderActionType', + 'RouteType', + 'ManagedServiceIdentityType', + 'AutoHealActionType', + 'ConnectionStringType', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'StatusOptions', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models.py new file mode 100644 index 00000000000..9e7cf0ed076 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models.py @@ -0,0 +1,3126 @@ +# 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 msrest.serialization import Model + + +class ApiDefinitionInfo(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 AppServiceCertificate(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.v2015_08_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': 'KeyVaultSecretStatus'}, + } + + 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 Resource(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: 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.get('location', None) + 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: Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2015_08_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2015_08_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2015_08_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.v2015_08_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2015_08_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +class ProxyOnlyResource(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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2015_08_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2015_08_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2015_08_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.v2015_08_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2015_08_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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.v2015_08_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': 'KeyVaultSecretStatus'}, + } + + 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: 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.v2015_08_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': 'KeyVaultSecretStatus'}, + } + + 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 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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2015_08_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2015_08_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2015_08_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2015_08_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, self).__init__(**kwargs) + self.app_service_plan_name = kwargs.get('app_service_plan_name', None) + self.worker_tier_name = kwargs.get('worker_tier_name', None) + self.status = None + self.subscription = None + self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None + self.is_spot = kwargs.get('is_spot', None) + self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.resource_group = None + self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', None) + + +class AutoHealActions(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.v2015_08_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2015_08_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': 'AutoHealActionType'}, + '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(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(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.v2015_08_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2015_08_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2015_08_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) + + +class Capability(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 CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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 + """ + + _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 + :param certificate_order_action_type: Action type. Possible values + include: 'CertificateIssued', 'CertificateOrderCanceled', + 'CertificateOrderCreated', 'CertificateRevoked', + 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', + 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', + 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' + :type certificate_order_action_type: str or + ~azure.mgmt.web.v2015_08_01.models.CertificateOrderActionType + :param created_at: Time at which the certificate action was performed. + :type created_at: 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'}, + 'certificate_order_action_type': {'key': 'properties.type', 'type': 'CertificateOrderActionType'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(CertificateOrderAction, self).__init__(**kwargs) + self.certificate_order_action_type = kwargs.get('certificate_order_action_type', None) + self.created_at = kwargs.get('created_at', None) + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + 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.get('source_web_app_id', 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) + self.ignore_quotas = kwargs.get('ignore_quotas', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2015_08_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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 CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2015_08_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2015_08_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(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2015_08_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(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 Dimension(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 Experiments(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2015_08_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 HandlerMapping(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 HostingEnvironmentProfile(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 HostNameSslState(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.v2015_08_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 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.v2015_08_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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 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 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 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identifier, self).__init__(**kwargs) + self.identifier_id = kwargs.get('identifier_id', None) + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', '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) + + +class ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2015_08_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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.tenant_id = None + self.principal_id = None + + +class MetricAvailability(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(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.v2015_08_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2015_08_01.models.MetricAvailability] + """ + + _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]'}, + } + + 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) + + +class NameIdentifier(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 NameValuePair(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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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 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 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(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 ResourceMetricAvailability(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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2015_08_01.models.ResourceMetricName + :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.v2015_08_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricDefinition, self).__init__(**kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2015_08_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_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: Resource tags. + :type tags: dict[str, str] + :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.v2015_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2015_08_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.v2015_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2015_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2015_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2015_08_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2015_08_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2015_08_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2015_08_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = kwargs.get('https_only', None) + self.identity = kwargs.get('identity', None) + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2015_08_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2015_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2015_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2015_08_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' + :type scm_type: str or ~azure.mgmt.web.v2015_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2015_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2015_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2015_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2015_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2015_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2015_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2015_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2015_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2015_08_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2015_08_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2015_08_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) + self.http20_enabled = kwargs.get('http20_enabled', True) + self.min_tls_version = kwargs.get('min_tls_version', None) + + +class SiteLimits(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 SiteMachineKey(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 SiteSeal(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.get('html', None) + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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 SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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.v2015_08_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.v2015_08_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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2015_08_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SnapshotRecoveryRequest, self).__init__(**kwargs) + self.snapshot_time = kwargs.get('snapshot_time', None) + self.recovery_target = kwargs.get('recovery_target', 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) + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.id = kwargs.get('id', None) + + +class StatusCodesBasedTrigger(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 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + 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) + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2015_08_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(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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2015_08_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + 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) + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2015_08_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'}, + 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) + self.start_address = kwargs.get('start_address', None) + self.end_address = kwargs.get('end_address', None) + self.route_type = kwargs.get('route_type', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models_py3.py new file mode 100644 index 00000000000..72f7a806ea2 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models_py3.py @@ -0,0 +1,3126 @@ +# 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 msrest.serialization import Model + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class AppServiceCertificate(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.v2015_08_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2015_08_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2015_08_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2015_08_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.v2015_08_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2015_08_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, location: str, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 + + +class ProxyOnlyResource(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: str=None, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2015_08_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2015_08_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2015_08_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.v2015_08_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2015_08_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 + + +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.v2015_08_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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: 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.v2015_08_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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 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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2015_08_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2015_08_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2015_08_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2015_08_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_plan_name = app_service_plan_name + self.worker_tier_name = worker_tier_name + self.status = None + self.subscription = None + self.admin_site_name = admin_site_name + 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.number_of_sites = None + self.is_spot = is_spot + self.spot_expiration_time = spot_expiration_time + self.resource_group = None + self.reserved = reserved + self.target_worker_count = target_worker_count + self.target_worker_size_id = target_worker_size_id + self.provisioning_state = None + self.sku = sku + + +class AutoHealActions(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.v2015_08_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2015_08_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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.v2015_08_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2015_08_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2015_08_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + super(Capability, self).__init__(**kwargs) + self.name = name + self.value = value + self.reason = reason + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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) -> None: + 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 + """ + + _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: + 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 + :param certificate_order_action_type: Action type. Possible values + include: 'CertificateIssued', 'CertificateOrderCanceled', + 'CertificateOrderCreated', 'CertificateRevoked', + 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', + 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', + 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' + :type certificate_order_action_type: str or + ~azure.mgmt.web.v2015_08_01.models.CertificateOrderActionType + :param created_at: Time at which the certificate action was performed. + :type created_at: 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'}, + 'certificate_order_action_type': {'key': 'properties.type', 'type': 'CertificateOrderActionType'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, certificate_order_action_type=None, created_at=None, **kwargs) -> None: + super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) + self.certificate_order_action_type = certificate_order_action_type + self.created_at = created_at + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: + 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.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 + self.ignore_quotas = ignore_quotas + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2015_08_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2015_08_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2015_08_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2015_08_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(CsmOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Dimension(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + 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 Experiments(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2015_08_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostNameSslState(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.v2015_08_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 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.v2015_08_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) + self.send_key_name = None + self.send_key_value = 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.identifier_id = identifier_id + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: + super(IpSecurityRestriction, self).__init__(**kwargs) + self.ip_address = ip_address + self.subnet_mask = subnet_mask + + +class ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2015_08_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 + """ + + _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'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + + +class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricSpecification(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.v2015_08_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2015_08_01.models.MetricAvailability] + """ + + _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]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, **kwargs) -> None: + 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 + + +class NameIdentifier(Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +class ResourceMetricAvailability(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) -> None: + 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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2015_08_01.models.ResourceMetricName + :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.v2015_08_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2015_08_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_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: Resource tags. + :type tags: dict[str, str] + :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.v2015_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2015_08_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.v2015_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2015_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2015_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2015_08_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2015_08_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2015_08_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2015_08_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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.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.host_names_disabled = host_names_disabled + 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.snapshot_info = snapshot_info + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = https_only + self.identity = identity + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2015_08_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2015_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2015_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2015_08_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' + :type scm_type: str or ~azure.mgmt.web.v2015_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2015_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2015_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2015_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2015_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2015_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2015_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2015_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2015_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2015_08_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2015_08_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2015_08_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: + 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.linux_fx_version = linux_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.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.cors = cors + self.push = push + self.api_definition = api_definition + self.auto_swap_slot_name = auto_swap_slot_name + self.local_my_sql_enabled = local_my_sql_enabled + self.ip_security_restrictions = ip_security_restrictions + self.http20_enabled = http20_enabled + self.min_tls_version = min_tls_version + + +class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + super(SiteMachineKey, self).__init__(**kwargs) + self.validation = validation + self.validation_key = validation_key + self.decryption = decryption + self.decryption_key = decryption_key + + +class SiteSeal(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) -> None: + super(SiteSeal, self).__init__(**kwargs) + self.html = html + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: + super(SiteSealRequest, self).__init__(**kwargs) + self.light_theme = light_theme + self.locale = locale + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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.v2015_08_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.v2015_08_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + self.count = count + self.time_interval = time_interval + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2015_08_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: + super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) + self.snapshot_time = snapshot_time + self.recovery_target = recovery_target + self.overwrite = overwrite + self.recover_configuration = recover_configuration + self.ignore_conflicting_host_names = ignore_conflicting_host_names + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: + super(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = location + self.id = id + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + self.count = count + self.time_interval = time_interval + + +class User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: + super(User, self).__init__(kind=kind, **kwargs) + self.user_name = user_name + 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 + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2015_08_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2015_08_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: + 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 + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2015_08_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'}, + 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + super(VnetRoute, self).__init__(kind=kind, **kwargs) + self.vnet_route_name = vnet_route_name + self.start_address = start_address + self.end_address = end_address + self.route_type = route_type diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_paged_models.py new file mode 100644 index 00000000000..b3350494ff6 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_paged_models.py @@ -0,0 +1,53 @@ +# 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 msrest.paging import Paged + + +class AppServiceCertificateOrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) +class AppServiceCertificateResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) +class CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..facff8cc4f7 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_web_site_management_client_enums.py @@ -0,0 +1,180 @@ +# 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 + + +class KeyVaultSecretStatus(str, Enum): + + 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 CertificateProductType(str, Enum): + + standard_domain_validated_ssl = "StandardDomainValidatedSsl" + standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class CertificateOrderStatus(str, Enum): + + pendingissuance = "Pendingissuance" + issued = "Issued" + revoked = "Revoked" + canceled = "Canceled" + denied = "Denied" + pendingrevocation = "Pendingrevocation" + pending_rekey = "PendingRekey" + unused = "Unused" + expired = "Expired" + not_submitted = "NotSubmitted" + + +class CertificateOrderActionType(str, Enum): + + 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 RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 ScmType(str, Enum): + + 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" + + +class ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/__init__.py new file mode 100644 index 00000000000..075b7482c6a --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/__init__.py @@ -0,0 +1,18 @@ +# 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_registration_provider_operations import CertificateRegistrationProviderOperations + +__all__ = [ + 'AppServiceCertificateOrdersOperations', + 'CertificateRegistrationProviderOperations', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_app_service_certificate_orders_operations.py new file mode 100644 index 00000000000..df4d5fd7567 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_app_service_certificate_orders_operations.py @@ -0,0 +1,1439 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceCertificateOrdersOperations(object): + """AppServiceCertificateOrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2015-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all certificate orders in a subscription. + + List all certificate orders in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def validate_purchase_information( + self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): + """Validate information for a certificate order. + + Validate information for a certificate order. + + :param app_service_certificate_order: Information for a certificate + order. + :type app_service_certificate_order: + ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate_purchase_information.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get certificate orders in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def get( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """Get a certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + + def _create_or_update_initial( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a certificate purchase order. + + 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.v2015_08_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateOrder or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def delete( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """Delete an existing certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate purchase order. + + 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.v2015_08_01.models.AppServiceCertificateOrderPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def list_certificates( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """List all certificates associated with a certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateResource + :rtype: + ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_certificates.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} + + def get_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """Get the certificate associated with a certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + + def _create_or_update_certificate_initial( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a certificate and associates with key vault secret. + + 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.v2015_08_01.models.AppServiceCertificateResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def delete_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """Delete the certificate associated with a certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + """Creates or updates a certificate and associates with key vault secret. + + 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.v2015_08_01.models.AppServiceCertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def reissue( + self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """Reissue an existing certificate order. + + 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.v2015_08_01.models.ReissueCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reissue.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} + + def renew( + self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """Renew an existing certificate order. + + 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.v2015_08_01.models.RenewCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} + + def resend_email( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """Resend certificate email. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.resend_email.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} + + def resend_request_emails( + self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): + """Verify domain ownership for this certificate order. + + 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: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + name_identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.resend_request_emails.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} + + def retrieve_site_seal( + self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): + """Verify domain ownership for this certificate order. + + 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 light_theme: If 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSeal or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2015_08_01.models.SiteSeal or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) + + # Construct URL + url = self.retrieve_site_seal.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSeal', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} + + def verify_domain_ownership( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """Verify domain ownership for this certificate order. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.verify_domain_ownership.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} + + def retrieve_certificate_actions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieve the list of certificate actions. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2015_08_01.models.CertificateOrderAction] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.retrieve_certificate_actions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateOrderAction]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} + + def retrieve_certificate_email_history( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieve email history. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2015_08_01.models.CertificateEmail] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.retrieve_certificate_email_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateEmail]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_certificate_registration_provider_operations.py new file mode 100644 index 00000000000..a4d40b237ed --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_certificate_registration_provider_operations.py @@ -0,0 +1,106 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CertificateRegistrationProviderOperations(object): + """CertificateRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2015-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-08-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2015_08_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2015_08_01.models.CsmOperationDescription] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/version.py @@ -0,0 +1,13 @@ +# 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_web_site_management_client.py new file mode 100644 index 00000000000..b514a5c2e71 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_web_site_management_client.py @@ -0,0 +1,81 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import WebSiteManagementClientOperationsMixin +from .operations import CertificatesOperations +from .operations import DeletedWebAppsOperations +from .operations import DiagnosticsOperations +from .operations import ProviderOperations +from .operations import RecommendationsOperations +from .operations import ResourceHealthMetadataOperations +from .operations import BillingMetersOperations +from . import models + + +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.web.v2016_03_01.operations.CertificatesOperations + :ivar deleted_web_apps: DeletedWebApps operations + :vartype deleted_web_apps: azure.mgmt.web.v2016_03_01.operations.DeletedWebAppsOperations + :ivar diagnostics: Diagnostics operations + :vartype diagnostics: azure.mgmt.web.v2016_03_01.operations.DiagnosticsOperations + :ivar provider: Provider operations + :vartype provider: azure.mgmt.web.v2016_03_01.operations.ProviderOperations + :ivar recommendations: Recommendations operations + :vartype recommendations: azure.mgmt.web.v2016_03_01.operations.RecommendationsOperations + :ivar resource_health_metadata: ResourceHealthMetadata operations + :vartype resource_health_metadata: azure.mgmt.web.v2016_03_01.operations.ResourceHealthMetadataOperations + :ivar billing_meters: BillingMeters operations + :vartype billing_meters: azure.mgmt.web.v2016_03_01.operations.BillingMetersOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2016-03-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + 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.provider = ProviderOperations( + self._client, self.config, self._serialize, self._deserialize) + self.recommendations = RecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.resource_health_metadata = ResourceHealthMetadataOperations( + self._client, self.config, self._serialize, self._deserialize) + self.billing_meters = BillingMetersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/__init__.py new file mode 100644 index 00000000000..9ba7d02fc42 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/__init__.py @@ -0,0 +1,469 @@ +# 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 AnalysisData + from ._models_py3 import AnalysisDefinition + from ._models_py3 import ApiDefinitionInfo + from ._models_py3 import ApplicationStack + from ._models_py3 import AppServiceEnvironment + from ._models_py3 import AppServicePlan + from ._models_py3 import AppServicePlanCollection + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import BillingMeter + from ._models_py3 import Capability + from ._models_py3 import Certificate + from ._models_py3 import CertificatePatchResource + from ._models_py3 import CloningInfo + from ._models_py3 import ConnStringInfo + from ._models_py3 import CorsSettings + from ._models_py3 import CsmMoveResourceEnvelope + from ._models_py3 import CsmOperationDescription + from ._models_py3 import CsmOperationDescriptionProperties + from ._models_py3 import CsmOperationDisplay + from ._models_py3 import CsmUsageQuota + from ._models_py3 import CsmUsageQuotaCollection + from ._models_py3 import DataSource + from ._models_py3 import DataTableResponseColumn + from ._models_py3 import DataTableResponseObject + from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException + from ._models_py3 import DefaultErrorResponseError + from ._models_py3 import DefaultErrorResponseErrorDetailsItem + from ._models_py3 import DeletedSite + 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 DiagnosticAnalysis + from ._models_py3 import DiagnosticCategory + from ._models_py3 import DiagnosticData + from ._models_py3 import DiagnosticDetectorResponse + from ._models_py3 import DiagnosticMetricSample + from ._models_py3 import DiagnosticMetricSet + from ._models_py3 import Dimension + from ._models_py3 import ErrorEntity + from ._models_py3 import Experiments + from ._models_py3 import GeoRegion + from ._models_py3 import GlobalCsmSkuDescription + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentDeploymentInfo + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostNameSslState + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import Identifier + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import LocalizableString + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricSpecification + from ._models_py3 import NameIdentifier + from ._models_py3 import NameValuePair + from ._models_py3 import NetworkAccessControlEntry + from ._models_py3 import Operation + from ._models_py3 import PremierAddOnOffer + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import Recommendation + from ._models_py3 import RecommendationRule + from ._models_py3 import Rendering + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceHealthMetadata + from ._models_py3 import ResourceMetric + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricCollection + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceMetricDefinitionCollection + from ._models_py3 import ResourceMetricName + from ._models_py3 import ResourceMetricProperty + from ._models_py3 import ResourceMetricValue + from ._models_py3 import ResourceNameAvailability + from ._models_py3 import ResourceNameAvailabilityRequest + from ._models_py3 import ResponseMetaData + from ._models_py3 import ServiceSpecification + from ._models_py3 import Site + from ._models_py3 import SiteConfig + from ._models_py3 import SiteLimits + from ._models_py3 import SiteMachineKey + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuDescription + from ._models_py3 import SkuInfos + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import SnapshotRecoveryRequest + from ._models_py3 import SnapshotRecoveryTarget + from ._models_py3 import Solution + from ._models_py3 import SourceControl + from ._models_py3 import StackMajorVersion + from ._models_py3 import StackMinorVersion + from ._models_py3 import StampCapacity + from ._models_py3 import StatusCodesBasedTrigger + 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 WorkerPool +except (SyntaxError, ImportError): + from ._models import AbnormalTimePeriod + from ._models import AnalysisData + from ._models import AnalysisDefinition + from ._models import ApiDefinitionInfo + from ._models import ApplicationStack + from ._models import AppServiceEnvironment + from ._models import AppServicePlan + from ._models import AppServicePlanCollection + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import BillingMeter + from ._models import Capability + from ._models import Certificate + from ._models import CertificatePatchResource + from ._models import CloningInfo + from ._models import ConnStringInfo + from ._models import CorsSettings + from ._models import CsmMoveResourceEnvelope + from ._models import CsmOperationDescription + from ._models import CsmOperationDescriptionProperties + from ._models import CsmOperationDisplay + from ._models import CsmUsageQuota + from ._models import CsmUsageQuotaCollection + from ._models import DataSource + from ._models import DataTableResponseColumn + from ._models import DataTableResponseObject + from ._models import DefaultErrorResponse, DefaultErrorResponseException + from ._models import DefaultErrorResponseError + from ._models import DefaultErrorResponseErrorDetailsItem + from ._models import DeletedSite + from ._models import DeploymentLocations + from ._models import DetectorAbnormalTimePeriod + from ._models import DetectorDefinition + from ._models import DetectorInfo + from ._models import DetectorResponse + from ._models import DiagnosticAnalysis + from ._models import DiagnosticCategory + from ._models import DiagnosticData + from ._models import DiagnosticDetectorResponse + from ._models import DiagnosticMetricSample + from ._models import DiagnosticMetricSet + from ._models import Dimension + from ._models import ErrorEntity + from ._models import Experiments + from ._models import GeoRegion + from ._models import GlobalCsmSkuDescription + from ._models import HandlerMapping + from ._models import HostingEnvironmentDeploymentInfo + from ._models import HostingEnvironmentProfile + from ._models import HostNameSslState + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import Identifier + from ._models import IpSecurityRestriction + from ._models import LocalizableString + from ._models import ManagedServiceIdentity + from ._models import MetricAvailability + from ._models import MetricSpecification + from ._models import NameIdentifier + from ._models import NameValuePair + from ._models import NetworkAccessControlEntry + from ._models import Operation + from ._models import PremierAddOnOffer + from ._models import ProxyOnlyResource + from ._models import PushSettings + from ._models import RampUpRule + from ._models import Recommendation + from ._models import RecommendationRule + from ._models import Rendering + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceHealthMetadata + from ._models import ResourceMetric + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricCollection + from ._models import ResourceMetricDefinition + from ._models import ResourceMetricDefinitionCollection + from ._models import ResourceMetricName + from ._models import ResourceMetricProperty + from ._models import ResourceMetricValue + from ._models import ResourceNameAvailability + from ._models import ResourceNameAvailabilityRequest + from ._models import ResponseMetaData + from ._models import ServiceSpecification + from ._models import Site + from ._models import SiteConfig + from ._models import SiteLimits + from ._models import SiteMachineKey + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SkuInfos + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import SnapshotRecoveryRequest + from ._models import SnapshotRecoveryTarget + from ._models import Solution + from ._models import SourceControl + from ._models import StackMajorVersion + from ._models import StackMinorVersion + from ._models import StampCapacity + from ._models import StatusCodesBasedTrigger + from ._models import User + from ._models import ValidateRequest + from ._models import ValidateResponse + from ._models import ValidateResponseError + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VirtualIPMapping + from ._models import VirtualNetworkProfile + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetParameters + from ._models import VnetRoute + from ._models import VnetValidationFailureDetails + from ._models import VnetValidationTestFailure + from ._models import WebAppCollection + from ._models import WorkerPool +from ._paged_models import AnalysisDefinitionPaged +from ._paged_models import ApplicationStackPaged +from ._paged_models import BillingMeterPaged +from ._paged_models import CertificatePaged +from ._paged_models import CsmOperationDescriptionPaged +from ._paged_models import DeletedSitePaged +from ._paged_models import DetectorDefinitionPaged +from ._paged_models import DetectorResponsePaged +from ._paged_models import DiagnosticCategoryPaged +from ._paged_models import GeoRegionPaged +from ._paged_models import IdentifierPaged +from ._paged_models import PremierAddOnOfferPaged +from ._paged_models import RecommendationPaged +from ._paged_models import ResourceHealthMetadataPaged +from ._paged_models import SourceControlPaged +from ._web_site_management_client_enums import ( + KeyVaultSecretStatus, + RouteType, + ManagedServiceIdentityType, + AutoHealActionType, + ConnectionStringType, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + StatusOptions, + ProvisioningState, + HostingEnvironmentStatus, + InternalLoadBalancingMode, + ComputeModeOptions, + WorkerSizeOptions, + AccessControlEntryAction, + OperationStatus, + IssueType, + SolutionType, + RenderingType, + ResourceScopeType, + NotificationLevel, + Channels, + AppServicePlanRestrictions, + InAvailabilityReasonType, + CheckNameResourceTypes, + ValidateResourceTypes, + SkuName, +) + +__all__ = [ + 'AbnormalTimePeriod', + 'AnalysisData', + 'AnalysisDefinition', + 'ApiDefinitionInfo', + 'ApplicationStack', + 'AppServiceEnvironment', + 'AppServicePlan', + 'AppServicePlanCollection', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'BillingMeter', + 'Capability', + 'Certificate', + 'CertificatePatchResource', + 'CloningInfo', + 'ConnStringInfo', + 'CorsSettings', + 'CsmMoveResourceEnvelope', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'CsmUsageQuota', + 'CsmUsageQuotaCollection', + 'DataSource', + 'DataTableResponseColumn', + 'DataTableResponseObject', + 'DefaultErrorResponse', 'DefaultErrorResponseException', + 'DefaultErrorResponseError', + 'DefaultErrorResponseErrorDetailsItem', + 'DeletedSite', + 'DeploymentLocations', + 'DetectorAbnormalTimePeriod', + 'DetectorDefinition', + 'DetectorInfo', + 'DetectorResponse', + 'DiagnosticAnalysis', + 'DiagnosticCategory', + 'DiagnosticData', + 'DiagnosticDetectorResponse', + 'DiagnosticMetricSample', + 'DiagnosticMetricSet', + 'Dimension', + 'ErrorEntity', + 'Experiments', + 'GeoRegion', + 'GlobalCsmSkuDescription', + 'HandlerMapping', + 'HostingEnvironmentDeploymentInfo', + 'HostingEnvironmentProfile', + 'HostNameSslState', + 'HybridConnection', + 'HybridConnectionKey', + 'Identifier', + 'IpSecurityRestriction', + 'LocalizableString', + 'ManagedServiceIdentity', + 'MetricAvailability', + 'MetricSpecification', + 'NameIdentifier', + 'NameValuePair', + 'NetworkAccessControlEntry', + 'Operation', + 'PremierAddOnOffer', + 'ProxyOnlyResource', + 'PushSettings', + 'RampUpRule', + 'Recommendation', + 'RecommendationRule', + 'Rendering', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceHealthMetadata', + 'ResourceMetric', + 'ResourceMetricAvailability', + 'ResourceMetricCollection', + 'ResourceMetricDefinition', + 'ResourceMetricDefinitionCollection', + 'ResourceMetricName', + 'ResourceMetricProperty', + 'ResourceMetricValue', + 'ResourceNameAvailability', + 'ResourceNameAvailabilityRequest', + 'ResponseMetaData', + 'ServiceSpecification', + 'Site', + 'SiteConfig', + 'SiteLimits', + 'SiteMachineKey', + 'SkuCapacity', + 'SkuDescription', + 'SkuInfos', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'SnapshotRecoveryRequest', + 'SnapshotRecoveryTarget', + 'Solution', + 'SourceControl', + 'StackMajorVersion', + 'StackMinorVersion', + 'StampCapacity', + 'StatusCodesBasedTrigger', + 'User', + 'ValidateRequest', + 'ValidateResponse', + 'ValidateResponseError', + 'VirtualApplication', + 'VirtualDirectory', + 'VirtualIPMapping', + 'VirtualNetworkProfile', + 'VnetGateway', + 'VnetInfo', + 'VnetParameters', + 'VnetRoute', + 'VnetValidationFailureDetails', + 'VnetValidationTestFailure', + 'WebAppCollection', + 'WorkerPool', + 'CertificatePaged', + 'DeletedSitePaged', + 'DetectorResponsePaged', + 'DiagnosticCategoryPaged', + 'AnalysisDefinitionPaged', + 'DetectorDefinitionPaged', + 'ApplicationStackPaged', + 'CsmOperationDescriptionPaged', + 'RecommendationPaged', + 'ResourceHealthMetadataPaged', + 'SourceControlPaged', + 'GeoRegionPaged', + 'IdentifierPaged', + 'PremierAddOnOfferPaged', + 'BillingMeterPaged', + 'KeyVaultSecretStatus', + 'RouteType', + 'ManagedServiceIdentityType', + 'AutoHealActionType', + 'ConnectionStringType', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'StatusOptions', + 'ProvisioningState', + 'HostingEnvironmentStatus', + 'InternalLoadBalancingMode', + 'ComputeModeOptions', + 'WorkerSizeOptions', + 'AccessControlEntryAction', + 'OperationStatus', + 'IssueType', + 'SolutionType', + 'RenderingType', + 'ResourceScopeType', + 'NotificationLevel', + 'Channels', + 'AppServicePlanRestrictions', + 'InAvailabilityReasonType', + 'CheckNameResourceTypes', + 'ValidateResourceTypes', + 'SkuName', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models.py new file mode 100644 index 00000000000..a73b194762c --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models.py @@ -0,0 +1,5418 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2016_03_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2016_03_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 AnalysisData(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.v2016_03_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2016_03_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2016_03_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 ProxyOnlyResource(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 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(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 ApplicationStack(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.v2016_03_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2016_03_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]'}, + } + + 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) + + +class AppServiceEnvironment(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2016_03_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.v2016_03_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2016_03_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2016_03_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2016_03_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2016_03_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2016_03_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2016_03_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2016_03_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) + self.cluster_settings = kwargs.get('cluster_settings', None) + self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + + +class Resource(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: 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.get('location', None) + self.type = None + self.tags = kwargs.get('tags', None) + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2016_03_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2016_03_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2016_03_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2016_03_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, self).__init__(**kwargs) + self.app_service_plan_name = kwargs.get('app_service_plan_name', None) + self.worker_tier_name = kwargs.get('worker_tier_name', None) + self.status = None + self.subscription = None + self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None + self.is_spot = kwargs.get('is_spot', None) + self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.resource_group = None + self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', None) + + +class AppServicePlanCollection(Model): + """Collection of App Service plans. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2016_03_01.models.AppServicePlan] + :param next_link: Link to next page of resources. + :type next_link: str + """ + + _validation = { + 'value': {'required': 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.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AutoHealActions(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.v2016_03_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2016_03_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': 'AutoHealActionType'}, + '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(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(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.v2016_03_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2016_03_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2016_03_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.v2016_03_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2016_03_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', 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 resource type meter used for + :type resource_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'}, + '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'}, + } + + 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) + + +class Capability(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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2016_03_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.v2016_03_01.models.KeyVaultSecretStatus + :ivar geo_region: Region of the certificate. + :vartype geo_region: str + :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 + """ + + _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}, + 'password': {'required': 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}, + 'geo_region': {'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': 'KeyVaultSecretStatus'}, + 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', '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.geo_region = None + self.server_farm_id = kwargs.get('server_farm_id', None) + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2016_03_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.v2016_03_01.models.KeyVaultSecretStatus + :ivar geo_region: Region of the certificate. + :vartype geo_region: str + :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 + """ + + _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}, + 'password': {'required': 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}, + 'geo_region': {'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': 'KeyVaultSecretStatus'}, + 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', '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.geo_region = None + self.server_farm_id = kwargs.get('server_farm_id', None) + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + 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.get('source_web_app_id', 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) + self.ignore_quotas = kwargs.get('ignore_quotas', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2016_03_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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 CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + + +class CsmMoveResourceEnvelope(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 CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2016_03_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2016_03_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(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2016_03_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(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 CsmUsageQuota(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 + :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.v2016_03_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(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.v2016_03_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.get('value', None) + self.next_link = None + + +class DataSource(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.v2016_03_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(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(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.v2016_03_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(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.v2016_03_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 DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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.v2016_03_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(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 DeletedSite(Model): + """A deleted app. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Numeric id for the deleted site + :type 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 name: Name of the deleted site + :vartype name: str + :ivar slot: Slot of the deleted site + :vartype slot: str + """ + + _validation = { + 'deleted_timestamp': {'readonly': True}, + 'subscription': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'name': {'readonly': True}, + 'slot': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, + 'subscription': {'key': 'subscription', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'slot': {'key': 'slot', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSite, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.deleted_timestamp = None + self.subscription = None + self.resource_group = None + self.name = None + self.slot = None + + +class DeploymentLocations(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.v2016_03_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2016_03_01.models.AppServiceEnvironment] + :param hosting_environment_deployment_infos: Available App Service + Environments with basic information. + :type hosting_environment_deployment_infos: + list[~azure.mgmt.web.v2016_03_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(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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.v2016_03_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.v2016_03_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2016_03_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': 'IssueType'}, + '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(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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.v2016_03_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2016_03_01.models.DiagnosticData] + """ + + _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]'}, + } + + def __init__(self, **kwargs): + super(DetectorResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.dataset = kwargs.get('dataset', 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 + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2016_03_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2016_03_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.v2016_03_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 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 DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2016_03_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2016_03_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 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 + :param end_time: End time of the period + :type end_time: 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.v2016_03_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2016_03_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2016_03_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2016_03_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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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(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 + :param end_time: End time of the period + :type end_time: 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.v2016_03_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(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 ErrorEntity(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.v2016_03_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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2016_03_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 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 geo_region_name: Region name. + :vartype geo_region_name: str + :ivar description: Region description. + :vartype description: str + :ivar display_name: Display name for region. + :vartype display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'geo_region_name': {'readonly': True}, + 'description': {'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'}, + 'geo_region_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GeoRegion, self).__init__(**kwargs) + self.geo_region_name = None + self.description = None + self.display_name = None + + +class GlobalCsmSkuDescription(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.v2016_03_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.v2016_03_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 HandlerMapping(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(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 HostingEnvironmentProfile(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 HostNameSslState(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.v2016_03_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 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.v2016_03_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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 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 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 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identifier, self).__init__(**kwargs) + self.identifier_id = kwargs.get('identifier_id', None) + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', '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) + + +class LocalizableString(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 ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2016_03_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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.tenant_id = None + self.principal_id = None + + +class MetricAvailability(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(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.v2016_03_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2016_03_01.models.MetricAvailability] + """ + + _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]'}, + } + + 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) + + +class NameIdentifier(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 NameValuePair(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 NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2016_03_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.description = kwargs.get('description', None) + self.order = kwargs.get('order', None) + self.remote_subnet = kwargs.get('remote_subnet', None) + + +class Operation(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.v2016_03_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2016_03_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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 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 premier_add_on_offer_name: Premier add on offer Name. + :type premier_add_on_offer_name: str + :param promo_code_required: true if promotion code is + required; otherwise, 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.v2016_03_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'}, + 'premier_add_on_offer_name': {'key': 'properties.name', 'type': 'str'}, + 'promo_code_required': {'key': 'properties.promoCodeRequired', 'type': 'bool'}, + 'quota': {'key': 'properties.quota', 'type': 'int'}, + 'web_hosting_plan_restrictions': {'key': 'properties.webHostingPlanRestrictions', 'type': 'AppServicePlanRestrictions'}, + '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.premier_add_on_offer_name = kwargs.get('premier_add_on_offer_name', 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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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 + :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.v2016_03_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.v2016_03_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.v2016_03_01.models.Channels + :param tags: The list of category tags that this recommendation belongs + to. + :type tags: list[str] + :param action_name: Name of action recommended by this object. + :type action_name: str + :param start_time: The beginning time in UTC of a range that the + recommendation refers to. + :type start_time: datetime + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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}, + } + + _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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'action_name': {'key': 'properties.actionName', '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.tags = kwargs.get('tags', None) + self.action_name = kwargs.get('action_name', 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 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_rule_name: Unique name of the rule. + :type recommendation_rule_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.v2016_03_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.v2016_03_01.models.Channels + :param tags: An array of category tags that the rule contains. + :type 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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recommendation_rule_name': {'key': 'properties.name', '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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + 'tags': {'key': 'properties.tags', '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_rule_name = kwargs.get('recommendation_rule_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.tags = kwargs.get('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 Rendering(Model): + """Instructions for rendering the data. + + :param rendering_type: Rendering Type. Possible values include: 'NoGraph', + 'Table', 'TimeSeries', 'TimeSeriesPerInstance' + :type rendering_type: str or + ~azure.mgmt.web.v2016_03_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 = { + 'rendering_type': {'key': 'renderingType', 'type': 'RenderingType'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Rendering, self).__init__(**kwargs) + self.rendering_type = kwargs.get('rendering_type', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + + +class RequestsBasedTrigger(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 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 ResourceMetric(Model): + """Object representing a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of metric. + :vartype name: ~azure.mgmt.web.v2016_03_01.models.ResourceMetricName + :ivar unit: Metric unit. + :vartype unit: str + :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D + :vartype time_grain: str + :ivar start_time: Metric start time. + :vartype start_time: datetime + :ivar end_time: Metric end time. + :vartype end_time: datetime + :ivar resource_id: Metric resource Id. + :vartype resource_id: str + :ivar id: Resource Id. + :vartype id: str + :ivar metric_values: Metric values. + :vartype metric_values: + list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricValue] + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricProperty] + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'id': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'ResourceMetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs): + super(ResourceMetric, self).__init__(**kwargs) + self.name = None + self.unit = None + self.time_grain = None + self.start_time = None + self.end_time = None + self.resource_id = None + self.id = None + self.metric_values = None + self.properties = None + + +class ResourceMetricAvailability(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 ResourceMetricCollection(Model): + """Collection of metric 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.v2016_03_01.models.ResourceMetric] + :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': '[ResourceMetric]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = 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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2016_03_01.models.ResourceMetricName + :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.v2016_03_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricDefinition, self).__init__(**kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricDefinitionCollection(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.v2016_03_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.get('value', None) + self.next_link = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceMetricProperty(Model): + """Resource metric property. + + :param key: Key for resource metric property. + :type key: str + :param value: Value of pair. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricProperty, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + + +class ResourceMetricValue(Model): + """Value of resource metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Value timestamp. + :vartype timestamp: str + :ivar average: Value average. + :vartype average: float + :ivar minimum: Value minimum. + :vartype minimum: float + :ivar maximum: Value maximum. + :vartype maximum: float + :ivar total: Value total. + :vartype total: float + :ivar count: Value count. + :vartype count: float + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricProperty] + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'total': {'readonly': True}, + 'count': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'float'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricValue, self).__init__(**kwargs) + self.timestamp = None + self.average = None + self.minimum = None + self.maximum = None + self.total = None + self.count = None + self.properties = None + + +class ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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.v2016_03_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(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.v2016_03_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.get('name', None) + self.type = kwargs.get('type', None) + self.is_fqdn = kwargs.get('is_fqdn', None) + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2016_03_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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2016_03_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_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: Resource tags. + :type tags: dict[str, str] + :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.v2016_03_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2016_03_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.v2016_03_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2016_03_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2016_03_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2016_03_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2016_03_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2016_03_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2016_03_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = kwargs.get('https_only', None) + self.identity = kwargs.get('identity', None) + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2016_03_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2016_03_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2016_03_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2016_03_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' + :type scm_type: str or ~azure.mgmt.web.v2016_03_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2016_03_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2016_03_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2016_03_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2016_03_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2016_03_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2016_03_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2016_03_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2016_03_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2016_03_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2016_03_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2016_03_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) + self.http20_enabled = kwargs.get('http20_enabled', True) + self.min_tls_version = kwargs.get('min_tls_version', None) + + +class SiteLimits(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 SiteMachineKey(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 SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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.v2016_03_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.v2016_03_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 SkuInfos(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.v2016_03_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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2016_03_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SnapshotRecoveryRequest, self).__init__(**kwargs) + self.snapshot_time = kwargs.get('snapshot_time', None) + self.recovery_target = kwargs.get('recovery_target', 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) + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.id = kwargs.get('id', None) + + +class Solution(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.v2016_03_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2016_03_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': 'SolutionType'}, + '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 source_control_name: Name or source control type. + :type source_control_name: 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 + """ + + _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'}, + 'source_control_name': {'key': 'properties.name', '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.source_control_name = kwargs.get('source_control_name', None) + 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 StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2016_03_01.models.StackMinorVersion] + """ + + _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]'}, + } + + 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) + + +class StackMinorVersion(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + """ + + _attribute_map = { + 'display_version': {'key': 'displayVersion', 'type': 'str'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'is_default': {'key': 'isDefault', '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) + + +class StampCapacity(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.v2016_03_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' + :type worker_size: str or + ~azure.mgmt.web.v2016_03_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 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: true if capacity + is applicable for all apps; otherwise, false. + :type is_applicable_for_all_compute_modes: bool + :param site_mode: Shared or Dedicated. + :type site_mode: str + """ + + _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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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'}, + } + + 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) + + +class StatusCodesBasedTrigger(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 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + 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) + + +class ValidateRequest(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' + :type type: str or + ~azure.mgmt.web.v2016_03_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ValidateRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + 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) + + +class ValidateResponse(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.v2016_03_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(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(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2016_03_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(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(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 + """ + + _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'}, + } + + 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) + + +class VirtualNetworkProfile(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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.get('id', None) + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2016_03_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + 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) + + +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 + """ + + _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'}, + } + + 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) + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2016_03_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'}, + 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) + 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 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.v2016_03_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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, **kwargs): + super(VnetValidationFailureDetails, self).__init__(**kwargs) + self.failed = kwargs.get('failed', None) + self.failed_tests = kwargs.get('failed_tests', 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(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.v2016_03_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.get('value', None) + self.next_link = None + + +class WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.v2016_03_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WorkerPool, self).__init__(**kwargs) + 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models_py3.py new file mode 100644 index 00000000000..8080cffded3 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models_py3.py @@ -0,0 +1,5418 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2016_03_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2016_03_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: + super(AbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.events = events + self.solutions = solutions + + +class AnalysisData(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.v2016_03_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2016_03_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2016_03_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: + 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 ProxyOnlyResource(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: str=None, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = 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, *, kind: str=None, **kwargs) -> None: + super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) + self.description = None + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class ApplicationStack(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.v2016_03_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2016_03_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]'}, + } + + def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: + super(ApplicationStack, self).__init__(**kwargs) + self.name = name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + + +class AppServiceEnvironment(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2016_03_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.v2016_03_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2016_03_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2016_03_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2016_03_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2016_03_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2016_03_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2016_03_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2016_03_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + } + + def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + + +class Resource(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: 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: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.location = location + self.type = None + self.tags = tags + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2016_03_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2016_03_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2016_03_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2016_03_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_plan_name = app_service_plan_name + self.worker_tier_name = worker_tier_name + self.status = None + self.subscription = None + self.admin_site_name = admin_site_name + 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.number_of_sites = None + self.is_spot = is_spot + self.spot_expiration_time = spot_expiration_time + self.resource_group = None + self.reserved = reserved + self.target_worker_count = target_worker_count + self.target_worker_size_id = target_worker_size_id + self.provisioning_state = None + self.sku = sku + + +class AppServicePlanCollection(Model): + """Collection of App Service plans. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2016_03_01.models.AppServicePlan] + :param next_link: Link to next page of resources. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServicePlan]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, next_link: str=None, **kwargs) -> None: + super(AppServicePlanCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AutoHealActions(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.v2016_03_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2016_03_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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.v2016_03_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2016_03_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2016_03_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.v2016_03_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2016_03_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +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 resource type meter used for + :type resource_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'}, + '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'}, + } + + def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, **kwargs) -> None: + 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 + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + 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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2016_03_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.v2016_03_01.models.KeyVaultSecretStatus + :ivar geo_region: Region of the certificate. + :vartype geo_region: str + :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 + """ + + _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}, + 'password': {'required': 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}, + 'geo_region': {'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': 'KeyVaultSecretStatus'}, + 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + } + + def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: + 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.geo_region = None + self.server_farm_id = server_farm_id + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2016_03_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.v2016_03_01.models.KeyVaultSecretStatus + :ivar geo_region: Region of the certificate. + :vartype geo_region: str + :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 + """ + + _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}, + 'password': {'required': 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}, + 'geo_region': {'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': 'KeyVaultSecretStatus'}, + 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + } + + def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: + 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.geo_region = None + self.server_farm_id = server_farm_id + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: + 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.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 + self.ignore_quotas = ignore_quotas + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2016_03_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + + +class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: + super(CsmMoveResourceEnvelope, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2016_03_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2016_03_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2016_03_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(CsmOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class CsmUsageQuota(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 + :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.v2016_03_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + 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(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.v2016_03_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, **kwargs) -> None: + super(CsmUsageQuotaCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DataSource(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.v2016_03_01.models.NameValuePair] + """ + + _attribute_map = { + 'instructions': {'key': 'instructions', 'type': '[str]'}, + 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, + } + + def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: + super(DataSource, self).__init__(**kwargs) + self.instructions = instructions + self.data_source_uri = data_source_uri + + +class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: + super(DataTableResponseColumn, self).__init__(**kwargs) + self.column_name = column_name + self.data_type = data_type + self.column_type = column_type + + +class DataTableResponseObject(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.v2016_03_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: str=None, columns=None, rows=None, **kwargs) -> None: + super(DataTableResponseObject, self).__init__(**kwargs) + self.table_name = table_name + self.columns = columns + self.rows = rows + + +class DefaultErrorResponse(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.v2016_03_01.models.DefaultErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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.v2016_03_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=None, **kwargs) -> None: + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(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) -> None: + super(DefaultErrorResponseErrorDetailsItem, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class DeletedSite(Model): + """A deleted app. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Numeric id for the deleted site + :type 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 name: Name of the deleted site + :vartype name: str + :ivar slot: Slot of the deleted site + :vartype slot: str + """ + + _validation = { + 'deleted_timestamp': {'readonly': True}, + 'subscription': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'name': {'readonly': True}, + 'slot': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, + 'subscription': {'key': 'subscription', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'slot': {'key': 'slot', 'type': 'str'}, + } + + def __init__(self, *, id: int=None, **kwargs) -> None: + super(DeletedSite, self).__init__(**kwargs) + self.id = id + self.deleted_timestamp = None + self.subscription = None + self.resource_group = None + self.name = None + self.slot = None + + +class DeploymentLocations(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.v2016_03_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2016_03_01.models.AppServiceEnvironment] + :param hosting_environment_deployment_infos: Available App Service + Environments with basic information. + :type hosting_environment_deployment_infos: + list[~azure.mgmt.web.v2016_03_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: + super(DeploymentLocations, self).__init__(**kwargs) + self.locations = locations + self.hosting_environments = hosting_environments + self.hosting_environment_deployment_infos = hosting_environment_deployment_infos + + +class DetectorAbnormalTimePeriod(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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.v2016_03_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.v2016_03_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2016_03_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': 'IssueType'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(DetectorDefinition, self).__init__(kind=kind, **kwargs) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None + + +class DetectorInfo(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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.v2016_03_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2016_03_01.models.DiagnosticData] + """ + + _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]'}, + } + + def __init__(self, *, kind: str=None, metadata=None, dataset=None, **kwargs) -> None: + super(DetectorResponse, self).__init__(kind=kind, **kwargs) + self.metadata = metadata + self.dataset = dataset + + +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 + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2016_03_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2016_03_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.v2016_03_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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) + self.description = None + + +class DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2016_03_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2016_03_01.models.Rendering + """ + + _attribute_map = { + 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, + 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, + } + + def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: + super(DiagnosticData, self).__init__(**kwargs) + self.table = table + self.rendering_properties = rendering_properties + + +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 + :param end_time: End time of the period + :type end_time: 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.v2016_03_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2016_03_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2016_03_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2016_03_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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: + 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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: + 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(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 + :param end_time: End time of the period + :type end_time: 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.v2016_03_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + 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 ErrorEntity(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.v2016_03_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: + 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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2016_03_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +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 geo_region_name: Region name. + :vartype geo_region_name: str + :ivar description: Region description. + :vartype description: str + :ivar display_name: Display name for region. + :vartype display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'geo_region_name': {'readonly': True}, + 'description': {'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'}, + 'geo_region_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(GeoRegion, self).__init__(kind=kind, **kwargs) + self.geo_region_name = None + self.description = None + self.display_name = None + + +class GlobalCsmSkuDescription(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.v2016_03_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.v2016_03_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: + super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) + self.name = name + self.location = location + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostNameSslState(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.v2016_03_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 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.v2016_03_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) + self.send_key_name = None + self.send_key_value = 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.identifier_id = identifier_id + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: + super(IpSecurityRestriction, self).__init__(**kwargs) + self.ip_address = ip_address + self.subnet_mask = subnet_mask + + +class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2016_03_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 + """ + + _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'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + + +class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricSpecification(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.v2016_03_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2016_03_01.models.MetricAvailability] + """ + + _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]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, **kwargs) -> None: + 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 + + +class NameIdentifier(Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2016_03_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = action + self.description = description + self.order = order + self.remote_subnet = remote_subnet + + +class Operation(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.v2016_03_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2016_03_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: + 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 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 premier_add_on_offer_name: Premier add on offer Name. + :type premier_add_on_offer_name: str + :param promo_code_required: true if promotion code is + required; otherwise, 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.v2016_03_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'}, + 'premier_add_on_offer_name': {'key': 'properties.name', 'type': 'str'}, + 'promo_code_required': {'key': 'properties.promoCodeRequired', 'type': 'bool'}, + 'quota': {'key': 'properties.quota', 'type': 'int'}, + 'web_hosting_plan_restrictions': {'key': 'properties.webHostingPlanRestrictions', 'type': 'AppServicePlanRestrictions'}, + '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: str=None, sku: str=None, product: str=None, vendor: str=None, premier_add_on_offer_name: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + super(PremierAddOnOffer, self).__init__(kind=kind, **kwargs) + self.sku = sku + self.product = product + self.vendor = vendor + self.premier_add_on_offer_name = premier_add_on_offer_name + 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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 + :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.v2016_03_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.v2016_03_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.v2016_03_01.models.Channels + :param tags: The list of category tags that this recommendation belongs + to. + :type tags: list[str] + :param action_name: Name of action recommended by this object. + :type action_name: str + :param start_time: The beginning time in UTC of a range that the + recommendation refers to. + :type start_time: datetime + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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}, + } + + _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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'action_name': {'key': 'properties.actionName', '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, tags=None, action_name: str=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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.tags = tags + self.action_name = action_name + 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 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_rule_name: Unique name of the rule. + :type recommendation_rule_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.v2016_03_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.v2016_03_01.models.Channels + :param tags: An array of category tags that the rule contains. + :type 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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recommendation_rule_name': {'key': 'properties.name', '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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + 'tags': {'key': 'properties.tags', '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: str=None, recommendation_rule_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, tags=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + super(RecommendationRule, self).__init__(kind=kind, **kwargs) + self.recommendation_rule_name = recommendation_rule_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.tags = tags + self.is_dynamic = is_dynamic + self.extension_name = extension_name + self.blade_name = blade_name + self.forward_link = forward_link + + +class Rendering(Model): + """Instructions for rendering the data. + + :param rendering_type: Rendering Type. Possible values include: 'NoGraph', + 'Table', 'TimeSeries', 'TimeSeriesPerInstance' + :type rendering_type: str or + ~azure.mgmt.web.v2016_03_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 = { + 'rendering_type': {'key': 'renderingType', 'type': 'RenderingType'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, rendering_type=None, title: str=None, description: str=None, **kwargs) -> None: + super(Rendering, self).__init__(**kwargs) + self.rendering_type = rendering_type + self.title = title + self.description = description + + +class RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: + super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) + self.category = category + self.signal_availability = signal_availability + + +class ResourceMetric(Model): + """Object representing a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of metric. + :vartype name: ~azure.mgmt.web.v2016_03_01.models.ResourceMetricName + :ivar unit: Metric unit. + :vartype unit: str + :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D + :vartype time_grain: str + :ivar start_time: Metric start time. + :vartype start_time: datetime + :ivar end_time: Metric end time. + :vartype end_time: datetime + :ivar resource_id: Metric resource Id. + :vartype resource_id: str + :ivar id: Resource Id. + :vartype id: str + :ivar metric_values: Metric values. + :vartype metric_values: + list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricValue] + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricProperty] + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'id': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'ResourceMetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetric, self).__init__(**kwargs) + self.name = None + self.unit = None + self.time_grain = None + self.start_time = None + self.end_time = None + self.resource_id = None + self.id = None + self.metric_values = None + self.properties = None + + +class ResourceMetricAvailability(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) -> None: + super(ResourceMetricAvailability, self).__init__(**kwargs) + self.time_grain = None + self.retention = None + + +class ResourceMetricCollection(Model): + """Collection of metric 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.v2016_03_01.models.ResourceMetric] + :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': '[ResourceMetric]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(ResourceMetricCollection, self).__init__(**kwargs) + self.value = value + self.next_link = 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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2016_03_01.models.ResourceMetricName + :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.v2016_03_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricDefinitionCollection(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.v2016_03_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, **kwargs) -> None: + super(ResourceMetricDefinitionCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceMetricProperty(Model): + """Resource metric property. + + :param key: Key for resource metric property. + :type key: str + :param value: Value of pair. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + super(ResourceMetricProperty, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ResourceMetricValue(Model): + """Value of resource metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Value timestamp. + :vartype timestamp: str + :ivar average: Value average. + :vartype average: float + :ivar minimum: Value minimum. + :vartype minimum: float + :ivar maximum: Value maximum. + :vartype maximum: float + :ivar total: Value total. + :vartype total: float + :ivar count: Value count. + :vartype count: float + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricProperty] + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'total': {'readonly': True}, + 'count': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'float'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricValue, self).__init__(**kwargs) + self.timestamp = None + self.average = None + self.minimum = None + self.maximum = None + self.total = None + self.count = None + self.properties = None + + +class ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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.v2016_03_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: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(ResourceNameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class ResourceNameAvailabilityRequest(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.v2016_03_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, is_fqdn: bool=None, **kwargs) -> None: + super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.is_fqdn = is_fqdn + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2016_03_01.models.DataSource + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, + } + + def __init__(self, *, data_source=None, **kwargs) -> None: + super(ResponseMetaData, self).__init__(**kwargs) + self.data_source = data_source + + +class ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2016_03_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_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: Resource tags. + :type tags: dict[str, str] + :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.v2016_03_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2016_03_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.v2016_03_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2016_03_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2016_03_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2016_03_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2016_03_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2016_03_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2016_03_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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.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.host_names_disabled = host_names_disabled + 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.snapshot_info = snapshot_info + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = https_only + self.identity = identity + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2016_03_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2016_03_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2016_03_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2016_03_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' + :type scm_type: str or ~azure.mgmt.web.v2016_03_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2016_03_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2016_03_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2016_03_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2016_03_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2016_03_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2016_03_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2016_03_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2016_03_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2016_03_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2016_03_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2016_03_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: + 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.linux_fx_version = linux_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.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.cors = cors + self.push = push + self.api_definition = api_definition + self.auto_swap_slot_name = auto_swap_slot_name + self.local_my_sql_enabled = local_my_sql_enabled + self.ip_security_restrictions = ip_security_restrictions + self.http20_enabled = http20_enabled + self.min_tls_version = min_tls_version + + +class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + super(SiteMachineKey, self).__init__(**kwargs) + self.validation = validation + self.validation_key = validation_key + self.decryption = decryption + self.decryption_key = decryption_key + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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.v2016_03_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.v2016_03_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 SkuInfos(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.v2016_03_01.models.GlobalCsmSkuDescription] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, + } + + def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: + super(SkuInfos, self).__init__(**kwargs) + self.resource_type = resource_type + self.skus = skus + + +class SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + self.count = count + self.time_interval = time_interval + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2016_03_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: + super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) + self.snapshot_time = snapshot_time + self.recovery_target = recovery_target + self.overwrite = overwrite + self.recover_configuration = recover_configuration + self.ignore_conflicting_host_names = ignore_conflicting_host_names + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: + super(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = location + self.id = id + + +class Solution(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.v2016_03_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2016_03_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': 'SolutionType'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: + 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 source_control_name: Name or source control type. + :type source_control_name: 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 + """ + + _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'}, + 'source_control_name': {'key': 'properties.name', '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: str=None, source_control_name: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: + super(SourceControl, self).__init__(kind=kind, **kwargs) + self.source_control_name = source_control_name + self.token = token + self.token_secret = token_secret + self.refresh_token = refresh_token + self.expiration_time = expiration_time + + +class StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2016_03_01.models.StackMinorVersion] + """ + + _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]'}, + } + + def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, **kwargs) -> None: + 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 + + +class StackMinorVersion(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + """ + + _attribute_map = { + 'display_version': {'key': 'displayVersion', 'type': 'str'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + } + + def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, **kwargs) -> None: + super(StackMinorVersion, self).__init__(**kwargs) + self.display_version = display_version + self.runtime_version = runtime_version + self.is_default = is_default + + +class StampCapacity(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.v2016_03_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' + :type worker_size: str or + ~azure.mgmt.web.v2016_03_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 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: true if capacity + is applicable for all apps; otherwise, false. + :type is_applicable_for_all_compute_modes: bool + :param site_mode: Shared or Dedicated. + :type site_mode: str + """ + + _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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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'}, + } + + def __init__(self, *, name: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, **kwargs) -> None: + 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 + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + self.count = count + self.time_interval = time_interval + + +class User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: + super(User, self).__init__(kind=kind, **kwargs) + self.user_name = user_name + 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 + + +class ValidateRequest(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' + :type type: str or + ~azure.mgmt.web.v2016_03_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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 + """ + + _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'}, + } + + def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, **kwargs) -> None: + 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 + + +class ValidateResponse(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.v2016_03_01.models.ValidateResponseError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ValidateResponseError'}, + } + + def __init__(self, *, status: str=None, error=None, **kwargs) -> None: + super(ValidateResponse, self).__init__(**kwargs) + self.status = status + self.error = error + + +class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: + super(ValidateResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2016_03_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +class VirtualIPMapping(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 + """ + + _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'}, + } + + def __init__(self, *, virtual_ip: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, **kwargs) -> None: + 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 + + +class VirtualNetworkProfile(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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=None, subnet: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2016_03_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: + 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 + + +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 + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: + 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 + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2016_03_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'}, + 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + super(VnetRoute, self).__init__(kind=kind, **kwargs) + self.vnet_route_name = vnet_route_name + 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 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.v2016_03_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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, *, kind: str=None, failed: bool=None, failed_tests=None, **kwargs) -> None: + super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) + self.failed = failed + self.failed_tests = failed_tests + + +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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: + super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) + self.test_name = test_name + self.details = details + + +class WebAppCollection(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.v2016_03_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, **kwargs) -> None: + super(WebAppCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.v2016_03_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: + super(WorkerPool, self).__init__(**kwargs) + 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_paged_models.py new file mode 100644 index 00000000000..9b44d6574fc --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_paged_models.py @@ -0,0 +1,209 @@ +# 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 msrest.paging import Paged + + +class CertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`Certificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Certificate]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificatePaged, self).__init__(*args, **kwargs) +class DeletedSitePaged(Paged): + """ + A paging container for iterating over a list of :class:`DeletedSite ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeletedSite]'} + } + + def __init__(self, *args, **kwargs): + + super(DeletedSitePaged, self).__init__(*args, **kwargs) +class DetectorResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorResponsePaged, self).__init__(*args, **kwargs) +class DiagnosticCategoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiagnosticCategory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} + } + + def __init__(self, *args, **kwargs): + + super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) +class AnalysisDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AnalysisDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) +class DetectorDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) +class ApplicationStackPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationStack ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationStack]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationStackPaged, self).__init__(*args, **kwargs) +class CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) +class RecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Recommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Recommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendationPaged, self).__init__(*args, **kwargs) +class ResourceHealthMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) +class SourceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlPaged, self).__init__(*args, **kwargs) +class GeoRegionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoRegion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoRegion]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoRegionPaged, self).__init__(*args, **kwargs) +class IdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`Identifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Identifier]'} + } + + def __init__(self, *args, **kwargs): + + super(IdentifierPaged, self).__init__(*args, **kwargs) +class PremierAddOnOfferPaged(Paged): + """ + A paging container for iterating over a list of :class:`PremierAddOnOffer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} + } + + def __init__(self, *args, **kwargs): + + super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) +class BillingMeterPaged(Paged): + """ + A paging container for iterating over a list of :class:`BillingMeter ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BillingMeter]'} + } + + def __init__(self, *args, **kwargs): + + super(BillingMeterPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..598dc7b2586 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_web_site_management_client_enums.py @@ -0,0 +1,287 @@ +# 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 + + +class KeyVaultSecretStatus(str, Enum): + + 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 RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 ScmType(str, Enum): + + 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" + + +class ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class HostingEnvironmentStatus(str, Enum): + + preparing = "Preparing" + ready = "Ready" + scaling = "Scaling" + deleting = "Deleting" + + +class InternalLoadBalancingMode(str, Enum): + + none = "None" + web = "Web" + publishing = "Publishing" + + +class ComputeModeOptions(str, Enum): + + shared = "Shared" + dedicated = "Dedicated" + dynamic = "Dynamic" + + +class WorkerSizeOptions(str, Enum): + + default = "Default" + small = "Small" + medium = "Medium" + large = "Large" + d1 = "D1" + d2 = "D2" + d3 = "D3" + + +class AccessControlEntryAction(str, Enum): + + permit = "Permit" + deny = "Deny" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" + + +class IssueType(str, Enum): + + 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 SolutionType(str, Enum): + + quick_solution = "QuickSolution" + deep_investigation = "DeepInvestigation" + best_practices = "BestPractices" + + +class RenderingType(str, Enum): + + no_graph = "NoGraph" + table = "Table" + time_series = "TimeSeries" + time_series_per_instance = "TimeSeriesPerInstance" + + +class ResourceScopeType(str, Enum): + + server_farm = "ServerFarm" + subscription = "Subscription" + web_site = "WebSite" + + +class NotificationLevel(str, Enum): + + critical = "Critical" + warning = "Warning" + information = "Information" + non_urgent_suggestion = "NonUrgentSuggestion" + + +class Channels(str, Enum): + + notification = "Notification" + api = "Api" + email = "Email" + webhook = "Webhook" + all = "All" + + +class AppServicePlanRestrictions(str, Enum): + + none = "None" + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class InAvailabilityReasonType(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class CheckNameResourceTypes(str, Enum): + + site = "Site" + slot = "Slot" + hosting_environment = "HostingEnvironment" + publishing_user = "PublishingUser" + microsoft_websites = "Microsoft.Web/sites" + microsoft_websitesslots = "Microsoft.Web/sites/slots" + microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" + microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" + + +class ValidateResourceTypes(str, Enum): + + server_farm = "ServerFarm" + site = "Site" + + +class SkuName(str, Enum): + + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + premium_v2 = "PremiumV2" + dynamic = "Dynamic" + isolated = "Isolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/__init__.py new file mode 100644 index 00000000000..00a18715fd9 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/__init__.py @@ -0,0 +1,30 @@ +# 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 ._certificates_operations import CertificatesOperations +from ._deleted_web_apps_operations import DeletedWebAppsOperations +from ._diagnostics_operations import DiagnosticsOperations +from ._provider_operations import ProviderOperations +from ._recommendations_operations import RecommendationsOperations +from ._resource_health_metadata_operations import ResourceHealthMetadataOperations +from ._billing_meters_operations import BillingMetersOperations +from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin + +__all__ = [ + 'CertificatesOperations', + 'DeletedWebAppsOperations', + 'DiagnosticsOperations', + 'ProviderOperations', + 'RecommendationsOperations', + 'ResourceHealthMetadataOperations', + 'BillingMetersOperations', + 'WebSiteManagementClientOperationsMixin', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_billing_meters_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_billing_meters_operations.py new file mode 100644 index 00000000000..292ab542cc4 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_billing_meters_operations.py @@ -0,0 +1,112 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BillingMetersOperations(object): + """BillingMetersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-01" + + self.config = config + + def list( + self, billing_location=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of meters for a given location. + + Gets a list of meters for a given location. + + :param billing_location: Azure Location of billable resource + :type billing_location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BillingMeter + :rtype: + ~azure.mgmt.web.v2016_03_01.models.BillingMeterPaged[~azure.mgmt.web.v2016_03_01.models.BillingMeter] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + if billing_location is not None: + query_parameters['billingLocation'] = self._serialize.query("billing_location", billing_location, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_certificates_operations.py new file mode 100644 index 00000000000..057be75f276 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_certificates_operations.py @@ -0,0 +1,444 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all certificates for a subscription. + + Get all certificates for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2016_03_01.models.CertificatePaged[~azure.mgmt.web.v2016_03_01.models.Certificate] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all certificates in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2016_03_01.models.CertificatePaged[~azure.mgmt.web.v2016_03_01.models.Certificate] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get a certificate. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def create_or_update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate. + + 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.v2016_03_01.models.Certificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'Certificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Delete a certificate. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate. + + 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.v2016_03_01.models.CertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_deleted_web_apps_operations.py new file mode 100644 index 00000000000..ff1dd6a6530 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_deleted_web_apps_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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DeletedWebAppsOperations(object): + """DeletedWebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all deleted apps for a subscription. + + Get all deleted apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DeletedSitePaged[~azure.mgmt.web.v2016_03_01.models.DeletedSite] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_diagnostics_operations.py new file mode 100644 index 00000000000..23da7c5a1f8 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_diagnostics_operations.py @@ -0,0 +1,1758 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DiagnosticsOperations(object): + """DiagnosticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-01" + + self.config = config + + def list_hosting_environment_detector_responses( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List Hosting Environment Detector Responses. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DetectorResponsePaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponse] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hosting_environment_detector_responses.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} + + def get_hosting_environment_detector_response( + self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Get Hosting Environment Detector Response. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_hosting_environment_detector_response.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} + + def list_site_detector_responses( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """List Site Detector Responses. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DetectorResponsePaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponse] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} + + def get_site_detector_response( + self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Get site detector response. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_detector_response.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} + + def list_site_diagnostic_categories( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Categories. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticCategory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} + + def get_site_diagnostic_category( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Category. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_diagnostic_category.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Site Analyses. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2016_03_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.AnalysisDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): + """Get Site Analysis. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_analysis.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Analysis. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.execute_site_analysis.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Detectors. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.DetectorDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector( + self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): + """Get Detector. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.DetectorDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_site_detector.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector( + self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Detector. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.execute_site_detector.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} + + def list_site_detector_responses_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """List Site Detector Responses. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DetectorResponsePaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponse] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} + + def get_site_detector_response_slot( + self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Get site detector response. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_detector_response_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} + + def list_site_diagnostic_categories_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Categories. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticCategory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} + + def get_site_diagnostic_category_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Category. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_diagnostic_category_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Site Analyses. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2016_03_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.AnalysisDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Site Analysis. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_analysis_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Analysis. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.execute_site_analysis_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Detectors. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.DetectorDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector_slot( + self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Detector. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2016_03_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.DetectorDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_site_detector_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector_slot( + self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Detector. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.execute_site_detector_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_provider_operations.py new file mode 100644 index 00000000000..0081f39d0f9 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_provider_operations.py @@ -0,0 +1,246 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProviderOperations(object): + """ProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-01" + + self.config = config + + def get_available_stacks( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Get available application frameworks and their versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStack + :rtype: + ~azure.mgmt.web.v2016_03_01.models.ApplicationStackPaged[~azure.mgmt.web.v2016_03_01.models.ApplicationStack] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks.metadata['url'] + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """Gets all available operations for the Microsoft.Web resource provider. + Also exposes resource metric definitions. + + Gets all available operations for the Microsoft.Web resource provider. + Also exposes resource metric definitions. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2016_03_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2016_03_01.models.CsmOperationDescription] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} + + def get_available_stacks_on_prem( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Get available application frameworks and their versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStack + :rtype: + ~azure.mgmt.web.v2016_03_01.models.ApplicationStackPaged[~azure.mgmt.web.v2016_03_01.models.ApplicationStack] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks_on_prem.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_recommendations_operations.py new file mode 100644 index 00000000000..e849b31b882 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_recommendations_operations.py @@ -0,0 +1,644 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RecommendationsOperations(object): + """RecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-01" + + self.config = config + + def list( + self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """List all recommendations for a subscription. + + List all recommendations for a subscription. + + :param featured: Specify true to return only the most + critical recommendations. The default is false, which + returns all recommendations. + :type featured: bool + :param filter: Filter is specified by using OData syntax. Example: + $filter=channels 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2016_03_01.models.RecommendationPaged[~azure.mgmt.web.v2016_03_01.models.Recommendation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} + + def reset_all_filters( + self, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for a subscription. + + Reset all recommendation opt-out settings for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_all_filters.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} + + def disable_recommendation_for_subscription( + self, name, custom_headers=None, raw=False, **operation_config): + """Disables the specified rule so it will not apply to a subscription in + the future. + + Disables the specified rule so it will not apply to a subscription in + the future. + + :param name: Rule name + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_recommendation_for_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} + + def list_history_for_web_app( + self, resource_group_name, site_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Get past recommendations for an app, optionally specified by the time + range. + + 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 filter: Filter is specified by using OData syntax. Example: + $filter=channels 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2016_03_01.models.RecommendationPaged[~azure.mgmt.web.v2016_03_01.models.Recommendation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_web_app.metadata['url'] + 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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} + + def list_recommended_rules_for_web_app( + self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get all recommendations for an app. + + 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 true to return only the most + critical recommendations. The default is 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=channels eq 'Api' or + channel eq 'Notification' + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2016_03_01.models.RecommendationPaged[~azure.mgmt.web.v2016_03_01.models.Recommendation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} + + def disable_all_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """Disable all recommendations for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_all_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} + + def reset_all_filters_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_all_filters_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} + + def get_rule_details_by_web_app( + self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """Get a recommendation rule for an app. + + 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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_rule_details_by_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} + + def disable_recommendation_for_site( + self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): + """Disables the specific rule for a web site permanently. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_recommendation_for_site.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_resource_health_metadata_operations.py new file mode 100644 index 00000000000..876c8fa050a --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_resource_health_metadata_operations.py @@ -0,0 +1,465 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceHealthMetadataOperations(object): + """ResourceHealthMetadataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the subscription. + + List all ResourceHealthMetadata for all sites in the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the resource group in + the subscription. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site + as a collection. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} + + def get_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} + + def list_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site + as a collection. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} + + def get_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_web_site_management_client_operations.py new file mode 100644 index 00000000000..f1def3b3f16 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_web_site_management_client_operations.py @@ -0,0 +1,989 @@ +# 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 msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from .. import models +import uuid + + +class WebSiteManagementClientOperationsMixin(object): + + def get_publishing_user( + self, custom_headers=None, raw=False, **operation_config): + """Gets publishing user. + + Gets publishing user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def update_publishing_user( + self, user_details, custom_headers=None, raw=False, **operation_config): + """Updates publishing user. + + Updates publishing user. + + :param user_details: Details of publishing user + :type user_details: ~azure.mgmt.web.v2016_03_01.models.User + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(user_details, 'User') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def list_source_controls( + self, custom_headers=None, raw=False, **operation_config): + """Gets the source controls available for Azure websites. + + Gets the source controls available for Azure websites. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.web.v2016_03_01.models.SourceControlPaged[~azure.mgmt.web.v2016_03_01.models.SourceControl] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_source_controls.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} + + def get_source_control( + self, source_control_type, custom_headers=None, raw=False, **operation_config): + """Gets source control token. + + Gets source control token. + + :param source_control_type: Type of source control + :type source_control_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def update_source_control( + self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): + """Updates source control token. + + 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.v2016_03_01.models.SourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request_message, 'SourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def check_name_availability( + self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): + """Check if a resource name is available. + + Check if a resource name is available. + + :param name: Resource name to verify. + :type name: str + :param type: 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.v2016_03_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceNameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) + + # Construct URL + url = self.check_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceNameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} + + def get_subscription_deployment_locations( + self, custom_headers=None, raw=False, **operation_config): + """Gets list of available geo regions plus ministamps. + + Gets list of available geo regions plus ministamps. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentLocations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.DeploymentLocations or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_subscription_deployment_locations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeploymentLocations', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} + + def list_geo_regions( + self, sku=None, linux_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + """Get a list of available geographical regions. + + Get a list of available geographical regions. + + :param sku: Name of SKU used to filter the regions. Possible values + include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', + 'PremiumV2', 'Dynamic', 'Isolated' + :type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName + :param linux_workers_enabled: Specify true if you want to + filter to only regions that support Linux workers. + :type linux_workers_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GeoRegion + :rtype: + ~azure.mgmt.web.v2016_03_01.models.GeoRegionPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegion] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_geo_regions.metadata['url'] + 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 = {} + 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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} + + def list_site_identifiers_assigned_to_host_name( + self, name=None, custom_headers=None, raw=False, **operation_config): + """List all apps that are assigned to a hostname. + + List all apps that are assigned to a hostname. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2016_03_01.models.IdentifierPaged[~azure.mgmt.web.v2016_03_01.models.Identifier] + :raises: :class:`CloudError` + """ + name_identifier = models.NameIdentifier(name=name) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} + + def list_premier_add_on_offers( + self, custom_headers=None, raw=False, **operation_config): + """List all premier add-on offers. + + List all premier add-on offers. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PremierAddOnOffer + :rtype: + ~azure.mgmt.web.v2016_03_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2016_03_01.models.PremierAddOnOffer] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_premier_add_on_offers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} + + def list_skus( + self, custom_headers=None, raw=False, **operation_config): + """List all SKUs. + + List all SKUs. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SkuInfos or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.SkuInfos or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SkuInfos', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} + + def verify_hosting_environment_vnet( + self, parameters, custom_headers=None, raw=False, **operation_config): + """Verifies if this VNET is compatible with an App Service Environment by + analyzing the Network Security Group rules. + + 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.v2016_03_01.models.VnetParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetValidationFailureDetails or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_03_01.models.VnetValidationFailureDetails or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.verify_hosting_environment_vnet.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VnetParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetValidationFailureDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} + + def move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """Move resources between resource groups. + + 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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} + + def validate( + self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): + """Validate if a resource can be created. + + 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.v2016_03_01.models.ValidateRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_03_01.models.ValidateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_request, 'ValidateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} + + def validate_move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """Validate whether a resource can be moved. + + 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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.validate_move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/version.py @@ -0,0 +1,13 @@ +# 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_web_site_management_client.py new file mode 100644 index 00000000000..50a0633dd1d --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_web_site_management_client.py @@ -0,0 +1,50 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import WebAppsOperations +from . import models + + +class WebSiteManagementClient(SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar web_apps: WebApps operations + :vartype web_apps: azure.mgmt.web.v2016_08_01.operations.WebAppsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2016-08-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.web_apps = WebAppsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/__init__.py new file mode 100644 index 00000000000..2f373565039 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/__init__.py @@ -0,0 +1,477 @@ +# 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 ApiDefinitionInfo + from ._models_py3 import ApplicationLogsConfig + from ._models_py3 import AppServicePlan + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import AzureBlobStorageApplicationLogsConfig + from ._models_py3 import AzureBlobStorageHttpLogsConfig + from ._models_py3 import AzureTableStorageApplicationLogsConfig + from ._models_py3 import BackupItem + from ._models_py3 import BackupRequest + from ._models_py3 import BackupSchedule + from ._models_py3 import Capability + from ._models_py3 import CloningInfo + from ._models_py3 import ConnectionStringDictionary + from ._models_py3 import ConnStringInfo + from ._models_py3 import ConnStringValueTypePair + from ._models_py3 import ContinuousWebJob + from ._models_py3 import CorsSettings + from ._models_py3 import CsmPublishingProfileOptions + from ._models_py3 import CsmSlotEntity + from ._models_py3 import CsmUsageQuota + from ._models_py3 import CustomHostnameAnalysisResult + from ._models_py3 import DatabaseBackupSetting + from ._models_py3 import Deployment + from ._models_py3 import EnabledConfig + from ._models_py3 import ErrorEntity + from ._models_py3 import Experiments + from ._models_py3 import FileSystemApplicationLogsConfig + from ._models_py3 import FileSystemHttpLogsConfig + from ._models_py3 import FunctionEnvelope + from ._models_py3 import FunctionSecrets + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostNameBinding + from ._models_py3 import HostNameSslState + from ._models_py3 import HttpLogsConfig + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import Identifier + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import LocalizableString + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import MigrateMySqlRequest + from ._models_py3 import MigrateMySqlStatus + from ._models_py3 import MSDeploy + from ._models_py3 import MSDeployLog + from ._models_py3 import MSDeployLogEntry + from ._models_py3 import MSDeployStatus + from ._models_py3 import NameValuePair + from ._models_py3 import NetworkFeatures + from ._models_py3 import Operation + from ._models_py3 import PerfMonResponse + from ._models_py3 import PerfMonSample + from ._models_py3 import PerfMonSet + from ._models_py3 import PremierAddOn + from ._models_py3 import ProcessInfo + from ._models_py3 import ProcessModuleInfo + from ._models_py3 import ProcessThreadInfo + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PublicCertificate + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import RelayServiceConnectionEntity + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceMetric + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceMetricName + from ._models_py3 import ResourceMetricProperty + from ._models_py3 import ResourceMetricValue + from ._models_py3 import RestoreRequest + from ._models_py3 import RestoreResponse + from ._models_py3 import Site + from ._models_py3 import SiteAuthSettings + from ._models_py3 import SiteCloneability + from ._models_py3 import SiteCloneabilityCriterion + from ._models_py3 import SiteConfig + from ._models_py3 import SiteConfigResource + from ._models_py3 import SiteConfigurationSnapshotInfo + from ._models_py3 import SiteExtensionInfo + from ._models_py3 import SiteInstance + 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 SiteSourceControl + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuDescription + from ._models_py3 import SlotConfigNamesResource + from ._models_py3 import SlotDifference + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotRecoveryRequest + from ._models_py3 import SnapshotRecoveryTarget + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import StorageMigrationOptions + from ._models_py3 import StorageMigrationResponse + from ._models_py3 import StringDictionary + from ._models_py3 import TriggeredJobHistory + from ._models_py3 import TriggeredJobRun + from ._models_py3 import TriggeredWebJob + from ._models_py3 import User + from ._models_py3 import VirtualApplication + from ._models_py3 import VirtualDirectory + from ._models_py3 import VnetGateway + from ._models_py3 import VnetInfo + from ._models_py3 import VnetRoute + from ._models_py3 import WebJob +except (SyntaxError, ImportError): + from ._models import ApiDefinitionInfo + from ._models import ApplicationLogsConfig + from ._models import AppServicePlan + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import AzureBlobStorageApplicationLogsConfig + from ._models import AzureBlobStorageHttpLogsConfig + from ._models import AzureTableStorageApplicationLogsConfig + from ._models import BackupItem + from ._models import BackupRequest + from ._models import BackupSchedule + from ._models import Capability + from ._models import CloningInfo + from ._models import ConnectionStringDictionary + from ._models import ConnStringInfo + from ._models import ConnStringValueTypePair + from ._models import ContinuousWebJob + from ._models import CorsSettings + from ._models import CsmPublishingProfileOptions + from ._models import CsmSlotEntity + from ._models import CsmUsageQuota + from ._models import CustomHostnameAnalysisResult + from ._models import DatabaseBackupSetting + from ._models import Deployment + from ._models import EnabledConfig + from ._models import ErrorEntity + from ._models import Experiments + from ._models import FileSystemApplicationLogsConfig + from ._models import FileSystemHttpLogsConfig + from ._models import FunctionEnvelope + from ._models import FunctionSecrets + from ._models import HandlerMapping + from ._models import HostingEnvironmentProfile + from ._models import HostNameBinding + from ._models import HostNameSslState + from ._models import HttpLogsConfig + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import Identifier + from ._models import IpSecurityRestriction + from ._models import LocalizableString + from ._models import ManagedServiceIdentity + from ._models import MigrateMySqlRequest + from ._models import MigrateMySqlStatus + from ._models import MSDeploy + from ._models import MSDeployLog + from ._models import MSDeployLogEntry + from ._models import MSDeployStatus + from ._models import NameValuePair + from ._models import NetworkFeatures + from ._models import Operation + from ._models import PerfMonResponse + from ._models import PerfMonSample + from ._models import PerfMonSet + from ._models import PremierAddOn + from ._models import ProcessInfo + from ._models import ProcessModuleInfo + from ._models import ProcessThreadInfo + from ._models import ProxyOnlyResource + from ._models import PublicCertificate + from ._models import PushSettings + from ._models import RampUpRule + from ._models import RelayServiceConnectionEntity + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceMetric + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceMetricName + from ._models import ResourceMetricProperty + from ._models import ResourceMetricValue + from ._models import RestoreRequest + from ._models import RestoreResponse + from ._models import Site + from ._models import SiteAuthSettings + from ._models import SiteCloneability + from ._models import SiteCloneabilityCriterion + from ._models import SiteConfig + from ._models import SiteConfigResource + from ._models import SiteConfigurationSnapshotInfo + from ._models import SiteExtensionInfo + from ._models import SiteInstance + from ._models import SiteLimits + from ._models import SiteLogsConfig + from ._models import SiteMachineKey + from ._models import SitePatchResource + from ._models import SitePhpErrorLogFlag + from ._models import SiteSourceControl + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SlotConfigNamesResource + from ._models import SlotDifference + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import Snapshot + from ._models import SnapshotRecoveryRequest + from ._models import SnapshotRecoveryTarget + from ._models import StatusCodesBasedTrigger + from ._models import StorageMigrationOptions + from ._models import StorageMigrationResponse + from ._models import StringDictionary + from ._models import TriggeredJobHistory + from ._models import TriggeredJobRun + from ._models import TriggeredWebJob + from ._models import User + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetRoute + from ._models import WebJob +from ._paged_models import BackupItemPaged +from ._paged_models import ContinuousWebJobPaged +from ._paged_models import CsmUsageQuotaPaged +from ._paged_models import DeploymentPaged +from ._paged_models import FunctionEnvelopePaged +from ._paged_models import HostNameBindingPaged +from ._paged_models import IdentifierPaged +from ._paged_models import PerfMonResponsePaged +from ._paged_models import ProcessInfoPaged +from ._paged_models import ProcessModuleInfoPaged +from ._paged_models import ProcessThreadInfoPaged +from ._paged_models import PublicCertificatePaged +from ._paged_models import ResourceMetricDefinitionPaged +from ._paged_models import ResourceMetricPaged +from ._paged_models import SiteConfigResourcePaged +from ._paged_models import SiteConfigurationSnapshotInfoPaged +from ._paged_models import SiteExtensionInfoPaged +from ._paged_models import SiteInstancePaged +from ._paged_models import SitePaged +from ._paged_models import SlotDifferencePaged +from ._paged_models import SnapshotPaged +from ._paged_models import TriggeredJobHistoryPaged +from ._paged_models import TriggeredWebJobPaged +from ._paged_models import WebJobPaged +from ._web_site_management_client_enums import ( + LogLevel, + BackupItemStatus, + DatabaseType, + FrequencyUnit, + BackupRestoreOperationType, + ConnectionStringType, + ContinuousWebJobStatus, + WebJobType, + PublishingProfileFormat, + DnsVerificationTestResult, + AzureResourceType, + CustomHostNameDnsRecordType, + HostNameType, + SslState, + MSDeployLogEntryType, + MSDeployProvisioningState, + MySqlMigrationType, + OperationStatus, + RouteType, + PublicCertificateLocation, + UnauthenticatedClientAction, + BuiltInAuthenticationProvider, + CloneAbilityResult, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + AutoHealActionType, + SupportedTlsVersions, + SiteExtensionType, + UsageState, + SiteAvailabilityState, + HostType, + TriggeredWebJobStatus, + ManagedServiceIdentityType, + StatusOptions, + ProvisioningState, +) + +__all__ = [ + 'ApiDefinitionInfo', + 'ApplicationLogsConfig', + 'AppServicePlan', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'AzureBlobStorageApplicationLogsConfig', + 'AzureBlobStorageHttpLogsConfig', + 'AzureTableStorageApplicationLogsConfig', + 'BackupItem', + 'BackupRequest', + 'BackupSchedule', + 'Capability', + 'CloningInfo', + 'ConnectionStringDictionary', + 'ConnStringInfo', + 'ConnStringValueTypePair', + 'ContinuousWebJob', + 'CorsSettings', + 'CsmPublishingProfileOptions', + 'CsmSlotEntity', + 'CsmUsageQuota', + 'CustomHostnameAnalysisResult', + 'DatabaseBackupSetting', + 'Deployment', + 'EnabledConfig', + 'ErrorEntity', + 'Experiments', + 'FileSystemApplicationLogsConfig', + 'FileSystemHttpLogsConfig', + 'FunctionEnvelope', + 'FunctionSecrets', + 'HandlerMapping', + 'HostingEnvironmentProfile', + 'HostNameBinding', + 'HostNameSslState', + 'HttpLogsConfig', + 'HybridConnection', + 'HybridConnectionKey', + 'Identifier', + 'IpSecurityRestriction', + 'LocalizableString', + 'ManagedServiceIdentity', + 'MigrateMySqlRequest', + 'MigrateMySqlStatus', + 'MSDeploy', + 'MSDeployLog', + 'MSDeployLogEntry', + 'MSDeployStatus', + 'NameValuePair', + 'NetworkFeatures', + 'Operation', + 'PerfMonResponse', + 'PerfMonSample', + 'PerfMonSet', + 'PremierAddOn', + 'ProcessInfo', + 'ProcessModuleInfo', + 'ProcessThreadInfo', + 'ProxyOnlyResource', + 'PublicCertificate', + 'PushSettings', + 'RampUpRule', + 'RelayServiceConnectionEntity', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceMetric', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceMetricName', + 'ResourceMetricProperty', + 'ResourceMetricValue', + 'RestoreRequest', + 'RestoreResponse', + 'Site', + 'SiteAuthSettings', + 'SiteCloneability', + 'SiteCloneabilityCriterion', + 'SiteConfig', + 'SiteConfigResource', + 'SiteConfigurationSnapshotInfo', + 'SiteExtensionInfo', + 'SiteInstance', + 'SiteLimits', + 'SiteLogsConfig', + 'SiteMachineKey', + 'SitePatchResource', + 'SitePhpErrorLogFlag', + 'SiteSourceControl', + 'SkuCapacity', + 'SkuDescription', + 'SlotConfigNamesResource', + 'SlotDifference', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'Snapshot', + 'SnapshotRecoveryRequest', + 'SnapshotRecoveryTarget', + 'StatusCodesBasedTrigger', + 'StorageMigrationOptions', + 'StorageMigrationResponse', + 'StringDictionary', + 'TriggeredJobHistory', + 'TriggeredJobRun', + 'TriggeredWebJob', + 'User', + 'VirtualApplication', + 'VirtualDirectory', + 'VnetGateway', + 'VnetInfo', + 'VnetRoute', + 'WebJob', + 'SitePaged', + 'BackupItemPaged', + 'SiteConfigResourcePaged', + 'SiteConfigurationSnapshotInfoPaged', + 'ContinuousWebJobPaged', + 'DeploymentPaged', + 'IdentifierPaged', + 'FunctionEnvelopePaged', + 'HostNameBindingPaged', + 'SiteInstancePaged', + 'ProcessInfoPaged', + 'ProcessModuleInfoPaged', + 'ProcessThreadInfoPaged', + 'ResourceMetricDefinitionPaged', + 'ResourceMetricPaged', + 'PerfMonResponsePaged', + 'PublicCertificatePaged', + 'SiteExtensionInfoPaged', + 'SlotDifferencePaged', + 'SnapshotPaged', + 'TriggeredWebJobPaged', + 'TriggeredJobHistoryPaged', + 'CsmUsageQuotaPaged', + 'WebJobPaged', + 'LogLevel', + 'BackupItemStatus', + 'DatabaseType', + 'FrequencyUnit', + 'BackupRestoreOperationType', + 'ConnectionStringType', + 'ContinuousWebJobStatus', + 'WebJobType', + 'PublishingProfileFormat', + 'DnsVerificationTestResult', + 'AzureResourceType', + 'CustomHostNameDnsRecordType', + 'HostNameType', + 'SslState', + 'MSDeployLogEntryType', + 'MSDeployProvisioningState', + 'MySqlMigrationType', + 'OperationStatus', + 'RouteType', + 'PublicCertificateLocation', + 'UnauthenticatedClientAction', + 'BuiltInAuthenticationProvider', + 'CloneAbilityResult', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'AutoHealActionType', + 'SupportedTlsVersions', + 'SiteExtensionType', + 'UsageState', + 'SiteAvailabilityState', + 'HostType', + 'TriggeredWebJobStatus', + 'ManagedServiceIdentityType', + 'StatusOptions', + 'ProvisioningState', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models.py new file mode 100644 index 00000000000..ce459a9f4c4 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models.py @@ -0,0 +1,6213 @@ +# 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 msrest.serialization import Model + + +class ApiDefinitionInfo(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 ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2016_08_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2016_08_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2016_08_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 Resource(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: 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.get('location', None) + self.type = None + self.tags = kwargs.get('tags', None) + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2016_08_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2016_08_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2016_08_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2016_08_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, self).__init__(**kwargs) + self.app_service_plan_name = kwargs.get('app_service_plan_name', None) + self.worker_tier_name = kwargs.get('worker_tier_name', None) + self.status = None + self.subscription = None + self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None + self.is_spot = kwargs.get('is_spot', None) + self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.resource_group = None + self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', None) + + +class AutoHealActions(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.v2016_08_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2016_08_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': 'AutoHealActionType'}, + '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(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(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.v2016_08_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2016_08_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2016_08_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.v2016_08_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2016_08_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) + + +class AzureBlobStorageApplicationLogsConfig(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.v2016_08_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': 'LogLevel'}, + '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(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 AzureTableStorageApplicationLogsConfig(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.v2016_08_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': 'LogLevel'}, + '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.get('sas_url', None) + + +class ProxyOnlyResource(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 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 backup_item_name: Name of this backup. + :vartype backup_item_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.v2016_08_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 + :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.v2016_08_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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.backup_item_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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param backup_request_name: Required. Name of the backup. + :type backup_request_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: Required. 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.v2016_08_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2016_08_01.models.DatabaseBackupSetting] + :param backup_request_type: Type of the backup. Possible values include: + 'Default', 'Clone', 'Relocation', 'Snapshot' + :type backup_request_type: str or + ~azure.mgmt.web.v2016_08_01.models.BackupRestoreOperationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'backup_request_name': {'required': True}, + 'storage_account_url': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backup_request_name': {'key': 'properties.name', '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]'}, + 'backup_request_type': {'key': 'properties.type', 'type': 'BackupRestoreOperationType'}, + } + + def __init__(self, **kwargs): + super(BackupRequest, self).__init__(**kwargs) + self.backup_request_name = kwargs.get('backup_request_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) + self.backup_request_type = kwargs.get('backup_request_type', None) + + +class BackupSchedule(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). Default value: 7 . + :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.v2016_08_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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 Capability(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 CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + 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.get('source_web_app_id', 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) + self.ignore_quotas = kwargs.get('ignore_quotas', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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.v2016_08_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(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.v2016_08_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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(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.v2016_08_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, **kwargs): + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', 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.v2016_08_01.models.ContinuousWebJobStatus + :param detailed_status: Detailed status. + :type detailed_status: str + :param log_url: Log URL. + :type log_url: str + :ivar continuous_web_job_name: Job name. Used as job identifier in ARM + resource URI. + :vartype continuous_web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', + 'Triggered' + :type job_type: str or ~azure.mgmt.web.v2016_08_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}, + 'continuous_web_job_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'}, + 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, + 'detailed_status': {'key': 'properties.detailedStatus', 'type': 'str'}, + 'log_url': {'key': 'properties.logUrl', 'type': 'str'}, + 'continuous_web_job_name': {'key': 'properties.name', 'type': 'str'}, + 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, + 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.usingSdk', '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.continuous_web_job_name = 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.job_type = kwargs.get('job_type', None) + self.error = kwargs.get('error', None) + self.using_sdk = kwargs.get('using_sdk', None) + self.settings = kwargs.get('settings', None) + + +class CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + + +class CsmPublishingProfileOptions(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.v2016_08_01.models.PublishingProfileFormat + """ + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + + +class CsmSlotEntity(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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.get('target_slot', None) + self.preserve_vnet = kwargs.get('preserve_vnet', None) + + +class CsmUsageQuota(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 + :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.v2016_08_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 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: true if hostname is + already verified; otherwise, 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.v2016_08_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.v2016_08_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_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_cname_records = kwargs.get('alternate_cname_records', None) + self.alternate_txt_records = kwargs.get('alternate_txt_records', None) + + +class DatabaseBackupSetting(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.v2016_08_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.get('database_type', None) + 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 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 deployment_id: Identifier for deployment. + :type deployment_id: 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 + :param end_time: End time. + :type end_time: 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'}, + 'deployment_id': {'key': 'properties.id', '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.authorEmail', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', '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.deployment_id = kwargs.get('deployment_id', None) + 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 EnabledConfig(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 ErrorEntity(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.v2016_08_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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2016_08_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 FileSystemApplicationLogsConfig(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2016_08_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, **kwargs): + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', "Off") + + +class FileSystemHttpLogsConfig(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 FunctionEnvelope(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 + :ivar function_envelope_name: Function name. + :vartype function_envelope_name: str + :ivar function_app_id: Function App ID. + :vartype 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 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'function_envelope_name': {'readonly': True}, + 'function_app_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'}, + 'function_envelope_name': {'key': 'properties.name', 'type': 'str'}, + 'function_app_id': {'key': 'properties.functionAppId', 'type': 'str'}, + 'script_root_path_href': {'key': 'properties.scriptRootPathHref', 'type': 'str'}, + 'script_href': {'key': 'properties.scriptHref', 'type': 'str'}, + 'config_href': {'key': 'properties.configHref', 'type': 'str'}, + 'secrets_file_href': {'key': 'properties.secretsFileHref', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'config': {'key': 'properties.config', 'type': 'object'}, + 'files': {'key': 'properties.files', 'type': '{str}'}, + 'test_data': {'key': 'properties.testData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FunctionEnvelope, self).__init__(**kwargs) + self.function_envelope_name = None + self.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.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) + + +class FunctionSecrets(ProxyOnlyResource): + """Function secrets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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: Secret key. + :type key: str + :param trigger_url: Trigger URL. + :type trigger_url: 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'}, + 'key': {'key': 'properties.key', 'type': 'str'}, + 'trigger_url': {'key': 'properties.triggerUrl', '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 HandlerMapping(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 HostingEnvironmentProfile(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 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.v2016_08_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.v2016_08_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2016_08_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2016_08_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + '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 HostNameSslState(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.v2016_08_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 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.v2016_08_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2016_08_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2016_08_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 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 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 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identifier, self).__init__(**kwargs) + self.identifier_id = kwargs.get('identifier_id', None) + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', '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) + + +class LocalizableString(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 ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2016_08_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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.tenant_id = None + self.principal_id = None + + +class MigrateMySqlRequest(ProxyOnlyResource): + """MySQL migration request. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2016_08_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + 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.v2016_08_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': 'OperationStatus'}, + '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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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.v2016_08_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(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2016_08_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': 'MSDeployLogEntryType'}, + '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.v2016_08_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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 NameValuePair(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.v2016_08_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2016_08_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 Operation(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.v2016_08_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2016_08_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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 PerfMonResponse(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.v2016_08_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(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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 + :param core_count: Core Count of worker. Not a data member + :type core_count: int + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'instance_name': {'key': 'instanceName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + 'core_count': {'key': 'coreCount', 'type': 'int'}, + } + + 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) + self.core_count = kwargs.get('core_count', None) + + +class PerfMonSet(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 + :param end_time: End time of the period. + :type end_time: 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.v2016_08_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: 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 premier_add_on_name: Premier add on Name. + :type premier_add_on_name: str + :param premier_add_on_location: Premier add on Location. + :type premier_add_on_location: str + :param premier_add_on_tags: Premier add on Tags. + :type premier_add_on_tags: dict[str, 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'}, + 'premier_add_on_name': {'key': 'properties.name', 'type': 'str'}, + 'premier_add_on_location': {'key': 'properties.location', 'type': 'str'}, + 'premier_add_on_tags': {'key': 'properties.tags', '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.premier_add_on_name = kwargs.get('premier_add_on_name', None) + self.premier_add_on_location = kwargs.get('premier_add_on_location', None) + self.premier_add_on_tags = kwargs.get('premier_add_on_tags', None) + self.marketplace_publisher = kwargs.get('marketplace_publisher', None) + self.marketplace_offer = kwargs.get('marketplace_offer', None) + + +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 + :param process_info_id: ARM Identifier for deployment. + :type process_info_id: int + :param process_info_name: Deployment name. + :type process_info_name: str + :param href: HRef URI. + :type href: str + :param mini_dump: Minidump URI. + :type mini_dump: 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.v2016_08_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.v2016_08_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 + :param total_processor_time: Total CPU time. + :type total_processor_time: str + :param user_processor_time: User CPU time. + :type user_processor_time: str + :param privileged_processor_time: Privileged CPU time. + :type privileged_processor_time: str + :param working_set64: Working set. + :type working_set64: long + :param peak_working_set64: Peak working set. + :type peak_working_set64: long + :param private_memory_size64: Private memory size. + :type private_memory_size64: long + :param virtual_memory_size64: Virtual memory size. + :type virtual_memory_size64: long + :param peak_virtual_memory_size64: Peak virtual memory usage. + :type peak_virtual_memory_size64: long + :param paged_system_memory_size64: Paged system memory. + :type paged_system_memory_size64: long + :param nonpaged_system_memory_size64: Non-paged system memory. + :type nonpaged_system_memory_size64: long + :param paged_memory_size64: Paged memory. + :type paged_memory_size64: long + :param peak_paged_memory_size64: Peak paged memory. + :type peak_paged_memory_size64: long + :param time_stamp: Time stamp. + :type time_stamp: 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_web_job: Is this a Web Job? + :type is_web_job: bool + :param description: Description of process. + :type description: 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'}, + 'process_info_id': {'key': 'properties.id', 'type': 'int'}, + 'process_info_name': {'key': 'properties.name', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'mini_dump': {'key': 'properties.miniDump', 'type': 'str'}, + 'is_profile_running': {'key': 'properties.isProfileRunning', 'type': 'bool'}, + 'is_iis_profile_running': {'key': 'properties.isIisProfileRunning', 'type': 'bool'}, + 'iis_profile_timeout_in_seconds': {'key': 'properties.iisProfileTimeoutInSeconds', '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.openFileHandles', 'type': '[str]'}, + 'modules': {'key': 'properties.modules', 'type': '[ProcessModuleInfo]'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'command_line': {'key': 'properties.commandLine', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'handle_count': {'key': 'properties.handleCount', 'type': 'int'}, + 'module_count': {'key': 'properties.moduleCount', 'type': 'int'}, + 'thread_count': {'key': 'properties.threadCount', 'type': 'int'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, + 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, + 'privileged_processor_time': {'key': 'properties.privilegedProcessorTime', 'type': 'str'}, + 'working_set64': {'key': 'properties.workingSet64', 'type': 'long'}, + 'peak_working_set64': {'key': 'properties.peakWorkingSet64', 'type': 'long'}, + 'private_memory_size64': {'key': 'properties.privateMemorySize64', 'type': 'long'}, + 'virtual_memory_size64': {'key': 'properties.virtualMemorySize64', 'type': 'long'}, + 'peak_virtual_memory_size64': {'key': 'properties.peakVirtualMemorySize64', 'type': 'long'}, + 'paged_system_memory_size64': {'key': 'properties.pagedSystemMemorySize64', 'type': 'long'}, + 'nonpaged_system_memory_size64': {'key': 'properties.nonpagedSystemMemorySize64', 'type': 'long'}, + 'paged_memory_size64': {'key': 'properties.pagedMemorySize64', 'type': 'long'}, + 'peak_paged_memory_size64': {'key': 'properties.peakPagedMemorySize64', 'type': 'long'}, + 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, + 'environment_variables': {'key': 'properties.environmentVariables', 'type': '{str}'}, + 'is_scm_site': {'key': 'properties.isScmSite', 'type': 'bool'}, + 'is_web_job': {'key': 'properties.isWebJob', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProcessInfo, self).__init__(**kwargs) + self.process_info_id = kwargs.get('process_info_id', None) + self.process_info_name = kwargs.get('process_info_name', None) + self.href = kwargs.get('href', None) + self.mini_dump = kwargs.get('mini_dump', 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_processor_time = kwargs.get('total_processor_time', None) + self.user_processor_time = kwargs.get('user_processor_time', None) + self.privileged_processor_time = kwargs.get('privileged_processor_time', None) + self.working_set64 = kwargs.get('working_set64', None) + self.peak_working_set64 = kwargs.get('peak_working_set64', None) + self.private_memory_size64 = kwargs.get('private_memory_size64', None) + self.virtual_memory_size64 = kwargs.get('virtual_memory_size64', None) + self.peak_virtual_memory_size64 = kwargs.get('peak_virtual_memory_size64', None) + self.paged_system_memory_size64 = kwargs.get('paged_system_memory_size64', None) + self.nonpaged_system_memory_size64 = kwargs.get('nonpaged_system_memory_size64', None) + self.paged_memory_size64 = kwargs.get('paged_memory_size64', None) + self.peak_paged_memory_size64 = kwargs.get('peak_paged_memory_size64', 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_web_job = kwargs.get('is_web_job', None) + self.description = kwargs.get('description', 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.baseAddress', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'module_memory_size': {'key': 'properties.moduleMemorySize', 'type': 'int'}, + 'file_version': {'key': 'properties.fileVersion', 'type': 'str'}, + 'file_description': {'key': 'properties.fileDescription', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'product_version': {'key': 'properties.productVersion', 'type': 'str'}, + 'is_debug': {'key': 'properties.isDebug', '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 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 + :param process_thread_info_id: ARM Identifier for deployment. + :type process_thread_info_id: 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 + :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 priviledged_processor_time: Privileged processor time. + :type priviledged_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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'process_thread_info_id': {'key': 'properties.id', 'type': 'int'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'process': {'key': 'properties.process', 'type': 'str'}, + 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, + 'current_priority': {'key': 'properties.currentPriority', 'type': 'int'}, + 'priority_level': {'key': 'properties.priorityLevel', 'type': 'str'}, + 'base_priority': {'key': 'properties.basePriority', 'type': 'int'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, + 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, + 'priviledged_processor_time': {'key': 'properties.priviledgedProcessorTime', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'wait_reason': {'key': 'properties.waitReason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProcessThreadInfo, self).__init__(**kwargs) + self.process_thread_info_id = kwargs.get('process_thread_info_id', 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.priviledged_processor_time = kwargs.get('priviledged_processor_time', None) + self.state = kwargs.get('state', None) + self.wait_reason = kwargs.get('wait_reason', 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.v2016_08_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': 'PublicCertificateLocation'}, + '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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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 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 RequestsBasedTrigger(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 ResourceMetric(Model): + """Object representing a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of metric. + :vartype name: ~azure.mgmt.web.v2016_08_01.models.ResourceMetricName + :ivar unit: Metric unit. + :vartype unit: str + :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D + :vartype time_grain: str + :ivar start_time: Metric start time. + :vartype start_time: datetime + :ivar end_time: Metric end time. + :vartype end_time: datetime + :ivar resource_id: Metric resource Id. + :vartype resource_id: str + :ivar id: Resource Id. + :vartype id: str + :ivar metric_values: Metric values. + :vartype metric_values: + list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricValue] + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricProperty] + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'id': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'ResourceMetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs): + super(ResourceMetric, self).__init__(**kwargs) + self.name = None + self.unit = None + self.time_grain = None + self.start_time = None + self.end_time = None + self.resource_id = None + self.id = None + self.metric_values = None + self.properties = None + + +class ResourceMetricAvailability(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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2016_08_01.models.ResourceMetricName + :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.v2016_08_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricDefinition, self).__init__(**kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceMetricProperty(Model): + """Resource metric property. + + :param key: Key for resource metric property. + :type key: str + :param value: Value of pair. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricProperty, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + + +class ResourceMetricValue(Model): + """Value of resource metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Value timestamp. + :vartype timestamp: str + :ivar average: Value average. + :vartype average: float + :ivar minimum: Value minimum. + :vartype minimum: float + :ivar maximum: Value maximum. + :vartype maximum: float + :ivar total: Value total. + :vartype total: float + :ivar count: Value count. + :vartype count: float + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricProperty] + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'total': {'readonly': True}, + 'count': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'float'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricValue, self).__init__(**kwargs) + self.timestamp = None + self.average = None + self.minimum = None + self.maximum = None + self.total = None + self.count = None + self.properties = None + + +class RestoreRequest(ProxyOnlyResource): + """Description of a restore request. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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.v2016_08_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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'. Default value: "Default" . + :type operation_type: str or + ~azure.mgmt.web.v2016_08_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + '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 RestoreResponse(ProxyOnlyResource): + """Response for an app 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 + :ivar operation_id: When server starts the restore process, it will return + an operation ID identifying that particular restore 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(RestoreResponse, self).__init__(**kwargs) + self.operation_id = 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: Resource tags. + :type tags: dict[str, str] + :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.v2016_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2016_08_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.v2016_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2016_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2016_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2016_08_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2016_08_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2016_08_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = kwargs.get('https_only', None) + self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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.v2016_08_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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' + :type default_provider: str or + ~azure.mgmt.web.v2016_08_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 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 allowed_audiences: Allowed audience values to consider when + validating JWTs issued by + Azure Active Directory. Note that the 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + 'additional_login_params': {'key': 'properties.additionalLoginParams', 'type': '[str]'}, + 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, + 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, + 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, + 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, + 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, + 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, + 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, + 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, + 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, + 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, + 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', '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.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.issuer = kwargs.get('issuer', None) + self.allowed_audiences = kwargs.get('allowed_audiences', None) + self.additional_login_params = kwargs.get('additional_login_params', None) + self.google_client_id = kwargs.get('google_client_id', None) + self.google_client_secret = kwargs.get('google_client_secret', None) + self.google_oauth_scopes = kwargs.get('google_oauth_scopes', None) + self.facebook_app_id = kwargs.get('facebook_app_id', None) + self.facebook_app_secret = kwargs.get('facebook_app_secret', None) + self.facebook_oauth_scopes = kwargs.get('facebook_oauth_scopes', None) + self.twitter_consumer_key = kwargs.get('twitter_consumer_key', None) + self.twitter_consumer_secret = kwargs.get('twitter_consumer_secret', 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_oauth_scopes = kwargs.get('microsoft_account_oauth_scopes', None) + + +class SiteCloneability(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.v2016_08_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2016_08_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.v2016_08_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2016_08_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + '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(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(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2016_08_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2016_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2016_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2016_08_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' + :type scm_type: str or ~azure.mgmt.web.v2016_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2016_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2016_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2016_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2016_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2016_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2016_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2016_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2016_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2016_08_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2016_08_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2016_08_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) + self.http20_enabled = kwargs.get('http20_enabled', True) + self.min_tls_version = kwargs.get('min_tls_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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2016_08_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2016_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2016_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2016_08_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' + :type scm_type: str or ~azure.mgmt.web.v2016_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2016_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2016_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2016_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2016_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2016_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2016_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2016_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2016_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2016_08_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2016_08_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2016_08_01.models.SupportedTlsVersions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'properties.linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, + 'push': {'key': 'properties.push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'properties.autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, + } + + 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) + self.http20_enabled = kwargs.get('http20_enabled', True) + self.min_tls_version = kwargs.get('min_tls_version', 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 + :ivar site_configuration_snapshot_info_id: The id of the snapshot + :vartype site_configuration_snapshot_info_id: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time': {'readonly': True}, + 'site_configuration_snapshot_info_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'}, + 'site_configuration_snapshot_info_id': {'key': 'properties.id', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SiteConfigurationSnapshotInfo, self).__init__(**kwargs) + self.time = None + self.site_configuration_snapshot_info_id = 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 site_extension_info_id: Site extension ID. + :type site_extension_info_id: str + :param title: Site extension title. + :type title: str + :param site_extension_info_type: Site extension type. Possible values + include: 'Gallery', 'WebRoot' + :type site_extension_info_type: str or + ~azure.mgmt.web.v2016_08_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 installation_args: Installer command line parameters. + :type installation_args: str + :param published_date_time: Published timestamp. + :type published_date_time: datetime + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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'}, + 'site_extension_info_id': {'key': 'properties.id', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'site_extension_info_type': {'key': 'properties.type', 'type': 'SiteExtensionType'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'extension_url': {'key': 'properties.extensionUrl', 'type': 'str'}, + 'project_url': {'key': 'properties.projectUrl', 'type': 'str'}, + 'icon_url': {'key': 'properties.iconUrl', 'type': 'str'}, + 'license_url': {'key': 'properties.licenseUrl', 'type': 'str'}, + 'feed_url': {'key': 'properties.feedUrl', 'type': 'str'}, + 'authors': {'key': 'properties.authors', 'type': '[str]'}, + 'installation_args': {'key': 'properties.installationArgs', 'type': 'str'}, + 'published_date_time': {'key': 'properties.publishedDateTime', 'type': 'iso-8601'}, + 'download_count': {'key': 'properties.downloadCount', 'type': 'int'}, + 'local_is_latest_version': {'key': 'properties.localIsLatestVersion', 'type': 'bool'}, + 'local_path': {'key': 'properties.localPath', 'type': 'str'}, + 'installed_date_time': {'key': 'properties.installedDateTime', '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.site_extension_info_id = kwargs.get('site_extension_info_id', None) + self.title = kwargs.get('title', None) + self.site_extension_info_type = kwargs.get('site_extension_info_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.installation_args = kwargs.get('installation_args', 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 SiteInstance(ProxyOnlyResource): + """Instance 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 site_instance_name: Name of instance. + :vartype site_instance_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'site_instance_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'}, + 'site_instance_name': {'key': 'properties.name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SiteInstance, self).__init__(**kwargs) + self.site_instance_name = None + + +class SiteLimits(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.v2016_08_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2016_08_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2016_08_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2016_08_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(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 + :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.v2016_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2016_08_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.v2016_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2016_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2016_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2016_08_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2016_08_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: 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}, + } + + _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'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, + 'usage_state': {'key': 'properties.usageState', 'type': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SitePatchResource, self).__init__(**kwargs) + 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = kwargs.get('https_only', 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 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, + 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, + 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, + } + + 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.deployment_rollback_enabled = kwargs.get('deployment_rollback_enabled', None) + self.is_mercurial = kwargs.get('is_mercurial', None) + + +class SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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.v2016_08_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.v2016_08_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 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] + """ + + _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]'}, + } + + 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) + + +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 slot_difference_type: Type of the difference: Information, Warning + or Error. + :vartype slot_difference_type: 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}, + 'slot_difference_type': {'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'}, + 'slot_difference_type': {'key': 'properties.type', '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.slot_difference_type = 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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.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 SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SnapshotRecoveryRequest, self).__init__(**kwargs) + self.snapshot_time = kwargs.get('snapshot_time', None) + self.recovery_target = kwargs.get('recovery_target', 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) + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.id = kwargs.get('id', None) + + +class StatusCodesBasedTrigger(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 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'}, + '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.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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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 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 triggered_job_runs: List of triggered web job runs. + :type triggered_job_runs: + list[~azure.mgmt.web.v2016_08_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'}, + 'triggered_job_runs': {'key': 'properties.triggeredJobRuns', 'type': '[TriggeredJobRun]'}, + } + + def __init__(self, **kwargs): + super(TriggeredJobHistory, self).__init__(**kwargs) + self.triggered_job_runs = kwargs.get('triggered_job_runs', 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 triggered_job_run_id: Job ID. + :type triggered_job_run_id: str + :ivar triggered_job_run_name: Job name. + :vartype triggered_job_run_name: str + :param status: Job status. Possible values include: 'Success', 'Failed', + 'Error' + :type status: str or + ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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}, + 'triggered_job_run_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'}, + 'triggered_job_run_id': {'key': 'properties.id', 'type': 'str'}, + 'triggered_job_run_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TriggeredWebJobStatus'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'properties.duration', 'type': 'str'}, + 'output_url': {'key': 'properties.outputUrl', 'type': 'str'}, + 'error_url': {'key': 'properties.errorUrl', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'job_name': {'key': 'properties.jobName', 'type': 'str'}, + 'trigger': {'key': 'properties.trigger', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TriggeredJobRun, self).__init__(**kwargs) + self.triggered_job_run_id = kwargs.get('triggered_job_run_id', None) + self.triggered_job_run_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.v2016_08_01.models.TriggeredJobRun + :param history_url: History URL. + :type history_url: str + :param scheduler_logs_url: Scheduler Logs URL. + :type scheduler_logs_url: str + :ivar triggered_web_job_name: Job name. Used as job identifier in ARM + resource URI. + :vartype triggered_web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', + 'Triggered' + :type job_type: str or ~azure.mgmt.web.v2016_08_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}, + 'triggered_web_job_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'}, + 'latest_run': {'key': 'properties.latestRun', 'type': 'TriggeredJobRun'}, + 'history_url': {'key': 'properties.historyUrl', 'type': 'str'}, + 'scheduler_logs_url': {'key': 'properties.schedulerLogsUrl', 'type': 'str'}, + 'triggered_web_job_name': {'key': 'properties.name', 'type': 'str'}, + 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, + 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.usingSdk', '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.triggered_web_job_name = 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.job_type = kwargs.get('job_type', None) + self.error = kwargs.get('error', None) + self.using_sdk = kwargs.get('using_sdk', None) + self.settings = kwargs.get('settings', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + 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) + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2016_08_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(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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2016_08_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + 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) + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2016_08_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'}, + 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) + 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 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 + :ivar web_job_name: Job name. Used as job identifier in ARM resource URI. + :vartype web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', + 'Triggered' + :type job_type: str or ~azure.mgmt.web.v2016_08_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}, + 'web_job_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'}, + 'web_job_name': {'key': 'properties.name', 'type': 'str'}, + 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, + 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(WebJob, self).__init__(**kwargs) + self.web_job_name = 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.job_type = kwargs.get('job_type', None) + self.error = kwargs.get('error', None) + self.using_sdk = kwargs.get('using_sdk', None) + self.settings = kwargs.get('settings', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models_py3.py new file mode 100644 index 00000000000..a14b423c995 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models_py3.py @@ -0,0 +1,6213 @@ +# 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 msrest.serialization import Model + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2016_08_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2016_08_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2016_08_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: + 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.location = location + self.type = None + self.tags = tags + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2016_08_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2016_08_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2016_08_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2016_08_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_plan_name = app_service_plan_name + self.worker_tier_name = worker_tier_name + self.status = None + self.subscription = None + self.admin_site_name = admin_site_name + 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.number_of_sites = None + self.is_spot = is_spot + self.spot_expiration_time = spot_expiration_time + self.resource_group = None + self.reserved = reserved + self.target_worker_count = target_worker_count + self.target_worker_size_id = target_worker_size_id + self.provisioning_state = None + self.sku = sku + + +class AutoHealActions(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.v2016_08_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2016_08_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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.v2016_08_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2016_08_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2016_08_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.v2016_08_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2016_08_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +class AzureBlobStorageApplicationLogsConfig(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.v2016_08_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + } + + def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: + super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + self.retention_in_days = retention_in_days + + +class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) + self.sas_url = sas_url + self.retention_in_days = retention_in_days + self.enabled = enabled + + +class AzureTableStorageApplicationLogsConfig(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.v2016_08_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: + super(AzureTableStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + + +class ProxyOnlyResource(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: str=None, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = None + + +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 backup_item_name: Name of this backup. + :vartype backup_item_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.v2016_08_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 + :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.v2016_08_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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: str=None, **kwargs) -> None: + super(BackupItem, self).__init__(kind=kind, **kwargs) + self.backup_id = None + self.storage_account_url = None + self.blob_name = None + self.backup_item_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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param backup_request_name: Required. Name of the backup. + :type backup_request_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: Required. 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.v2016_08_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2016_08_01.models.DatabaseBackupSetting] + :param backup_request_type: Type of the backup. Possible values include: + 'Default', 'Clone', 'Relocation', 'Snapshot' + :type backup_request_type: str or + ~azure.mgmt.web.v2016_08_01.models.BackupRestoreOperationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'backup_request_name': {'required': True}, + 'storage_account_url': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backup_request_name': {'key': 'properties.name', '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]'}, + 'backup_request_type': {'key': 'properties.type', 'type': 'BackupRestoreOperationType'}, + } + + def __init__(self, *, backup_request_name: str, storage_account_url: str, kind: str=None, enabled: bool=None, backup_schedule=None, databases=None, backup_request_type=None, **kwargs) -> None: + super(BackupRequest, self).__init__(kind=kind, **kwargs) + self.backup_request_name = backup_request_name + self.enabled = enabled + self.storage_account_url = storage_account_url + self.backup_schedule = backup_schedule + self.databases = databases + self.backup_request_type = backup_request_type + + +class BackupSchedule(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). Default value: 7 . + :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.v2016_08_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: + 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 Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + super(Capability, self).__init__(**kwargs) + self.name = name + self.value = value + self.reason = reason + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: + 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.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 + self.ignore_quotas = ignore_quotas + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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.v2016_08_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: str=None, properties=None, **kwargs) -> None: + super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class ConnStringInfo(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.v2016_08_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class ConnStringValueTypePair(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.v2016_08_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, value: str, type, **kwargs) -> None: + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = value + self.type = type + + +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.v2016_08_01.models.ContinuousWebJobStatus + :param detailed_status: Detailed status. + :type detailed_status: str + :param log_url: Log URL. + :type log_url: str + :ivar continuous_web_job_name: Job name. Used as job identifier in ARM + resource URI. + :vartype continuous_web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', + 'Triggered' + :type job_type: str or ~azure.mgmt.web.v2016_08_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}, + 'continuous_web_job_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'}, + 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, + 'detailed_status': {'key': 'properties.detailedStatus', 'type': 'str'}, + 'log_url': {'key': 'properties.logUrl', 'type': 'str'}, + 'continuous_web_job_name': {'key': 'properties.name', 'type': 'str'}, + 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, + 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + super(ContinuousWebJob, self).__init__(kind=kind, **kwargs) + self.status = status + self.detailed_status = detailed_status + self.log_url = log_url + self.continuous_web_job_name = None + self.run_command = run_command + self.url = url + self.extra_info_url = extra_info_url + self.job_type = job_type + self.error = error + self.using_sdk = using_sdk + self.settings = settings + + +class CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + + +class CsmPublishingProfileOptions(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.v2016_08_01.models.PublishingProfileFormat + """ + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + } + + def __init__(self, *, format=None, **kwargs) -> None: + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = format + + +class CsmSlotEntity(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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) -> None: + super(CsmSlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.preserve_vnet = preserve_vnet + + +class CsmUsageQuota(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 + :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.v2016_08_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + 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 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: true if hostname is + already verified; otherwise, 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.v2016_08_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.v2016_08_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, + 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: + 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_cname_records = alternate_cname_records + self.alternate_txt_records = alternate_txt_records + + +class DatabaseBackupSetting(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.v2016_08_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: + 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 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 deployment_id: Identifier for deployment. + :type deployment_id: 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 + :param end_time: End time. + :type end_time: 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'}, + 'deployment_id': {'key': 'properties.id', '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.authorEmail', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'active': {'key': 'properties.active', 'type': 'bool'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, deployment_id: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: + super(Deployment, self).__init__(kind=kind, **kwargs) + self.deployment_id = deployment_id + 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 EnabledConfig(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: bool=None, **kwargs) -> None: + super(EnabledConfig, self).__init__(**kwargs) + self.enabled = enabled + + +class ErrorEntity(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.v2016_08_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: + 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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2016_08_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class FileSystemApplicationLogsConfig(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2016_08_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, *, level="Off", **kwargs) -> None: + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + + +class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + super(FileSystemHttpLogsConfig, self).__init__(**kwargs) + self.retention_in_mb = retention_in_mb + self.retention_in_days = retention_in_days + self.enabled = enabled + + +class FunctionEnvelope(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 + :ivar function_envelope_name: Function name. + :vartype function_envelope_name: str + :ivar function_app_id: Function App ID. + :vartype 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 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'function_envelope_name': {'readonly': True}, + 'function_app_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'}, + 'function_envelope_name': {'key': 'properties.name', 'type': 'str'}, + 'function_app_id': {'key': 'properties.functionAppId', 'type': 'str'}, + 'script_root_path_href': {'key': 'properties.scriptRootPathHref', 'type': 'str'}, + 'script_href': {'key': 'properties.scriptHref', 'type': 'str'}, + 'config_href': {'key': 'properties.configHref', 'type': 'str'}, + 'secrets_file_href': {'key': 'properties.secretsFileHref', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'config': {'key': 'properties.config', 'type': 'object'}, + 'files': {'key': 'properties.files', 'type': '{str}'}, + 'test_data': {'key': 'properties.testData', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, **kwargs) -> None: + super(FunctionEnvelope, self).__init__(kind=kind, **kwargs) + self.function_envelope_name = None + self.function_app_id = None + self.script_root_path_href = script_root_path_href + self.script_href = script_href + self.config_href = config_href + self.secrets_file_href = secrets_file_href + self.href = href + self.config = config + self.files = files + self.test_data = test_data + + +class FunctionSecrets(ProxyOnlyResource): + """Function secrets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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: Secret key. + :type key: str + :param trigger_url: Trigger URL. + :type trigger_url: 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'}, + 'key': {'key': 'properties.key', 'type': 'str'}, + 'trigger_url': {'key': 'properties.triggerUrl', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, key: str=None, trigger_url: str=None, **kwargs) -> None: + super(FunctionSecrets, self).__init__(kind=kind, **kwargs) + self.key = key + self.trigger_url = trigger_url + + +class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.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.v2016_08_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.v2016_08_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2016_08_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2016_08_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: + 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 HostNameSslState(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.v2016_08_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 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.v2016_08_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2016_08_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2016_08_01.models.AzureBlobStorageHttpLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, + } + + def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: + super(HttpLogsConfig, self).__init__(**kwargs) + self.file_system = file_system + self.azure_blob_storage = azure_blob_storage + + +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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) + self.send_key_name = None + self.send_key_value = 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.identifier_id = identifier_id + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: + super(IpSecurityRestriction, self).__init__(**kwargs) + self.ip_address = ip_address + self.subnet_mask = subnet_mask + + +class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2016_08_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 + """ + + _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'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + + +class MigrateMySqlRequest(ProxyOnlyResource): + """MySQL migration request. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2016_08_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: + 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.v2016_08_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': 'OperationStatus'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: + 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.v2016_08_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: str=None, **kwargs) -> None: + super(MSDeployLog, self).__init__(kind=kind, **kwargs) + self.entries = None + + +class MSDeployLogEntry(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2016_08_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': 'MSDeployLogEntryType'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + 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.v2016_08_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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: str=None, **kwargs) -> None: + 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 NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + 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.v2016_08_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2016_08_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: str=None, **kwargs) -> None: + 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 Operation(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.v2016_08_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2016_08_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: + 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 PerfMonResponse(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.v2016_08_01.models.PerfMonSet + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'PerfMonSet'}, + } + + def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: + super(PerfMonResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.data = data + + +class PerfMonSample(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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 + :param core_count: Core Count of worker. Not a data member + :type core_count: int + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'instance_name': {'key': 'instanceName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + 'core_count': {'key': 'coreCount', 'type': 'int'}, + } + + def __init__(self, *, time=None, instance_name: str=None, value: float=None, core_count: int=None, **kwargs) -> None: + super(PerfMonSample, self).__init__(**kwargs) + self.time = time + self.instance_name = instance_name + self.value = value + self.core_count = core_count + + +class PerfMonSet(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 + :param end_time: End time of the period. + :type end_time: 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.v2016_08_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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: 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 premier_add_on_name: Premier add on Name. + :type premier_add_on_name: str + :param premier_add_on_location: Premier add on Location. + :type premier_add_on_location: str + :param premier_add_on_tags: Premier add on Tags. + :type premier_add_on_tags: dict[str, 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'}, + 'premier_add_on_name': {'key': 'properties.name', 'type': 'str'}, + 'premier_add_on_location': {'key': 'properties.location', 'type': 'str'}, + 'premier_add_on_tags': {'key': 'properties.tags', 'type': '{str}'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, premier_add_on_name: str=None, premier_add_on_location: str=None, premier_add_on_tags=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + super(PremierAddOn, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.sku = sku + self.product = product + self.vendor = vendor + self.premier_add_on_name = premier_add_on_name + self.premier_add_on_location = premier_add_on_location + self.premier_add_on_tags = premier_add_on_tags + self.marketplace_publisher = marketplace_publisher + self.marketplace_offer = marketplace_offer + + +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 + :param process_info_id: ARM Identifier for deployment. + :type process_info_id: int + :param process_info_name: Deployment name. + :type process_info_name: str + :param href: HRef URI. + :type href: str + :param mini_dump: Minidump URI. + :type mini_dump: 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.v2016_08_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.v2016_08_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 + :param total_processor_time: Total CPU time. + :type total_processor_time: str + :param user_processor_time: User CPU time. + :type user_processor_time: str + :param privileged_processor_time: Privileged CPU time. + :type privileged_processor_time: str + :param working_set64: Working set. + :type working_set64: long + :param peak_working_set64: Peak working set. + :type peak_working_set64: long + :param private_memory_size64: Private memory size. + :type private_memory_size64: long + :param virtual_memory_size64: Virtual memory size. + :type virtual_memory_size64: long + :param peak_virtual_memory_size64: Peak virtual memory usage. + :type peak_virtual_memory_size64: long + :param paged_system_memory_size64: Paged system memory. + :type paged_system_memory_size64: long + :param nonpaged_system_memory_size64: Non-paged system memory. + :type nonpaged_system_memory_size64: long + :param paged_memory_size64: Paged memory. + :type paged_memory_size64: long + :param peak_paged_memory_size64: Peak paged memory. + :type peak_paged_memory_size64: long + :param time_stamp: Time stamp. + :type time_stamp: 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_web_job: Is this a Web Job? + :type is_web_job: bool + :param description: Description of process. + :type description: 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'}, + 'process_info_id': {'key': 'properties.id', 'type': 'int'}, + 'process_info_name': {'key': 'properties.name', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'mini_dump': {'key': 'properties.miniDump', 'type': 'str'}, + 'is_profile_running': {'key': 'properties.isProfileRunning', 'type': 'bool'}, + 'is_iis_profile_running': {'key': 'properties.isIisProfileRunning', 'type': 'bool'}, + 'iis_profile_timeout_in_seconds': {'key': 'properties.iisProfileTimeoutInSeconds', '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.openFileHandles', 'type': '[str]'}, + 'modules': {'key': 'properties.modules', 'type': '[ProcessModuleInfo]'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'command_line': {'key': 'properties.commandLine', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'handle_count': {'key': 'properties.handleCount', 'type': 'int'}, + 'module_count': {'key': 'properties.moduleCount', 'type': 'int'}, + 'thread_count': {'key': 'properties.threadCount', 'type': 'int'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, + 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, + 'privileged_processor_time': {'key': 'properties.privilegedProcessorTime', 'type': 'str'}, + 'working_set64': {'key': 'properties.workingSet64', 'type': 'long'}, + 'peak_working_set64': {'key': 'properties.peakWorkingSet64', 'type': 'long'}, + 'private_memory_size64': {'key': 'properties.privateMemorySize64', 'type': 'long'}, + 'virtual_memory_size64': {'key': 'properties.virtualMemorySize64', 'type': 'long'}, + 'peak_virtual_memory_size64': {'key': 'properties.peakVirtualMemorySize64', 'type': 'long'}, + 'paged_system_memory_size64': {'key': 'properties.pagedSystemMemorySize64', 'type': 'long'}, + 'nonpaged_system_memory_size64': {'key': 'properties.nonpagedSystemMemorySize64', 'type': 'long'}, + 'paged_memory_size64': {'key': 'properties.pagedMemorySize64', 'type': 'long'}, + 'peak_paged_memory_size64': {'key': 'properties.peakPagedMemorySize64', 'type': 'long'}, + 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, + 'environment_variables': {'key': 'properties.environmentVariables', 'type': '{str}'}, + 'is_scm_site': {'key': 'properties.isScmSite', 'type': 'bool'}, + 'is_web_job': {'key': 'properties.isWebJob', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, process_info_id: int=None, process_info_name: str=None, href: str=None, mini_dump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, privileged_processor_time: str=None, working_set64: int=None, peak_working_set64: int=None, private_memory_size64: int=None, virtual_memory_size64: int=None, peak_virtual_memory_size64: int=None, paged_system_memory_size64: int=None, nonpaged_system_memory_size64: int=None, paged_memory_size64: int=None, peak_paged_memory_size64: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_web_job: bool=None, description: str=None, **kwargs) -> None: + super(ProcessInfo, self).__init__(kind=kind, **kwargs) + self.process_info_id = process_info_id + self.process_info_name = process_info_name + self.href = href + self.mini_dump = mini_dump + 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_processor_time = total_processor_time + self.user_processor_time = user_processor_time + self.privileged_processor_time = privileged_processor_time + self.working_set64 = working_set64 + self.peak_working_set64 = peak_working_set64 + self.private_memory_size64 = private_memory_size64 + self.virtual_memory_size64 = virtual_memory_size64 + self.peak_virtual_memory_size64 = peak_virtual_memory_size64 + self.paged_system_memory_size64 = paged_system_memory_size64 + self.nonpaged_system_memory_size64 = nonpaged_system_memory_size64 + self.paged_memory_size64 = paged_memory_size64 + self.peak_paged_memory_size64 = peak_paged_memory_size64 + self.time_stamp = time_stamp + self.environment_variables = environment_variables + self.is_scm_site = is_scm_site + self.is_web_job = is_web_job + self.description = description + + +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.baseAddress', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'module_memory_size': {'key': 'properties.moduleMemorySize', 'type': 'int'}, + 'file_version': {'key': 'properties.fileVersion', 'type': 'str'}, + 'file_description': {'key': 'properties.fileDescription', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'product_version': {'key': 'properties.productVersion', 'type': 'str'}, + 'is_debug': {'key': 'properties.isDebug', 'type': 'bool'}, + 'language': {'key': 'properties.language', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: + 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 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 + :param process_thread_info_id: ARM Identifier for deployment. + :type process_thread_info_id: 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 + :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 priviledged_processor_time: Privileged processor time. + :type priviledged_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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'process_thread_info_id': {'key': 'properties.id', 'type': 'int'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'process': {'key': 'properties.process', 'type': 'str'}, + 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, + 'current_priority': {'key': 'properties.currentPriority', 'type': 'int'}, + 'priority_level': {'key': 'properties.priorityLevel', 'type': 'str'}, + 'base_priority': {'key': 'properties.basePriority', 'type': 'int'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, + 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, + 'priviledged_processor_time': {'key': 'properties.priviledgedProcessorTime', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'wait_reason': {'key': 'properties.waitReason', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, process_thread_info_id: int=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, priviledged_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: + super(ProcessThreadInfo, self).__init__(kind=kind, **kwargs) + self.process_thread_info_id = process_thread_info_id + 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.priviledged_processor_time = priviledged_processor_time + self.state = state + self.wait_reason = wait_reason + + +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.v2016_08_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': 'PublicCertificateLocation'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: + super(PublicCertificate, self).__init__(kind=kind, **kwargs) + self.blob = blob + self.public_certificate_location = public_certificate_location + self.thumbprint = None + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: + 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 RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +class ResourceMetric(Model): + """Object representing a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of metric. + :vartype name: ~azure.mgmt.web.v2016_08_01.models.ResourceMetricName + :ivar unit: Metric unit. + :vartype unit: str + :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D + :vartype time_grain: str + :ivar start_time: Metric start time. + :vartype start_time: datetime + :ivar end_time: Metric end time. + :vartype end_time: datetime + :ivar resource_id: Metric resource Id. + :vartype resource_id: str + :ivar id: Resource Id. + :vartype id: str + :ivar metric_values: Metric values. + :vartype metric_values: + list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricValue] + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricProperty] + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'id': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'ResourceMetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetric, self).__init__(**kwargs) + self.name = None + self.unit = None + self.time_grain = None + self.start_time = None + self.end_time = None + self.resource_id = None + self.id = None + self.metric_values = None + self.properties = None + + +class ResourceMetricAvailability(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) -> None: + 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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2016_08_01.models.ResourceMetricName + :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.v2016_08_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceMetricProperty(Model): + """Resource metric property. + + :param key: Key for resource metric property. + :type key: str + :param value: Value of pair. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + super(ResourceMetricProperty, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ResourceMetricValue(Model): + """Value of resource metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Value timestamp. + :vartype timestamp: str + :ivar average: Value average. + :vartype average: float + :ivar minimum: Value minimum. + :vartype minimum: float + :ivar maximum: Value maximum. + :vartype maximum: float + :ivar total: Value total. + :vartype total: float + :ivar count: Value count. + :vartype count: float + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricProperty] + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'total': {'readonly': True}, + 'count': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'float'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricValue, self).__init__(**kwargs) + self.timestamp = None + self.average = None + self.minimum = None + self.maximum = None + self.total = None + self.count = None + self.properties = None + + +class RestoreRequest(ProxyOnlyResource): + """Description of a restore request. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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.v2016_08_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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'. Default value: "Default" . + :type operation_type: str or + ~azure.mgmt.web.v2016_08_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + } + + def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: + 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 RestoreResponse(ProxyOnlyResource): + """Response for an app 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 + :ivar operation_id: When server starts the restore process, it will return + an operation ID identifying that particular restore 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: str=None, **kwargs) -> None: + super(RestoreResponse, self).__init__(kind=kind, **kwargs) + self.operation_id = 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: Resource tags. + :type tags: dict[str, str] + :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.v2016_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2016_08_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.v2016_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2016_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2016_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2016_08_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2016_08_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2016_08_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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.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.host_names_disabled = host_names_disabled + 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.snapshot_info = snapshot_info + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = https_only + self.identity = identity + + +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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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.v2016_08_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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' + :type default_provider: str or + ~azure.mgmt.web.v2016_08_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 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 allowed_audiences: Allowed audience values to consider when + validating JWTs issued by + Azure Active Directory. Note that the 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + 'additional_login_params': {'key': 'properties.additionalLoginParams', 'type': '[str]'}, + 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, + 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, + 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, + 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, + 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, + 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, + 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, + 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, + 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, + 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, + 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, issuer: str=None, allowed_audiences=None, additional_login_params=None, google_client_id: str=None, google_client_secret: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_oauth_scopes=None, **kwargs) -> None: + super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_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.issuer = issuer + self.allowed_audiences = allowed_audiences + self.additional_login_params = additional_login_params + self.google_client_id = google_client_id + self.google_client_secret = google_client_secret + self.google_oauth_scopes = google_oauth_scopes + self.facebook_app_id = facebook_app_id + self.facebook_app_secret = facebook_app_secret + self.facebook_oauth_scopes = facebook_oauth_scopes + self.twitter_consumer_key = twitter_consumer_key + self.twitter_consumer_secret = twitter_consumer_secret + self.microsoft_account_client_id = microsoft_account_client_id + self.microsoft_account_client_secret = microsoft_account_client_secret + self.microsoft_account_oauth_scopes = microsoft_account_oauth_scopes + + +class SiteCloneability(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.v2016_08_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2016_08_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.v2016_08_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2016_08_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, + } + + def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: + 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(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: str=None, description: str=None, **kwargs) -> None: + super(SiteCloneabilityCriterion, self).__init__(**kwargs) + self.name = name + self.description = description + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2016_08_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2016_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2016_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2016_08_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' + :type scm_type: str or ~azure.mgmt.web.v2016_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2016_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2016_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2016_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2016_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2016_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2016_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2016_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2016_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2016_08_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2016_08_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2016_08_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: + 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.linux_fx_version = linux_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.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.cors = cors + self.push = push + self.api_definition = api_definition + self.auto_swap_slot_name = auto_swap_slot_name + self.local_my_sql_enabled = local_my_sql_enabled + self.ip_security_restrictions = ip_security_restrictions + self.http20_enabled = http20_enabled + self.min_tls_version = min_tls_version + + +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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2016_08_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2016_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2016_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2016_08_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' + :type scm_type: str or ~azure.mgmt.web.v2016_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2016_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2016_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2016_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2016_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2016_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2016_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2016_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2016_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2016_08_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2016_08_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2016_08_01.models.SupportedTlsVersions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'properties.linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, + 'push': {'key': 'properties.push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'properties.autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: + 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.linux_fx_version = linux_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.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.cors = cors + self.push = push + self.api_definition = api_definition + self.auto_swap_slot_name = auto_swap_slot_name + self.local_my_sql_enabled = local_my_sql_enabled + self.ip_security_restrictions = ip_security_restrictions + self.http20_enabled = http20_enabled + self.min_tls_version = min_tls_version + + +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 + :ivar site_configuration_snapshot_info_id: The id of the snapshot + :vartype site_configuration_snapshot_info_id: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time': {'readonly': True}, + 'site_configuration_snapshot_info_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'}, + 'site_configuration_snapshot_info_id': {'key': 'properties.id', 'type': 'int'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) + self.time = None + self.site_configuration_snapshot_info_id = 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 site_extension_info_id: Site extension ID. + :type site_extension_info_id: str + :param title: Site extension title. + :type title: str + :param site_extension_info_type: Site extension type. Possible values + include: 'Gallery', 'WebRoot' + :type site_extension_info_type: str or + ~azure.mgmt.web.v2016_08_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 installation_args: Installer command line parameters. + :type installation_args: str + :param published_date_time: Published timestamp. + :type published_date_time: datetime + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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'}, + 'site_extension_info_id': {'key': 'properties.id', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'site_extension_info_type': {'key': 'properties.type', 'type': 'SiteExtensionType'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'extension_url': {'key': 'properties.extensionUrl', 'type': 'str'}, + 'project_url': {'key': 'properties.projectUrl', 'type': 'str'}, + 'icon_url': {'key': 'properties.iconUrl', 'type': 'str'}, + 'license_url': {'key': 'properties.licenseUrl', 'type': 'str'}, + 'feed_url': {'key': 'properties.feedUrl', 'type': 'str'}, + 'authors': {'key': 'properties.authors', 'type': '[str]'}, + 'installation_args': {'key': 'properties.installationArgs', 'type': 'str'}, + 'published_date_time': {'key': 'properties.publishedDateTime', 'type': 'iso-8601'}, + 'download_count': {'key': 'properties.downloadCount', 'type': 'int'}, + 'local_is_latest_version': {'key': 'properties.localIsLatestVersion', 'type': 'bool'}, + 'local_path': {'key': 'properties.localPath', 'type': 'str'}, + 'installed_date_time': {'key': 'properties.installedDateTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'comment': {'key': 'properties.comment', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, site_extension_info_id: str=None, title: str=None, site_extension_info_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installation_args: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: + super(SiteExtensionInfo, self).__init__(kind=kind, **kwargs) + self.site_extension_info_id = site_extension_info_id + self.title = title + self.site_extension_info_type = site_extension_info_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.installation_args = installation_args + 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 SiteInstance(ProxyOnlyResource): + """Instance 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 site_instance_name: Name of instance. + :vartype site_instance_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'site_instance_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'}, + 'site_instance_name': {'key': 'properties.name', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(SiteInstance, self).__init__(kind=kind, **kwargs) + self.site_instance_name = None + + +class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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.v2016_08_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2016_08_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2016_08_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2016_08_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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: + 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + 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 + :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.v2016_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2016_08_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.v2016_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2016_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2016_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2016_08_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2016_08_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: 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}, + } + + _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'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, + 'usage_state': {'key': 'properties.usageState', 'type': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, **kwargs) -> None: + super(SitePatchResource, self).__init__(kind=kind, **kwargs) + 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.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.host_names_disabled = host_names_disabled + 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.snapshot_info = snapshot_info + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = https_only + + +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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: + 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 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, + 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, + 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: + super(SiteSourceControl, self).__init__(kind=kind, **kwargs) + self.repo_url = repo_url + self.branch = branch + self.is_manual_integration = is_manual_integration + self.deployment_rollback_enabled = deployment_rollback_enabled + self.is_mercurial = is_mercurial + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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.v2016_08_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.v2016_08_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 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] + """ + + _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]'}, + } + + def __init__(self, *, kind: str=None, connection_string_names=None, app_setting_names=None, **kwargs) -> None: + super(SlotConfigNamesResource, self).__init__(kind=kind, **kwargs) + self.connection_string_names = connection_string_names + self.app_setting_names = app_setting_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 slot_difference_type: Type of the difference: Information, Warning + or Error. + :vartype slot_difference_type: 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}, + 'slot_difference_type': {'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'}, + 'slot_difference_type': {'key': 'properties.type', '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: str=None, **kwargs) -> None: + super(SlotDifference, self).__init__(kind=kind, **kwargs) + self.slot_difference_type = 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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + 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: str=None, **kwargs) -> None: + super(Snapshot, self).__init__(kind=kind, **kwargs) + self.time = None + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: + super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) + self.snapshot_time = snapshot_time + self.recovery_target = recovery_target + self.overwrite = overwrite + self.recover_configuration = recover_configuration + self.ignore_conflicting_host_names = ignore_conflicting_host_names + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: + super(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = location + self.id = id + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, properties=None, **kwargs) -> None: + super(StringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +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 triggered_job_runs: List of triggered web job runs. + :type triggered_job_runs: + list[~azure.mgmt.web.v2016_08_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'}, + 'triggered_job_runs': {'key': 'properties.triggeredJobRuns', 'type': '[TriggeredJobRun]'}, + } + + def __init__(self, *, kind: str=None, triggered_job_runs=None, **kwargs) -> None: + super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) + self.triggered_job_runs = triggered_job_runs + + +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 triggered_job_run_id: Job ID. + :type triggered_job_run_id: str + :ivar triggered_job_run_name: Job name. + :vartype triggered_job_run_name: str + :param status: Job status. Possible values include: 'Success', 'Failed', + 'Error' + :type status: str or + ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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}, + 'triggered_job_run_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'}, + 'triggered_job_run_id': {'key': 'properties.id', 'type': 'str'}, + 'triggered_job_run_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TriggeredWebJobStatus'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'properties.duration', 'type': 'str'}, + 'output_url': {'key': 'properties.outputUrl', 'type': 'str'}, + 'error_url': {'key': 'properties.errorUrl', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'job_name': {'key': 'properties.jobName', 'type': 'str'}, + 'trigger': {'key': 'properties.trigger', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, triggered_job_run_id: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: + super(TriggeredJobRun, self).__init__(kind=kind, **kwargs) + self.triggered_job_run_id = triggered_job_run_id + self.triggered_job_run_name = None + 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.v2016_08_01.models.TriggeredJobRun + :param history_url: History URL. + :type history_url: str + :param scheduler_logs_url: Scheduler Logs URL. + :type scheduler_logs_url: str + :ivar triggered_web_job_name: Job name. Used as job identifier in ARM + resource URI. + :vartype triggered_web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', + 'Triggered' + :type job_type: str or ~azure.mgmt.web.v2016_08_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}, + 'triggered_web_job_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'}, + 'latest_run': {'key': 'properties.latestRun', 'type': 'TriggeredJobRun'}, + 'history_url': {'key': 'properties.historyUrl', 'type': 'str'}, + 'scheduler_logs_url': {'key': 'properties.schedulerLogsUrl', 'type': 'str'}, + 'triggered_web_job_name': {'key': 'properties.name', 'type': 'str'}, + 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, + 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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.triggered_web_job_name = None + self.run_command = run_command + self.url = url + self.extra_info_url = extra_info_url + self.job_type = job_type + self.error = error + self.using_sdk = using_sdk + self.settings = settings + + +class User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: + super(User, self).__init__(kind=kind, **kwargs) + self.user_name = user_name + 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 + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2016_08_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2016_08_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: + 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 + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2016_08_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'}, + 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + super(VnetRoute, self).__init__(kind=kind, **kwargs) + self.vnet_route_name = vnet_route_name + self.start_address = start_address + self.end_address = end_address + self.route_type = route_type + + +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 + :ivar web_job_name: Job name. Used as job identifier in ARM resource URI. + :vartype web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', + 'Triggered' + :type job_type: str or ~azure.mgmt.web.v2016_08_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}, + 'web_job_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'}, + 'web_job_name': {'key': 'properties.name', 'type': 'str'}, + 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, + 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + super(WebJob, self).__init__(kind=kind, **kwargs) + self.web_job_name = None + self.run_command = run_command + self.url = url + self.extra_info_url = extra_info_url + self.job_type = job_type + self.error = error + self.using_sdk = using_sdk + self.settings = settings diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_paged_models.py new file mode 100644 index 00000000000..d1ae9d02553 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_paged_models.py @@ -0,0 +1,326 @@ +# 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 msrest.paging import Paged + + +class SitePaged(Paged): + """ + A paging container for iterating over a list of :class:`Site ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Site]'} + } + + def __init__(self, *args, **kwargs): + + super(SitePaged, self).__init__(*args, **kwargs) +class BackupItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupItem]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupItemPaged, self).__init__(*args, **kwargs) +class SiteConfigResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) +class SiteConfigurationSnapshotInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) +class ContinuousWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContinuousWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) +class DeploymentPaged(Paged): + """ + A paging container for iterating over a list of :class:`Deployment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Deployment]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentPaged, self).__init__(*args, **kwargs) +class IdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`Identifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Identifier]'} + } + + def __init__(self, *args, **kwargs): + + super(IdentifierPaged, self).__init__(*args, **kwargs) +class FunctionEnvelopePaged(Paged): + """ + A paging container for iterating over a list of :class:`FunctionEnvelope ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} + } + + def __init__(self, *args, **kwargs): + + super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) +class HostNameBindingPaged(Paged): + """ + A paging container for iterating over a list of :class:`HostNameBinding ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} + } + + def __init__(self, *args, **kwargs): + + super(HostNameBindingPaged, self).__init__(*args, **kwargs) +class SiteInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteInstancePaged, self).__init__(*args, **kwargs) +class ProcessInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessInfoPaged, self).__init__(*args, **kwargs) +class ProcessModuleInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessModuleInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) +class ProcessThreadInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessThreadInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) +class ResourceMetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) +class ResourceMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricPaged, self).__init__(*args, **kwargs) +class PerfMonResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`PerfMonResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(PerfMonResponsePaged, self).__init__(*args, **kwargs) +class PublicCertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`PublicCertificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} + } + + def __init__(self, *args, **kwargs): + + super(PublicCertificatePaged, self).__init__(*args, **kwargs) +class SiteExtensionInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteExtensionInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) +class SlotDifferencePaged(Paged): + """ + A paging container for iterating over a list of :class:`SlotDifference ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SlotDifference]'} + } + + def __init__(self, *args, **kwargs): + + super(SlotDifferencePaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) +class TriggeredWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) +class TriggeredJobHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredJobHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) +class CsmUsageQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmUsageQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) +class WebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(WebJobPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..d8fd32b4088 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_web_site_management_client_enums.py @@ -0,0 +1,292 @@ +# 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 + + +class LogLevel(str, Enum): + + off = "Off" + verbose = "Verbose" + information = "Information" + warning = "Warning" + error = "Error" + + +class BackupItemStatus(str, Enum): + + 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 DatabaseType(str, Enum): + + sql_azure = "SqlAzure" + my_sql = "MySql" + local_my_sql = "LocalMySql" + postgre_sql = "PostgreSql" + + +class FrequencyUnit(str, Enum): + + day = "Day" + hour = "Hour" + + +class BackupRestoreOperationType(str, Enum): + + default = "Default" + clone = "Clone" + relocation = "Relocation" + snapshot = "Snapshot" + + +class ConnectionStringType(str, Enum): + + 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(str, Enum): + + initializing = "Initializing" + starting = "Starting" + running = "Running" + pending_restart = "PendingRestart" + stopped = "Stopped" + + +class WebJobType(str, Enum): + + continuous = "Continuous" + triggered = "Triggered" + + +class PublishingProfileFormat(str, Enum): + + file_zilla3 = "FileZilla3" + web_deploy = "WebDeploy" + ftp = "Ftp" + + +class DnsVerificationTestResult(str, Enum): + + passed = "Passed" + failed = "Failed" + skipped = "Skipped" + + +class AzureResourceType(str, Enum): + + website = "Website" + traffic_manager = "TrafficManager" + + +class CustomHostNameDnsRecordType(str, Enum): + + cname = "CName" + a = "A" + + +class HostNameType(str, Enum): + + verified = "Verified" + managed = "Managed" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class MSDeployLogEntryType(str, Enum): + + message = "Message" + warning = "Warning" + error = "Error" + + +class MSDeployProvisioningState(str, Enum): + + accepted = "accepted" + running = "running" + succeeded = "succeeded" + failed = "failed" + canceled = "canceled" + + +class MySqlMigrationType(str, Enum): + + local_to_remote = "LocalToRemote" + remote_to_local = "RemoteToLocal" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" + + +class RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class PublicCertificateLocation(str, Enum): + + current_user_my = "CurrentUserMy" + local_machine_my = "LocalMachineMy" + unknown = "Unknown" + + +class UnauthenticatedClientAction(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + + +class BuiltInAuthenticationProvider(str, Enum): + + azure_active_directory = "AzureActiveDirectory" + facebook = "Facebook" + google = "Google" + microsoft_account = "MicrosoftAccount" + twitter = "Twitter" + + +class CloneAbilityResult(str, Enum): + + cloneable = "Cloneable" + partially_cloneable = "PartiallyCloneable" + not_cloneable = "NotCloneable" + + +class ScmType(str, Enum): + + 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" + + +class ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class SiteExtensionType(str, Enum): + + gallery = "Gallery" + web_root = "WebRoot" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class TriggeredWebJobStatus(str, Enum): + + success = "Success" + failed = "Failed" + error = "Error" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/__init__.py new file mode 100644 index 00000000000..caab7b18200 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/__init__.py @@ -0,0 +1,16 @@ +# 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_apps_operations import WebAppsOperations + +__all__ = [ + 'WebAppsOperations', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/_web_apps_operations.py new file mode 100644 index 00000000000..738fbf1fdd2 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/_web_apps_operations.py @@ -0,0 +1,23095 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WebAppsOperations(object): + """WebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all apps for a subscription. + + Get all apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SitePaged[~azure.mgmt.web.v2016_08_01.models.Site] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} + + def list_by_resource_group( + self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): + """Gets all web, mobile, and API apps in the specified resource group. + + 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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SitePaged[~azure.mgmt.web.v2016_08_01.models.Site] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + if include_slots is not None: + query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a web, mobile, or API app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + 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.v2016_08_01.models.Site + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.Site]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def delete( + self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """Deletes a web, mobile, or API app, or one of the deployment slots. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + 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.v2016_08_01.models.SitePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def analyze_custom_hostname( + self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): + """Analyze a custom hostname. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.analyze_custom_hostname.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} + + def apply_slot_config_to_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Applies the configuration settings from the target slot onto the + current slot. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_config_to_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} + + def backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """Creates a backup of an app. + + 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.v2016_08_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} + + def list_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets existing backups of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2016_08_01.models.BackupItemPaged[~azure.mgmt.web.v2016_08_01.models.BackupItem] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} + + def discover_restore( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """Discovers an existing app backup that can be restored from a blob in + Azure storage. + + Discovers an existing app backup that can be restored from a 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: A RestoreRequest object that includes Azure storage + URL and blog name for discovery of backup. + :type request: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.discover_restore.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover'} + + def get_backup_status( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """Gets a backup of an app by its ID. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_backup_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def delete_backup( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """Deletes a backup of an app by its ID. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def list_backup_status_secrets( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + """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. + + 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.v2016_08_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_backup_status_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} + + + def _restore_initial( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RestoreResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restore( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a specific backup to another app (or deployment slot, if + specified). + + 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.v2016_08_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RestoreResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.RestoreResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.RestoreResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RestoreResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} + + def list_configurations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List the configurations of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} + + def update_application_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the application settings of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} + + def list_application_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the application settings of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} + + def update_auth_settings( + self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): + """Updates the Authentication / Authorization settings associated with web + app. + + 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.v2016_08_01.models.SiteAuthSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} + + def get_auth_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the Authentication/Authorization settings of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} + + def update_backup_configuration( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """Updates the backup configuration of an app. + + 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.v2016_08_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def delete_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Deletes the backup configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def get_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the backup configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} + + def update_connection_strings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the connection strings of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2016_08_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} + + def list_connection_strings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the connection strings of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the logging configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_diagnostic_logs_config( + self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): + """Updates the logging configuration of an app. + + 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.v2016_08_01.models.SiteLogsConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_diagnostic_logs_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_metadata( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the metadata of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} + + def list_metadata( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the metadata of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} + + + def _list_publishing_credentials_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Gets the Git/FTP publishing credentials of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.User]] + :raises: :class:`CloudError` + """ + raw_result = self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} + + def update_site_push_settings( + self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): + """Updates the Push settings associated with web app. + + 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.v2016_08_01.models.PushSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} + + def list_site_push_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the Push settings associated with web app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} + + def list_slot_configuration_names( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the names of app settings and connection strings that stick to the + slot (not swapped). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def update_slot_configuration_names( + self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): + """Updates the names of application settings and connection string that + remain with the slot during swap operation. + + 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.v2016_08_01.models.SlotConfigNamesResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def get_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the configuration of an app, such as platform version and bitness, + default documents, virtual applications, Always On, etc. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def create_or_update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. + + 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.v2016_08_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. + + 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.v2016_08_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def list_configuration_snapshot_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets a list of web app configuration snapshots identifiers. Each + element of the list contains a timestamp and the ID of the snapshot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} + + def get_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """Gets a snapshot of the configuration of an app at a previous point in + time. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """Reverts the configuration of an app to a previous snapshot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.recover_site_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the last lines of docker logs for the given site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} + + def get_web_site_container_logs_zip( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the ZIP archived docker log files for the given site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs_zip.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} + + def list_continuous_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List continuous web jobs for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2016_08_01.models.ContinuousWebJob] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} + + def get_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Gets a continuous web job by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Delete a continuous web job by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Start a continuous web job for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Stop a continuous web job for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List deployments for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2016_08_01.models.DeploymentPaged[~azure.mgmt.web.v2016_08_01.models.Deployment] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} + + def get_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """Get a deployment by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def create_deployment( + self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): + """Create a deployment for an app, or a deployment slot. + + 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.v2016_08_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def delete_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """Delete a deployment by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def list_deployment_log( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """List deployment log for specific deployment for an app, or a deployment + slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_deployment_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} + + def list_domain_ownership_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Lists ownership identifiers for domain associated with web app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2016_08_01.models.IdentifierPaged[~azure.mgmt.web.v2016_08_01.models.Identifier] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """Get domain ownership identifier for web app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. + + 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 kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """Deletes a domain ownership identifier for a web app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. + + 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 kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + + # Construct URL + url = self.update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the status of the last MSDeploy operation. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_initial( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + 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.v2016_08_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + raw_result = self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + def get_ms_deploy_log( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} + + def list_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List the functions for a web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} + + def get_functions_admin_token( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Fetch a short lived token that can be exchanged for a master key. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_functions_admin_token.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} + + def get_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """Get function information by its ID for web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + + def _create_function_initial( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_function( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create function for web site, or a deployment slot. + + 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.v2016_08_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope]] + :raises: :class:`CloudError` + """ + raw_result = self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def delete_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """Delete a function for web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def list_function_secrets( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """Get function secrets for a function in a web site, or a deployment + slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_function_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} + + def list_host_name_bindings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get hostname bindings for an app or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2016_08_01.models.HostNameBindingPaged[~azure.mgmt.web.v2016_08_01.models.HostNameBinding] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} + + def get_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """Get the named hostname binding for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding( + self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + 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.v2016_08_01.models.HostNameBinding + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def delete_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Retrieves a specific Service Bus Hybrid Connection used by this Web + App. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. + + 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.v2016_08_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Removes a Hybrid Connection from this site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. + + 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.v2016_08_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Gets the send key name and value for a Hybrid Connection. + + Gets the send key name and value for a Hybrid Connection. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} + + def list_relay_service_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets hybrid connections configured for an app (or deployment slot, if + specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_relay_service_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} + + def get_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """Gets a hybrid connection configuration by its name. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). + + 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.v2016_08_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def delete_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """Deletes a relay service connection by its name. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). + + 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.v2016_08_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def list_instance_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets all scale-out instances of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteInstance + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SiteInstancePaged[~azure.mgmt.web.v2016_08_01.models.SiteInstance] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} + + def get_instance_ms_deploy_status( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the status of the last MSDeploy operation. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + + def _create_instance_ms_deploy_operation_initial( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + 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.v2016_08_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} + + def list_instance_processes( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} + + def get_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} + + def list_instance_process_modules( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module( + self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} + + def list_instance_process_threads( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} + + def get_instance_process_thread( + self, resource_group_name, name, process_id, thread_id, instance_id, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in 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 thread_id: TID. + :type thread_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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_thread.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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'), + 'threadId': self._serialize.url("thread_id", thread_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessThreadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} + + def is_cloneable( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Shows whether an app can be cloned to another resource group or + subscription. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.is_cloneable.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} + + def list_sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """This is to allow calling via powershell and ARM template. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} + + def list_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets all metric definitions of an app (or deployment slot, if + specified). + + Gets all metric definitions 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'} + + def list_metrics( + self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets performance metrics of an app (or deployment slot, if specified). + + Gets performance metrics 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 details: Specify "true" to include metric details in the + response. It is "false" by default. + :type details: bool + :param filter: Return only metrics 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'} + + + def _migrate_storage_initial( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_storage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_storage( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a web app. + + 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.v2016_08_01.models.StorageMigrationOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StorageMigrationResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.StorageMigrationResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.StorageMigrationResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} + + + def _migrate_my_sql_initial( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_my_sql.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_my_sql( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Migrates a local (in-app) MySql database to a remote MySql database. + + 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.v2016_08_01.models.MigrateMySqlRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Operation or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.Operation] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.Operation]] + :raises: :class:`CloudError` + """ + raw_result = self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} + + def get_migrate_my_sql_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Returns the status of MySql in app migration, if one is active, and + whether or not MySql in app is enabled. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_migrate_my_sql_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} + + def list_network_features( + self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): + """Gets all network features used by the app (or deployment slot, if + specified). + + 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. This can either be "summary" or + "detailed". + :type view: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_network_features.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} + + def start_web_site_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """Start capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} + + def stop_web_site_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Stop ongoing capturing network packets for the site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} + + def generate_new_site_publishing_password( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Generates a new publishing password for an app (or deployment slot, if + specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generate_new_site_publishing_password.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} + + def list_perf_mon_counters( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets perfmon counters for web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2016_08_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2016_08_01.models.PerfMonResponse] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} + + def get_site_php_error_log_flag( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets web app's event logs. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_php_error_log_flag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} + + def list_premier_add_ons( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the premier add-ons of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_premier_add_ons.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} + + def get_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """Gets a named add-on of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """Updates a named add-on of an app. + + 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.v2016_08_01.models.PremierAddOn + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """Delete a premier add-on from an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def list_processes( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} + + def get_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def delete_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def get_process_dump( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} + + def list_process_modules( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} + + def get_process_module( + self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} + + def get_process_thread( + self, resource_group_name, name, process_id, thread_id, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in 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 thread_id: TID. + :type thread_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_thread.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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'), + 'threadId': self._serialize.url("thread_id", thread_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessThreadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} + + def list_public_certificates( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get public certificates for an app or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2016_08_01.models.PublicCertificatePaged[~azure.mgmt.web.v2016_08_01.models.PublicCertificate] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} + + def get_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Get the named public certificate for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate( + self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + 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.v2016_08_01.models.PublicCertificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets( + self, resource_group_name, name, format=None, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the publishing profile for an app (or deployment slot, if + specified). + + 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 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.v2016_08_01.models.PublishingProfileFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} + + + def _recover_initial( + self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.recover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def recover( + self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, polling=True, **operation_config): + """Recovers a web app to a previous snapshot. + + Recovers a web 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 web app. + :type name: str + :param recovery_entity: Snapshot data used for web app recovery. + Snapshot information can be obtained by calling GetDeletedSites or + GetSiteSnapshots API. + :type recovery_entity: + ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._recover_initial( + resource_group_name=resource_group_name, + name=name, + recovery_entity=recovery_entity, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + recover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover'} + + def reset_production_slot_config( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Resets the configuration settings of the current slot if they were + previously modified by calling the API with POST. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_production_slot_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} + + def restart( + self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """Restarts an app (or deployment slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} + + def list_site_extensions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get list of site extensions for a web site, or a deployment slot. + + Get list of site extensions 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} + + def get_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """Get site extension information by its ID for a web site, or a + deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_initial( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Install site extension on a web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo]] + :raises: :class:`CloudError` + """ + raw_result = self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def delete_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """Remove a site extension from a web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def list_slots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets an app's deployment slots. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SitePaged[~azure.mgmt.web.v2016_08_01.models.Site] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} + + def get_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the details of a web, mobile, or API app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + + def _create_or_update_slot_initial( + self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if skip_dns_registration is not None: + query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') + if skip_custom_domain_verification is not None: + query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') + if force_dns_registration is not None: + query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') + if ttl_in_seconds is not None: + query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_slot( + self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + 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.v2016_08_01.models.Site + :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 skip_dns_registration: If true web app hostname is not + registered with DNS on creation. This parameter is + only used for app creation. + :type skip_dns_registration: bool + :param skip_custom_domain_verification: If true, custom (non + *.azurewebsites.net) domains associated with web app are not verified. + :type skip_custom_domain_verification: bool + :param force_dns_registration: If true, web app hostname is force + registered with DNS. + :type force_dns_registration: bool + :param ttl_in_seconds: Time to live in seconds for web app's default + domain name. + :type ttl_in_seconds: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.Site]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + slot=slot, + skip_dns_registration=skip_dns_registration, + skip_custom_domain_verification=skip_custom_domain_verification, + force_dns_registration=force_dns_registration, + ttl_in_seconds=ttl_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def delete_slot( + self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, skip_dns_registration=None, custom_headers=None, raw=False, **operation_config): + """Deletes a web, mobile, or API app, or one of the deployment slots. + + 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 true if the App Service plan + will be empty after app deletion and you want to delete the empty App + Service plan. By default, the empty App Service plan is not deleted. + :type delete_empty_server_farm: bool + :param skip_dns_registration: If true, DNS registration is skipped. + :type skip_dns_registration: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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') + if skip_dns_registration is not None: + query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def update_slot( + self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): + """Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + 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.v2016_08_01.models.SitePatchResource + :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 skip_dns_registration: If true web app hostname is not + registered with DNS on creation. This parameter is + only used for app creation. + :type skip_dns_registration: bool + :param skip_custom_domain_verification: If true, custom (non + *.azurewebsites.net) domains associated with web app are not verified. + :type skip_custom_domain_verification: bool + :param force_dns_registration: If true, web app hostname is force + registered with DNS. + :type force_dns_registration: bool + :param ttl_in_seconds: Time to live in seconds for web app's default + domain name. + :type ttl_in_seconds: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if skip_dns_registration is not None: + query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') + if skip_custom_domain_verification is not None: + query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') + if force_dns_registration is not None: + query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') + if ttl_in_seconds is not None: + query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def analyze_custom_hostname_slot( + self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): + """Analyze a custom hostname. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.analyze_custom_hostname_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} + + def apply_slot_configuration_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Applies the configuration settings from the target slot onto the + current slot. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} + + def backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """Creates a backup of an app. + + 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.v2016_08_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} + + def list_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets existing backups of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2016_08_01.models.BackupItemPaged[~azure.mgmt.web.v2016_08_01.models.BackupItem] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} + + def discover_restore_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """Discovers an existing app backup that can be restored from a blob in + Azure storage. + + Discovers an existing app backup that can be restored from a 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: A RestoreRequest object that includes Azure storage + URL and blog name for discovery of backup. + :type request: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.discover_restore_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover'} + + def get_backup_status_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a backup of an app by its ID. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_backup_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def delete_backup_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a backup of an app by its ID. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def list_backup_status_secrets_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """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. + + 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.v2016_08_01.models.BackupRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_backup_status_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} + + + def _restore_slot_initial( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RestoreResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restore_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a specific backup to another app (or deployment slot, if + specified). + + 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.v2016_08_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns RestoreResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.RestoreResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.RestoreResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RestoreResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} + + def list_configurations_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List the configurations of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} + + def update_application_settings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the application settings of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} + + def list_application_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the application settings of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} + + def update_auth_settings_slot( + self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): + """Updates the Authentication / Authorization settings associated with web + app. + + 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.v2016_08_01.models.SiteAuthSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} + + def get_auth_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Authentication/Authorization settings of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} + + def update_backup_configuration_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """Updates the backup configuration of an app. + + 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.v2016_08_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def delete_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes the backup configuration of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def get_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the backup configuration of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} + + def update_connection_strings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the connection strings of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2016_08_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} + + def list_connection_strings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the connection strings of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the logging configuration of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_diagnostic_logs_config_slot( + self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the logging configuration of an app. + + 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.v2016_08_01.models.SiteLogsConfig + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_diagnostic_logs_config_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_metadata_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the metadata of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} + + def list_metadata_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the metadata of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} + + + def _list_publishing_credentials_slot_initial( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Gets the Git/FTP publishing credentials of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.User]] + :raises: :class:`CloudError` + """ + raw_result = self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} + + def update_site_push_settings_slot( + self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): + """Updates the Push settings associated with web app. + + 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.v2016_08_01.models.PushSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} + + def list_site_push_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Push settings associated with web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} + + def get_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the configuration of an app, such as platform version and bitness, + default documents, virtual applications, Always On, etc. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def create_or_update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. + + 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.v2016_08_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. + + 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.v2016_08_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def list_configuration_snapshot_info_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a list of web app configuration snapshots identifiers. Each + element of the list contains a timestamp and the ID of the snapshot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} + + def get_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a snapshot of the configuration of an app at a previous point in + time. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """Reverts the configuration of an app to a previous snapshot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.recover_site_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the last lines of docker logs for the given site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} + + def get_web_site_container_logs_zip_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the ZIP archived docker log files for the given site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs_zip_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} + + def list_continuous_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List continuous web jobs for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2016_08_01.models.ContinuousWebJob] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} + + def get_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a continuous web job by its ID for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a continuous web job by its ID for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Start a continuous web job for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Stop a continuous web job for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List deployments for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2016_08_01.models.DeploymentPaged[~azure.mgmt.web.v2016_08_01.models.Deployment] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} + + def get_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """Get a deployment by its ID for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def create_deployment_slot( + self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): + """Create a deployment for an app, or a deployment slot. + + 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.v2016_08_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def delete_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """Delete a deployment by its ID for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def list_deployment_log_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """List deployment log for specific deployment for an app, or a deployment + slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_deployment_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} + + def list_domain_ownership_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Lists ownership identifiers for domain associated with web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2016_08_01.models.IdentifierPaged[~azure.mgmt.web.v2016_08_01.models.Identifier] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """Get domain ownership identifier for web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. + + 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 kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a domain ownership identifier for a web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. + + 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 kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + + # Construct URL + url = self.update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get the status of the last MSDeploy operation. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation_slot( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + 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.v2016_08_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + raw_result = self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + def get_ms_deploy_log_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} + + def list_instance_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List the functions for a web site, or a deployment slot. + + 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. If a slot is not specified, + the API deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} + + def get_functions_admin_token_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Fetch a short lived token that can be exchanged for a master key. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_functions_admin_token_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} + + def get_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """Get function information by its ID for web site, or a deployment slot. + + 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. If a slot is not specified, + the API deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + + def _create_instance_function_slot_initial( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_function_slot( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create function for web site, or a deployment slot. + + 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. If a slot is not specified, + the API deletes a deployment for the production slot. + :type slot: str + :param function_envelope: Function details. + :type function_envelope: + ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def delete_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a function for web site, or a deployment slot. + + 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. If a slot is not specified, + the API deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def list_function_secrets_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """Get function secrets for a function in a web site, or a deployment + slot. + + 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. If a slot is not specified, + the API deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_function_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} + + def list_host_name_bindings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get hostname bindings for an app or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2016_08_01.models.HostNameBindingPaged[~azure.mgmt.web.v2016_08_01.models.HostNameBinding] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} + + def get_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """Get the named hostname binding for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding_slot( + self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + 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.v2016_08_01.models.HostNameBinding + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def delete_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def get_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """Retrieves a specific Service Bus Hybrid Connection used by this Web + App. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. + + 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.v2016_08_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """Removes a Hybrid Connection from this site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. + + 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.v2016_08_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the send key name and value for a Hybrid Connection. + + Gets the send key name and value for a Hybrid Connection. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_hybrid_connection_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_hybrid_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_hybrid_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} + + def list_relay_service_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets hybrid connections configured for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_relay_service_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} + + def get_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a hybrid connection configuration by its name. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). + + 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.v2016_08_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def delete_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a relay service connection by its name. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). + + 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.v2016_08_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def list_instance_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets all scale-out instances of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteInstance + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SiteInstancePaged[~azure.mgmt.web.v2016_08_01.models.SiteInstance] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} + + def get_instance_ms_deploy_status_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the status of the last MSDeploy operation. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + + def _create_instance_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation_slot( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + 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.v2016_08_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_processes_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} + + def get_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_process_modules_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def list_instance_process_threads_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} + + def get_instance_process_thread_slot( + self, resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in 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 thread_id: TID. + :type thread_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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_thread_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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'), + 'threadId': self._serialize.url("thread_id", thread_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessThreadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} + + def is_cloneable_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Shows whether an app can be cloned to another resource group or + subscription. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.is_cloneable_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} + + def list_sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """This is to allow calling via powershell and ARM template. + + 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. If a slot is not specified, + the API will restore a backup of the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} + + def list_metric_definitions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets all metric definitions of an app (or deployment slot, if + specified). + + Gets all metric definitions 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 metric definitions of the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metric_definitions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} + + def list_metrics_slot( + self, resource_group_name, name, slot, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets performance metrics of an app (or deployment slot, if specified). + + Gets performance metrics 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 metrics of the production slot. + :type slot: str + :param details: Specify "true" to include metric details in the + response. It is "false" by default. + :type details: bool + :param filter: Return only metrics 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} + + def get_migrate_my_sql_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Returns the status of MySql in app migration, if one is active, and + whether or not MySql in app is enabled. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_migrate_my_sql_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} + + def list_network_features_slot( + self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): + """Gets all network features used by the app (or deployment slot, if + specified). + + 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. This can either be "summary" or + "detailed". + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_network_features_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} + + def start_web_site_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """Start capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} + + def stop_web_site_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Stop ongoing capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} + + def generate_new_site_publishing_password_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Generates a new publishing password for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generate_new_site_publishing_password_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} + + def list_perf_mon_counters_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets perfmon counters for web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2016_08_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2016_08_01.models.PerfMonResponse] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} + + def get_site_php_error_log_flag_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets web app's event logs. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_php_error_log_flag_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} + + def list_premier_add_ons_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the premier add-ons of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_premier_add_ons_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} + + def get_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named add-on of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """Updates a named add-on of an app. + + 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.v2016_08_01.models.PremierAddOn + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a premier add-on from an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def list_processes_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} + + def get_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def delete_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def get_process_dump_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} + + def list_process_modules_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} + + def get_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} + + def get_process_thread_slot( + self, resource_group_name, name, process_id, thread_id, slot, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in 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 thread_id: TID. + :type thread_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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_thread_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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'), + 'threadId': self._serialize.url("thread_id", thread_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessThreadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'} + + def list_public_certificates_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get public certificates for an app or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2016_08_01.models.PublicCertificatePaged[~azure.mgmt.web.v2016_08_01.models.PublicCertificate] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} + + def get_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Get the named public certificate for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate_slot( + self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + 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.v2016_08_01.models.PublicCertificate + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets_slot( + self, resource_group_name, name, slot, format=None, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the publishing profile for an app (or deployment slot, if + specified). + + 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 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.v2016_08_01.models.PublishingProfileFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} + + + def _recover_slot_initial( + self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.recover_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def recover_slot( + self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Recovers a web app to a previous snapshot. + + Recovers a web 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 web app. + :type name: str + :param recovery_entity: Snapshot data used for web app recovery. + Snapshot information can be obtained by calling GetDeletedSites or + GetSiteSnapshots API. + :type recovery_entity: + ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._recover_slot_initial( + resource_group_name=resource_group_name, + name=name, + recovery_entity=recovery_entity, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + recover_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover'} + + def reset_slot_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Resets the configuration settings of the current slot if they were + previously modified by calling the API with POST. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} + + def restart_slot( + self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """Restarts an app (or deployment slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} + + def list_site_extensions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get list of site extensions for a web site, or a deployment slot. + + Get list of site extensions 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} + + def get_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """Get site extension information by its ID for a web site, or a + deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_slot_initial( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Install site extension on a web site, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo]] + :raises: :class:`CloudError` + """ + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def delete_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """Remove a site extension from a web site, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def list_slot_differences_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Get the difference in configuration settings between two web app slots. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SlotDifferencePaged[~azure.mgmt.web.v2016_08_01.models.SlotDifference] + :raises: :class:`CloudError` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} + + + def _swap_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """Swaps two deployment slots of an app. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._swap_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} + + def list_snapshots_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Returns all Snapshots to the user. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SnapshotPaged[~azure.mgmt.web.v2016_08_01.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} + + def get_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the source control configuration of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + + def _create_or_update_source_control_slot_initial( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the source control configuration of an app. + + 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.v2016_08_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def delete_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes the source control configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + """Updates the source control configuration of an app. + + 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.v2016_08_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def start_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Starts an app (or deployment slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} + + def stop_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Stops an app (or deployment slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} + + def sync_repository_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Sync web app repository. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_repository_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} + + def sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Syncs function trigger metadata to the scale controller. + + Syncs function trigger metadata to the scale controller. + + :param resource_group_name: Name 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} + + def list_triggered_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List triggered web jobs for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredWebJob] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} + + def get_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a triggered web job by its ID for an app, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a triggered web job by its ID for an app, or a deployment slot. + + 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 a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """List a triggered web job's history for an app, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a triggered web job's history by its ID for an app, , or a + deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def run_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Run a triggered web job for an app, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.run_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} + + def list_usages_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets the quota usage information of an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2016_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2016_08_01.models.CsmUsageQuota] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} + + def list_vnet_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the virtual networks the app (or deployment slot) is connected to. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2016_08_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_vnet_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} + + def get_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a virtual network the app (or deployment slot) is connected to by + name. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Adds a Virtual Network connection to an app or slot (PUT) or updates + the connection properties (PATCH). + + 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.v2016_08_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a connection from an app (or deployment slot to a named virtual + network. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Adds a Virtual Network connection to an app or slot (PUT) or updates + the connection properties (PATCH). + + 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.v2016_08_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets an app's Virtual Network gateway. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Adds a gateway to a connected Virtual Network (PUT) or updates it + (PATCH). + + 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.v2016_08_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Adds a gateway to a connected Virtual Network (PUT) or updates it + (PATCH). + + 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.v2016_08_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List webjobs for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2016_08_01.models.WebJobPaged[~azure.mgmt.web.v2016_08_01.models.WebJob] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} + + def get_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Get webjob information for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} + + def list_slot_differences_from_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Get the difference in configuration settings between two web app slots. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SlotDifferencePaged[~azure.mgmt.web.v2016_08_01.models.SlotDifference] + :raises: :class:`CloudError` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_from_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} + + + def _swap_slot_with_production_initial( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_with_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_with_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """Swaps two deployment slots of an app. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} + + def list_snapshots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Returns all Snapshots to the user. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2016_08_01.models.SnapshotPaged[~azure.mgmt.web.v2016_08_01.models.Snapshot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} + + def get_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the source control configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + + def _create_or_update_source_control_initial( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the source control configuration of an app. + + 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.v2016_08_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def delete_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Deletes the source control configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + """Updates the source control configuration of an app. + + 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.v2016_08_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def start( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Starts an app (or deployment slot, if specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} + + def stop( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Stops an app (or deployment slot, if specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} + + def sync_repository( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Sync web app repository. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_repository.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} + + def sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Syncs function trigger metadata to the scale controller. + + Syncs function trigger metadata to the scale controller. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} + + def list_triggered_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List triggered web jobs for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredWebJob] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} + + def get_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Gets a triggered web job by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Delete a triggered web job by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """List a triggered web job's history for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history( + self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): + """Gets a triggered web job's history by its ID for an app, , or a + deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} + + def run_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Run a triggered web job for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.run_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets the quota usage information of an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2016_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2016_08_01.models.CsmUsageQuota] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} + + def list_vnet_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the virtual networks the app (or deployment slot) is connected to. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2016_08_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_vnet_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} + + def get_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """Gets a virtual network the app (or deployment slot) is connected to by + name. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Adds a Virtual Network connection to an app or slot (PUT) or updates + the connection properties (PATCH). + + 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.v2016_08_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """Deletes a connection from an app (or deployment slot to a named virtual + network. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Adds a Virtual Network connection to an app or slot (PUT) or updates + the connection properties (PATCH). + + 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.v2016_08_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """Gets an app's Virtual Network gateway. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Adds a gateway to a connected Virtual Network (PUT) or updates it + (PATCH). + + 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.v2016_08_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Adds a gateway to a connected Virtual Network (PUT) or updates it + (PATCH). + + 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.v2016_08_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List webjobs for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2016_08_01.models.WebJobPaged[~azure.mgmt.web.v2016_08_01.models.WebJob] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} + + def get_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Get webjob information for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_08_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/version.py @@ -0,0 +1,13 @@ +# 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_web_site_management_client.py new file mode 100644 index 00000000000..e602176dcbf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_web_site_management_client.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import AppServiceEnvironmentsOperations +from .operations import AppServicePlansOperations +from . import models + + +class WebSiteManagementClient(SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar app_service_environments: AppServiceEnvironments operations + :vartype app_service_environments: azure.mgmt.web.v2016_09_01.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlans operations + :vartype app_service_plans: azure.mgmt.web.v2016_09_01.operations.AppServicePlansOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2016-09-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + 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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/__init__.py new file mode 100644 index 00000000000..b5cf3731c73 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/__init__.py @@ -0,0 +1,289 @@ +# 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 AddressResponse + from ._models_py3 import ApiDefinitionInfo + from ._models_py3 import AppServiceEnvironmentPatchResource + from ._models_py3 import AppServiceEnvironmentResource + from ._models_py3 import AppServicePlan + from ._models_py3 import AppServicePlanPatchResource + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import Capability + from ._models_py3 import CloningInfo + from ._models_py3 import ConnStringInfo + from ._models_py3 import CorsSettings + from ._models_py3 import CsmUsageQuota + from ._models_py3 import ErrorEntity + from ._models_py3 import Experiments + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentDiagnostics + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostNameSslState + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import HybridConnectionLimits + from ._models_py3 import Identifier + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import LocalizableString + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import MetricAvailabilily + from ._models_py3 import MetricDefinition + from ._models_py3 import NameValuePair + from ._models_py3 import NetworkAccessControlEntry + from ._models_py3 import Operation + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceMetric + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceMetricName + from ._models_py3 import ResourceMetricProperty + from ._models_py3 import ResourceMetricValue + from ._models_py3 import Site + from ._models_py3 import SiteConfig + from ._models_py3 import SiteLimits + from ._models_py3 import SiteMachineKey + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuDescription + from ._models_py3 import SkuInfo + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import SnapshotRecoveryRequest + from ._models_py3 import SnapshotRecoveryTarget + from ._models_py3 import StampCapacity + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import Usage + from ._models_py3 import User + 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 VnetRoute + from ._models_py3 import WebAppCollection + from ._models_py3 import WorkerPool + from ._models_py3 import WorkerPoolResource +except (SyntaxError, ImportError): + from ._models import AddressResponse + from ._models import ApiDefinitionInfo + from ._models import AppServiceEnvironmentPatchResource + from ._models import AppServiceEnvironmentResource + from ._models import AppServicePlan + from ._models import AppServicePlanPatchResource + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import Capability + from ._models import CloningInfo + from ._models import ConnStringInfo + from ._models import CorsSettings + from ._models import CsmUsageQuota + from ._models import ErrorEntity + from ._models import Experiments + from ._models import HandlerMapping + from ._models import HostingEnvironmentDiagnostics + from ._models import HostingEnvironmentProfile + from ._models import HostNameSslState + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import HybridConnectionLimits + from ._models import Identifier + from ._models import IpSecurityRestriction + from ._models import LocalizableString + from ._models import ManagedServiceIdentity + from ._models import MetricAvailabilily + from ._models import MetricDefinition + from ._models import NameValuePair + from ._models import NetworkAccessControlEntry + from ._models import Operation + from ._models import ProxyOnlyResource + from ._models import PushSettings + from ._models import RampUpRule + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceMetric + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceMetricName + from ._models import ResourceMetricProperty + from ._models import ResourceMetricValue + from ._models import Site + from ._models import SiteConfig + from ._models import SiteLimits + from ._models import SiteMachineKey + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SkuInfo + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import SnapshotRecoveryRequest + from ._models import SnapshotRecoveryTarget + from ._models import StampCapacity + from ._models import StatusCodesBasedTrigger + from ._models import Usage + from ._models import User + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VirtualIPMapping + from ._models import VirtualNetworkProfile + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetRoute + from ._models import WebAppCollection + from ._models import WorkerPool + from ._models import WorkerPoolResource +from ._paged_models import AppServiceEnvironmentResourcePaged +from ._paged_models import AppServicePlanPaged +from ._paged_models import CsmUsageQuotaPaged +from ._paged_models import HybridConnectionPaged +from ._paged_models import ResourceMetricDefinitionPaged +from ._paged_models import ResourceMetricPaged +from ._paged_models import SitePaged +from ._paged_models import SkuInfoPaged +from ._paged_models import StampCapacityPaged +from ._paged_models import StrPaged +from ._paged_models import UsagePaged +from ._paged_models import WorkerPoolResourcePaged +from ._web_site_management_client_enums import ( + ProvisioningState, + HostingEnvironmentStatus, + InternalLoadBalancingMode, + ComputeModeOptions, + WorkerSizeOptions, + AccessControlEntryAction, + RouteType, + ManagedServiceIdentityType, + AutoHealActionType, + ConnectionStringType, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + StatusOptions, + OperationStatus, +) + +__all__ = [ + 'AddressResponse', + 'ApiDefinitionInfo', + 'AppServiceEnvironmentPatchResource', + 'AppServiceEnvironmentResource', + 'AppServicePlan', + 'AppServicePlanPatchResource', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'Capability', + 'CloningInfo', + 'ConnStringInfo', + 'CorsSettings', + 'CsmUsageQuota', + 'ErrorEntity', + 'Experiments', + 'HandlerMapping', + 'HostingEnvironmentDiagnostics', + 'HostingEnvironmentProfile', + 'HostNameSslState', + 'HybridConnection', + 'HybridConnectionKey', + 'HybridConnectionLimits', + 'Identifier', + 'IpSecurityRestriction', + 'LocalizableString', + 'ManagedServiceIdentity', + 'MetricAvailabilily', + 'MetricDefinition', + 'NameValuePair', + 'NetworkAccessControlEntry', + 'Operation', + 'ProxyOnlyResource', + 'PushSettings', + 'RampUpRule', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceMetric', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceMetricName', + 'ResourceMetricProperty', + 'ResourceMetricValue', + 'Site', + 'SiteConfig', + 'SiteLimits', + 'SiteMachineKey', + 'SkuCapacity', + 'SkuDescription', + 'SkuInfo', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'SnapshotRecoveryRequest', + 'SnapshotRecoveryTarget', + 'StampCapacity', + 'StatusCodesBasedTrigger', + 'Usage', + 'User', + 'VirtualApplication', + 'VirtualDirectory', + 'VirtualIPMapping', + 'VirtualNetworkProfile', + 'VnetGateway', + 'VnetInfo', + 'VnetRoute', + 'WebAppCollection', + 'WorkerPool', + 'WorkerPoolResource', + 'AppServiceEnvironmentResourcePaged', + 'StampCapacityPaged', + 'ResourceMetricPaged', + 'WorkerPoolResourcePaged', + 'ResourceMetricDefinitionPaged', + 'SkuInfoPaged', + 'UsagePaged', + 'AppServicePlanPaged', + 'SitePaged', + 'CsmUsageQuotaPaged', + 'StrPaged', + 'HybridConnectionPaged', + 'ProvisioningState', + 'HostingEnvironmentStatus', + 'InternalLoadBalancingMode', + 'ComputeModeOptions', + 'WorkerSizeOptions', + 'AccessControlEntryAction', + 'RouteType', + 'ManagedServiceIdentityType', + 'AutoHealActionType', + 'ConnectionStringType', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'StatusOptions', + 'OperationStatus', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models.py new file mode 100644 index 00000000000..0b12570bcbc --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models.py @@ -0,0 +1,3614 @@ +# 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 msrest.serialization import Model + + +class AddressResponse(Model): + """Describes main public IP address and any extra virtual IPs. + + :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.v2016_09_01.models.VirtualIPMapping] + """ + + _attribute_map = { + 'service_ip_address': {'key': 'serviceIpAddress', 'type': 'str'}, + 'internal_ip_address': {'key': 'internalIpAddress', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'outboundIpAddresses', 'type': '[str]'}, + 'vip_mappings': {'key': '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 ApiDefinitionInfo(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 ProxyOnlyResource(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 AppServiceEnvironmentPatchResource(ProxyOnlyResource): + """ARM resource for a 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 id: Resource Id. + :vartype 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_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2016_09_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.v2016_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2016_09_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2016_09_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2016_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2016_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2016_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2016_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2016_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) + self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) + self.cluster_settings = kwargs.get('cluster_settings', None) + self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + + +class Resource(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: 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.get('location', None) + self.type = None + self.tags = kwargs.get('tags', 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: Resource tags. + :type tags: dict[str, str] + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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.v2016_09_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.v2016_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2016_09_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2016_09_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2016_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2016_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2016_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2016_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2016_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentResource, self).__init__(**kwargs) + self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) + self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) + self.cluster_settings = kwargs.get('cluster_settings', None) + self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2016_09_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2016_09_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2016_09_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2016_09_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, self).__init__(**kwargs) + self.app_service_plan_name = kwargs.get('app_service_plan_name', None) + self.worker_tier_name = kwargs.get('worker_tier_name', None) + self.status = None + self.subscription = None + self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None + self.is_spot = kwargs.get('is_spot', None) + self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.resource_group = None + self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_plan_patch_resource_name: Required. Name for the App + Service plan. + :type app_service_plan_patch_resource_name: 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.v2016_09_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2016_09_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2016_09_01.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_plan_patch_resource_name': {'required': 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'}, + 'app_service_plan_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + } + + def __init__(self, **kwargs): + super(AppServicePlanPatchResource, self).__init__(**kwargs) + self.app_service_plan_patch_resource_name = kwargs.get('app_service_plan_patch_resource_name', None) + self.worker_tier_name = kwargs.get('worker_tier_name', None) + self.status = None + self.subscription = None + self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None + self.is_spot = kwargs.get('is_spot', None) + self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.resource_group = None + self.reserved = kwargs.get('reserved', 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 + + +class AutoHealActions(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.v2016_09_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2016_09_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': 'AutoHealActionType'}, + '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(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(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.v2016_09_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2016_09_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2016_09_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.v2016_09_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2016_09_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) + + +class Capability(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 CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + 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.get('source_web_app_id', 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) + self.ignore_quotas = kwargs.get('ignore_quotas', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2016_09_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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 CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + + +class CsmUsageQuota(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 + :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.v2016_09_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 ErrorEntity(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.v2016_09_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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2016_09_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 HandlerMapping(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 HostingEnvironmentDiagnostics(Model): + """Diagnostics for an App Service Environment. + + :param name: Name/identifier of the diagnostics. + :type name: str + :param diagnosics_output: Diagnostics output. + :type diagnosics_output: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'diagnosics_output': {'key': 'diagnosicsOutput', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.diagnosics_output = kwargs.get('diagnosics_output', None) + + +class HostingEnvironmentProfile(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 HostNameSslState(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.v2016_09_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 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.v2016_09_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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 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 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identifier, self).__init__(**kwargs) + self.identifier_id = kwargs.get('identifier_id', None) + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', '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) + + +class LocalizableString(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 ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2016_09_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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.tenant_id = None + self.principal_id = None + + +class MetricAvailabilily(Model): + """Metric availability and retention. + + :param time_grain: Time grain. + :type time_grain: str + :param retention: Retention period for the current time grain. + :type retention: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricAvailabilily, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.retention = kwargs.get('retention', None) + + +class MetricDefinition(ProxyOnlyResource): + """Metadata for a metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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 metric_definition_name: Name of the metric. + :vartype metric_definition_name: 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.v2016_09_01.models.MetricAvailabilily] + :ivar display_name: Friendly name shown in the UI. + :vartype display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'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'}, + 'metric_definition_name': {'key': 'properties.name', 'type': 'str'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, + 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.display_name = None + + +class NameValuePair(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 NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2016_09_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.description = kwargs.get('description', None) + self.order = kwargs.get('order', None) + self.remote_subnet = kwargs.get('remote_subnet', None) + + +class Operation(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.v2016_09_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2016_09_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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 RequestsBasedTrigger(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 ResourceMetric(Model): + """Object representing a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of metric. + :vartype name: ~azure.mgmt.web.v2016_09_01.models.ResourceMetricName + :ivar unit: Metric unit. + :vartype unit: str + :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D + :vartype time_grain: str + :ivar start_time: Metric start time. + :vartype start_time: datetime + :ivar end_time: Metric end time. + :vartype end_time: datetime + :ivar resource_id: Metric resource Id. + :vartype resource_id: str + :ivar id: Resource Id. + :vartype id: str + :ivar metric_values: Metric values. + :vartype metric_values: + list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricValue] + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricProperty] + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'id': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'ResourceMetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs): + super(ResourceMetric, self).__init__(**kwargs) + self.name = None + self.unit = None + self.time_grain = None + self.start_time = None + self.end_time = None + self.resource_id = None + self.id = None + self.metric_values = None + self.properties = None + + +class ResourceMetricAvailability(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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricName + :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.v2016_09_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricDefinition, self).__init__(**kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceMetricProperty(Model): + """Resource metric property. + + :param key: Key for resource metric property. + :type key: str + :param value: Value of pair. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricProperty, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + + +class ResourceMetricValue(Model): + """Value of resource metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Value timestamp. + :vartype timestamp: str + :ivar average: Value average. + :vartype average: float + :ivar minimum: Value minimum. + :vartype minimum: float + :ivar maximum: Value maximum. + :vartype maximum: float + :ivar total: Value total. + :vartype total: float + :ivar count: Value count. + :vartype count: float + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricProperty] + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'total': {'readonly': True}, + 'count': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'float'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricValue, self).__init__(**kwargs) + self.timestamp = None + self.average = None + self.minimum = None + self.maximum = None + self.total = None + self.count = None + self.properties = 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: Resource tags. + :type tags: dict[str, str] + :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.v2016_09_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2016_09_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.v2016_09_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2016_09_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2016_09_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2016_09_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2016_09_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2016_09_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2016_09_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = kwargs.get('https_only', None) + self.identity = kwargs.get('identity', None) + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2016_09_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2016_09_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2016_09_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2016_09_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' + :type scm_type: str or ~azure.mgmt.web.v2016_09_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2016_09_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2016_09_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2016_09_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2016_09_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2016_09_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2016_09_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2016_09_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2016_09_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2016_09_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2016_09_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2016_09_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) + self.http20_enabled = kwargs.get('http20_enabled', True) + self.min_tls_version = kwargs.get('min_tls_version', None) + + +class SiteLimits(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 SiteMachineKey(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 SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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.v2016_09_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.v2016_09_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(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.v2016_09_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2016_09_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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2016_09_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SnapshotRecoveryRequest, self).__init__(**kwargs) + self.snapshot_time = kwargs.get('snapshot_time', None) + self.recovery_target = kwargs.get('recovery_target', 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) + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.id = kwargs.get('id', None) + + +class StampCapacity(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.v2016_09_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' + :type worker_size: str or + ~azure.mgmt.web.v2016_09_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 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: true if capacity + is applicable for all apps; otherwise, false. + :type is_applicable_for_all_compute_modes: bool + :param site_mode: Shared or Dedicated. + :type site_mode: str + """ + + _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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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'}, + } + + 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) + + +class StatusCodesBasedTrigger(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 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', 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 usage_name: Name of the quota. + :vartype usage_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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2016_09_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}, + 'usage_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'}, + 'usage_name': {'key': 'properties.name', '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': 'ComputeModeOptions'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.display_name = None + self.usage_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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + 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) + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2016_09_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(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(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 + """ + + _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'}, + } + + 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) + + +class VirtualNetworkProfile(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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.get('id', None) + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2016_09_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + 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) + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2016_09_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'}, + 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) + 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 WebAppCollection(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.v2016_09_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.get('value', None) + self.next_link = None + + +class WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.v2016_09_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 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.v2016_09_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] + :param sku: + :type sku: ~azure.mgmt.web.v2016_09_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(WorkerPoolResource, self).__init__(**kwargs) + 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 + self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models_py3.py new file mode 100644 index 00000000000..a3bcc9501f2 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models_py3.py @@ -0,0 +1,3614 @@ +# 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 msrest.serialization import Model + + +class AddressResponse(Model): + """Describes main public IP address and any extra virtual IPs. + + :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.v2016_09_01.models.VirtualIPMapping] + """ + + _attribute_map = { + 'service_ip_address': {'key': 'serviceIpAddress', 'type': 'str'}, + 'internal_ip_address': {'key': 'internalIpAddress', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'outboundIpAddresses', 'type': '[str]'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + } + + def __init__(self, *, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: + super(AddressResponse, self).__init__(**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 ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class ProxyOnlyResource(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: str=None, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2016_09_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.v2016_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2016_09_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2016_09_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2016_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2016_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2016_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2016_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2016_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + } + + def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) + self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + + +class Resource(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: 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: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.location = location + self.type = None + self.tags = tags + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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.v2016_09_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.v2016_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2016_09_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2016_09_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2016_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2016_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2016_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2016_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2016_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + } + + def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_environment_resource_name = app_service_environment_resource_name + self.app_service_environment_resource_location = app_service_environment_resource_location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_plan_name: Required. Name for the App Service plan. + :type app_service_plan_name: 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.v2016_09_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2016_09_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2016_09_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2016_09_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_plan_name': {'required': 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}'}, + 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_plan_name = app_service_plan_name + self.worker_tier_name = worker_tier_name + self.status = None + self.subscription = None + self.admin_site_name = admin_site_name + 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.number_of_sites = None + self.is_spot = is_spot + self.spot_expiration_time = spot_expiration_time + self.resource_group = None + self.reserved = reserved + self.target_worker_count = target_worker_count + self.target_worker_size_id = target_worker_size_id + self.provisioning_state = None + self.sku = sku + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_plan_patch_resource_name: Required. Name for the App + Service plan. + :type app_service_plan_patch_resource_name: 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.v2016_09_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param admin_site_name: App Service plan administration site. + :type admin_site_name: 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.v2016_09_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :type per_site_scaling: bool + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If 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 + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: 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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2016_09_01.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_plan_patch_resource_name': {'required': 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'}, + 'app_service_plan_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, + } + + def __init__(self, *, app_service_plan_patch_resource_name: str, kind: str=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: + super(AppServicePlanPatchResource, self).__init__(kind=kind, **kwargs) + self.app_service_plan_patch_resource_name = app_service_plan_patch_resource_name + self.worker_tier_name = worker_tier_name + self.status = None + self.subscription = None + self.admin_site_name = admin_site_name + 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.number_of_sites = None + self.is_spot = is_spot + self.spot_expiration_time = spot_expiration_time + self.resource_group = None + self.reserved = reserved + self.target_worker_count = target_worker_count + self.target_worker_size_id = target_worker_size_id + self.provisioning_state = None + + +class AutoHealActions(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.v2016_09_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2016_09_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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.v2016_09_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2016_09_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2016_09_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.v2016_09_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2016_09_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + super(Capability, self).__init__(**kwargs) + self.name = name + self.value = value + self.reason = reason + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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 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: 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 + :param ignore_quotas: true if quotas should be ignored; + otherwise, false. + :type ignore_quotas: bool + """ + + _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'}, + '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'}, + 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, + } + + def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: + 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.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 + self.ignore_quotas = ignore_quotas + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2016_09_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class CorsSettings(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] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + + +class CsmUsageQuota(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 + :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.v2016_09_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + 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 ErrorEntity(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.v2016_09_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: + 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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2016_09_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentDiagnostics(Model): + """Diagnostics for an App Service Environment. + + :param name: Name/identifier of the diagnostics. + :type name: str + :param diagnosics_output: Diagnostics output. + :type diagnosics_output: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'diagnosics_output': {'key': 'diagnosicsOutput', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, diagnosics_output: str=None, **kwargs) -> None: + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = name + self.diagnosics_output = diagnosics_output + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostNameSslState(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.v2016_09_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 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.v2016_09_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.identifier_id = identifier_id + + +class IpSecurityRestriction(Model): + """IP security restriction on an app. + + All required parameters must be populated in order to send to Azure. + + :param ip_address: Required. IP address the security restriction is valid + for. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the + restriction is valid for. + :type subnet_mask: str + """ + + _validation = { + 'ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: + super(IpSecurityRestriction, self).__init__(**kwargs) + self.ip_address = ip_address + self.subnet_mask = subnet_mask + + +class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class ManagedServiceIdentity(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' + :type type: str or + ~azure.mgmt.web.v2016_09_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 + """ + + _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'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + + +class MetricAvailabilily(Model): + """Metric availability and retention. + + :param time_grain: Time grain. + :type time_grain: str + :param retention: Retention period for the current time grain. + :type retention: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + } + + def __init__(self, *, time_grain: str=None, retention: str=None, **kwargs) -> None: + super(MetricAvailabilily, self).__init__(**kwargs) + self.time_grain = time_grain + self.retention = retention + + +class MetricDefinition(ProxyOnlyResource): + """Metadata for a metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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 metric_definition_name: Name of the metric. + :vartype metric_definition_name: 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.v2016_09_01.models.MetricAvailabilily] + :ivar display_name: Friendly name shown in the UI. + :vartype display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'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'}, + 'metric_definition_name': {'key': 'properties.name', 'type': 'str'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, + 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(MetricDefinition, self).__init__(kind=kind, **kwargs) + self.metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.display_name = None + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2016_09_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = action + self.description = description + self.order = order + self.remote_subnet = remote_subnet + + +class Operation(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.v2016_09_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2016_09_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: + 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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +class ResourceMetric(Model): + """Object representing a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of metric. + :vartype name: ~azure.mgmt.web.v2016_09_01.models.ResourceMetricName + :ivar unit: Metric unit. + :vartype unit: str + :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D + :vartype time_grain: str + :ivar start_time: Metric start time. + :vartype start_time: datetime + :ivar end_time: Metric end time. + :vartype end_time: datetime + :ivar resource_id: Metric resource Id. + :vartype resource_id: str + :ivar id: Resource Id. + :vartype id: str + :ivar metric_values: Metric values. + :vartype metric_values: + list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricValue] + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricProperty] + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'id': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'ResourceMetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetric, self).__init__(**kwargs) + self.name = None + self.unit = None + self.time_grain = None + self.start_time = None + self.end_time = None + self.resource_id = None + self.id = None + self.metric_values = None + self.properties = None + + +class ResourceMetricAvailability(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) -> None: + 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 resource_metric_definition_name: Name of the metric. + :vartype resource_metric_definition_name: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricName + :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.v2016_09_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar resource_metric_definition_id: Resource ID. + :vartype resource_metric_definition_id: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_metric_definition_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'resource_metric_definition_id': {'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'}, + 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, + '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'}, + 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) + self.resource_metric_definition_name = None + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.resource_metric_definition_id = None + self.properties = None + + +class ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceMetricProperty(Model): + """Resource metric property. + + :param key: Key for resource metric property. + :type key: str + :param value: Value of pair. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + super(ResourceMetricProperty, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ResourceMetricValue(Model): + """Value of resource metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Value timestamp. + :vartype timestamp: str + :ivar average: Value average. + :vartype average: float + :ivar minimum: Value minimum. + :vartype minimum: float + :ivar maximum: Value maximum. + :vartype maximum: float + :ivar total: Value total. + :vartype total: float + :ivar count: Value count. + :vartype count: float + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricProperty] + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'total': {'readonly': True}, + 'count': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'float'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricValue, self).__init__(**kwargs) + self.timestamp = None + self.average = None + self.minimum = None + self.maximum = None + self.total = None + self.count = None + self.properties = 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: Resource tags. + :type tags: dict[str, str] + :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.v2016_09_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2016_09_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.v2016_09_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. + Read-only. + :vartype last_modified_time_utc: datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2016_09_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2016_09_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2016_09_01.models.CloningInfo + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: + ~azure.mgmt.web.v2016_09_01.models.SnapshotRecoveryRequest + :ivar resource_group: Name of the resource group the app belongs to. + Read-only. + :vartype resource_group: str + :ivar is_default_container: true if the app is a default + container; otherwise, 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.v2016_09_01.models.SlotSwapStatus + :param https_only: HttpsOnly: configures a web site to accept only https + requests. Issues redirect for + http requests + :type https_only: bool + :param identity: + :type identity: ~azure.mgmt.web.v2016_09_01.models.ManagedServiceIdentity + """ + + _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}, + } + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', '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'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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.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.host_names_disabled = host_names_disabled + 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.snapshot_info = snapshot_info + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.https_only = https_only + self.identity = identity + + +class SiteConfig(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. Default value: + "v4.6" . + :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 linux_fx_version: Linux App Framework and version + :type linux_fx_version: str + :param request_tracing_enabled: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2016_09_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2016_09_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2016_09_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2016_09_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' + :type scm_type: str or ~azure.mgmt.web.v2016_09_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2016_09_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2016_09_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2016_09_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2016_09_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2016_09_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2016_09_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2016_09_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2016_09_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2016_09_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: False . + :type local_my_sql_enabled: bool + :param ip_security_restrictions: IP security restrictions. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2016_09_01.models.IpSecurityRestriction] + :param http20_enabled: Http20Enabled: configures a web site to allow + clients to connect over http2.0. Default value: True . + :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.v2016_09_01.models.SupportedTlsVersions + """ + + _validation = { + 'machine_key': {'readonly': True}, + } + + _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'}, + 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: + 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.linux_fx_version = linux_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.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.cors = cors + self.push = push + self.api_definition = api_definition + self.auto_swap_slot_name = auto_swap_slot_name + self.local_my_sql_enabled = local_my_sql_enabled + self.ip_security_restrictions = ip_security_restrictions + self.http20_enabled = http20_enabled + self.min_tls_version = min_tls_version + + +class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + super(SiteMachineKey, self).__init__(**kwargs) + self.validation = validation + self.validation_key = validation_key + self.decryption = decryption + self.decryption_key = decryption_key + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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.v2016_09_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.v2016_09_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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(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.v2016_09_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2016_09_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: str=None, sku=None, capacity=None, **kwargs) -> None: + super(SkuInfo, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity + + +class SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + self.count = count + self.time_interval = time_interval + + +class SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: + ~azure.mgmt.web.v2016_09_01.models.SnapshotRecoveryTarget + :param overwrite: Required. If true the recovery operation + can overwrite source app; otherwise, 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + } + + def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: + super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) + self.snapshot_time = snapshot_time + self.recovery_target = recovery_target + self.overwrite = overwrite + self.recover_configuration = recover_configuration + self.ignore_conflicting_host_names = ignore_conflicting_host_names + + +class SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: + super(SnapshotRecoveryTarget, self).__init__(**kwargs) + self.location = location + self.id = id + + +class StampCapacity(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.v2016_09_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' + :type worker_size: str or + ~azure.mgmt.web.v2016_09_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 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: true if capacity + is applicable for all apps; otherwise, false. + :type is_applicable_for_all_compute_modes: bool + :param site_mode: Shared or Dedicated. + :type site_mode: str + """ + + _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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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'}, + } + + def __init__(self, *, name: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, **kwargs) -> None: + 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 + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + self.count = count + self.time_interval = time_interval + + +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 usage_name: Name of the quota. + :vartype usage_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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2016_09_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}, + 'usage_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'}, + 'usage_name': {'key': 'properties.name', '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': 'ComputeModeOptions'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(Usage, self).__init__(kind=kind, **kwargs) + self.display_name = None + self.usage_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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param user_name: Username + :type user_name: str + :param publishing_user_name: Required. 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'properties.name', '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'}, + } + + def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: + super(User, self).__init__(kind=kind, **kwargs) + self.user_name = user_name + 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 + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2016_09_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +class VirtualIPMapping(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 + """ + + _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'}, + } + + def __init__(self, *, virtual_ip: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, **kwargs) -> None: + 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 + + +class VirtualNetworkProfile(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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=None, subnet: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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: bytearray + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2016_09_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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': 'bytearray'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: + 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 + + +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 vnet_route_name: The name of this route. This is only returned by + the server and does not need to be set by the client. + :type vnet_route_name: 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.v2016_09_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'}, + 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + super(VnetRoute, self).__init__(kind=kind, **kwargs) + self.vnet_route_name = vnet_route_name + self.start_address = start_address + self.end_address = end_address + self.route_type = route_type + + +class WebAppCollection(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.v2016_09_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, **kwargs) -> None: + super(WebAppCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.v2016_09_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 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.v2016_09_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] + :param sku: + :type sku: ~azure.mgmt.web.v2016_09_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: + super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) + 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 + self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_paged_models.py new file mode 100644 index 00000000000..483d81a457f --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_paged_models.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 msrest.paging import Paged + + +class AppServiceEnvironmentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) +class StampCapacityPaged(Paged): + """ + A paging container for iterating over a list of :class:`StampCapacity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StampCapacity]'} + } + + def __init__(self, *args, **kwargs): + + super(StampCapacityPaged, self).__init__(*args, **kwargs) +class ResourceMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricPaged, self).__init__(*args, **kwargs) +class WorkerPoolResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkerPoolResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) +class ResourceMetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) +class SkuInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInfoPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class AppServicePlanPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServicePlan ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServicePlanPaged, self).__init__(*args, **kwargs) +class SitePaged(Paged): + """ + A paging container for iterating over a list of :class:`Site ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Site]'} + } + + def __init__(self, *args, **kwargs): + + super(SitePaged, self).__init__(*args, **kwargs) +class CsmUsageQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmUsageQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) +class StrPaged(Paged): + """ + A paging container for iterating over a list of str object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[str]'} + } + + def __init__(self, *args, **kwargs): + + super(StrPaged, self).__init__(*args, **kwargs) +class HybridConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`HybridConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HybridConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(HybridConnectionPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..9ea4b6e131e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_web_site_management_client_enums.py @@ -0,0 +1,175 @@ +# 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 + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class HostingEnvironmentStatus(str, Enum): + + preparing = "Preparing" + ready = "Ready" + scaling = "Scaling" + deleting = "Deleting" + + +class InternalLoadBalancingMode(str, Enum): + + none = "None" + web = "Web" + publishing = "Publishing" + + +class ComputeModeOptions(str, Enum): + + shared = "Shared" + dedicated = "Dedicated" + dynamic = "Dynamic" + + +class WorkerSizeOptions(str, Enum): + + default = "Default" + small = "Small" + medium = "Medium" + large = "Large" + d1 = "D1" + d2 = "D2" + d3 = "D3" + + +class AccessControlEntryAction(str, Enum): + + permit = "Permit" + deny = "Deny" + + +class RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 ScmType(str, Enum): + + 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" + + +class ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/__init__.py new file mode 100644 index 00000000000..7366e58aee4 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/__init__.py @@ -0,0 +1,18 @@ +# 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_environments_operations import AppServiceEnvironmentsOperations +from ._app_service_plans_operations import AppServicePlansOperations + +__all__ = [ + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_environments_operations.py new file mode 100644 index 00000000000..437b21d791e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_environments_operations.py @@ -0,0 +1,3146 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceEnvironmentsOperations(object): + """AppServiceEnvironmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all App Service Environments for a subscription. + + Get all App Service Environments for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all App Service Environments in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the properties of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an App Service Environment. + + 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.v2016_09_01.models.AppServiceEnvironmentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceEnvironmentResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete an App Service Environment. + + 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 true to force the deletion + even if the App Service Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update an App Service Environment. + + 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.v2016_09_01.models.AppServiceEnvironmentPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def list_capacities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the used, available, and total worker capacity an App Service + Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StampCapacity + :rtype: + ~azure.mgmt.web.v2016_09_01.models.StampCapacityPaged[~azure.mgmt.web.v2016_09_01.models.StampCapacity] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_capacities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} + + def list_vips( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get IP addresses assigned to an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.AddressResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_vips.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} + + def list_diagnostics( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get diagnostic information for an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2016_09_01.models.HostingEnvironmentDiagnostics] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_diagnostics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} + + def get_diagnostics_item( + self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): + """Get a diagnostics item for an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostingEnvironmentDiagnostics or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2016_09_01.models.HostingEnvironmentDiagnostics or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_diagnostics_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} + + def list_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get global metric definitions of an App Service Environment. + + Get global metric definitions 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.MetricDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'} + + def list_metrics( + self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get global metrics of an App Service Environment. + + Get global 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 details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'} + + def list_multi_role_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get all multi-role pools. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} + + def get_multi_role_pool( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get properties of a multi-role pool. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + + def _create_or_update_multi_role_pool_initial( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a multi-role pool. + + 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.v2016_09_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a multi-role pool. + + 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.v2016_09_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def list_multi_role_pool_instance_metric_definitions( + self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): + """Get metric definitions for a specific instance of a multi-role pool of + an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} + + def list_multi_role_pool_instance_metrics( + self, resource_group_name, name, instance, details=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for a specific instance of a multi-role pool of an App + Service Environment. + + Get metrics 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 + :param details: Specify true to include instance details. + The default is false. + :type details: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'} + + def list_multi_role_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get metric definitions for a multi-role pool of an App Service + Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} + + def list_multi_role_metrics( + self, resource_group_name, name, start_time=None, end_time=None, time_grain=None, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for a multi-role pool of an App Service Environment. + + Get 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 + :param start_time: Beginning time of the metrics query. + :type start_time: str + :param end_time: End time of the metrics query. + :type end_time: str + :param time_grain: Time granularity of the metrics query. + :type time_grain: str + :param details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'str') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'str') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str') + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'} + + def list_multi_role_pool_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get available SKUs for scaling a multi-role pool. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2016_09_01.models.SkuInfoPaged[~azure.mgmt.web.v2016_09_01.models.SkuInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} + + def list_multi_role_usages( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get usage metrics for a multi-role pool of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2016_09_01.models.UsagePaged[~azure.mgmt.web.v2016_09_01.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} + + def list_operations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List all currently running operations on the App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2016_09_01.models.Operation] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_operations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Operation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} + + def reboot( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Reboot all machines in an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reboot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} + + + def _resume_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.resume.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def resume( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Resume an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.WebAppCollection]] + :raises: :class:`CloudError` + """ + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} + + def list_app_service_plans( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans in an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2016_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_app_service_plans.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} + + def list_web_apps( + self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): + """Get all apps in an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2016_09_01.models.SitePaged[~azure.mgmt.web.v2016_09_01.models.Site] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} + + + def _suspend_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.suspend.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def suspend( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Suspend an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.WebAppCollection]] + :raises: :class:`CloudError` + """ + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Get global usage metrics of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2016_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2016_09_01.models.CsmUsageQuota] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} + + def list_worker_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get all worker pools of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} + + def get_worker_pool( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """Get properties of a worker pool. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + + def _create_or_update_worker_pool_initial( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a worker pool. + + 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.v2016_09_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a worker pool. + + 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.v2016_09_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def list_worker_pool_instance_metric_definitions( + self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): + """Get metric definitions for a specific instance of a worker pool of an + App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} + + def list_worker_pool_instance_metrics( + self, resource_group_name, name, worker_pool_name, instance, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for a specific instance of a worker pool of an App Service + Environment. + + Get metrics 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 + :param details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'} + + def list_web_worker_metric_definitions( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """Get metric definitions for a worker pool of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} + + def list_web_worker_metrics( + self, resource_group_name, name, worker_pool_name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for a worker pool of a AppServiceEnvironment (App Service + Environment). + + Get metrics for a worker pool of a AppServiceEnvironment (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 worker pool + :type worker_pool_name: str + :param details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'} + + def list_worker_pool_skus( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """Get available SKUs for scaling a worker pool. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2016_09_01.models.SkuInfoPaged[~azure.mgmt.web.v2016_09_01.models.SkuInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} + + def list_web_worker_usages( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """Get usage metrics for a worker pool of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2016_09_01.models.UsagePaged[~azure.mgmt.web.v2016_09_01.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_plans_operations.py new file mode 100644 index 00000000000..3eb56a1d2c3 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_plans_operations.py @@ -0,0 +1,2133 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServicePlansOperations(object): + """AppServicePlansOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2016-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-09-01" + + self.config = config + + def list( + self, detailed=None, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans for a subscription. + + Get all App Service plans for a subscription. + + :param detailed: Specify true to return all App Service + plan properties. The default is false, which returns a + subset of the properties. + Retrieval of all properties may increase the API latency. + :type detailed: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2016_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + if detailed is not None: + query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2016_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlan') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an App Service Plan. + + 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.v2016_09_01.models.AppServicePlan + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AppServicePlan or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.AppServicePlan]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Delete an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + """Creates or updates an App Service Plan. + + 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.v2016_09_01.models.AppServicePlanPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def list_capabilities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List all capabilities of an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2016_09_01.models.Capability] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_capabilities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Capability]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a Hybrid Connection in use in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Delete a Hybrid Connection in use in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Get the send key name and value of a Hybrid Connection. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_web_apps_by_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Get all apps that use a Hybrid Connection in an App Service Plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of str + :rtype: ~azure.mgmt.web.v2016_09_01.models.StrPaged[str] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps_by_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} + + def get_hybrid_connection_plan_limit( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the maximum number of Hybrid Connections allowed in an App Service + plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionLimits or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.HybridConnectionLimits or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_hybrid_connection_plan_limit.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionLimits', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieve all Hybrid Connections in use in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HybridConnection + :rtype: + ~azure.mgmt.web.v2016_09_01.models.HybridConnectionPaged[~azure.mgmt.web.v2016_09_01.models.HybridConnection] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} + + def list_metric_defintions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get metrics that can be queried for an App Service plan, and their + definitions. + + Get metrics that can be queried for an App Service plan, and their + definitions. + + :param 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metric_defintions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metric_defintions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'} + + def list_metrics( + self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for an App Service plan. + + Get metrics for 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 details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'} + + def restart_web_apps( + self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): + """Restart all apps in an App Service plan. + + 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 true to perform a soft + restart, applies the configuration settings and restarts the apps if + necessary. The default is false, which always restarts + and reprovisions the apps + :type soft_restart: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} + + def list_web_apps( + self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """Get all apps associated with an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2016_09_01.models.SitePaged[~azure.mgmt.web.v2016_09_01.models.Site] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} + + def get_server_farm_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets all selectable SKUs for a given App Service Plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_server_farm_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets server farm usage information. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2016_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2016_09_01.models.CsmUsageQuota] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} + + def list_vnets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get all Virtual Networks associated with an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2016_09_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_vnets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} + + def get_vnet_from_server_farm( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """Get a Virtual Network associated with an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_from_server_farm.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """Get a Virtual Network gateway. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Update a Virtual Network gateway. + + 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.v2016_09_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_routes_for_vnet( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """Get all routes that are associated with a Virtual Network in an App + Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2016_09_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_routes_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} + + def get_route_for_vnet( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """Get a Virtual Network route in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2016_09_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_route_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def create_or_update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """Create or update a Virtual Network route in an App Service plan. + + 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.v2016_09_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def delete_vnet_route( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """Delete a Virtual Network route in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """Create or update a Virtual Network route in an App Service plan. + + 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.v2016_09_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def reboot_worker( + self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): + """Reboot a worker machine in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reboot_worker.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/version.py @@ -0,0 +1,13 @@ +# 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_web_site_management_client.py new file mode 100644 index 00000000000..4180ebdb5d7 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_web_site_management_client.py @@ -0,0 +1,116 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import WebSiteManagementClientOperationsMixin +from .operations import AppServiceCertificateOrdersOperations +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 ProviderOperations +from .operations import RecommendationsOperations +from .operations import WebAppsOperations +from .operations import AppServiceEnvironmentsOperations +from .operations import AppServicePlansOperations +from .operations import ResourceHealthMetadataOperations +from . import models + + +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar app_service_certificate_orders: AppServiceCertificateOrders operations + :vartype app_service_certificate_orders: azure.mgmt.web.v2018_02_01.operations.AppServiceCertificateOrdersOperations + :ivar certificate_registration_provider: CertificateRegistrationProvider operations + :vartype certificate_registration_provider: azure.mgmt.web.v2018_02_01.operations.CertificateRegistrationProviderOperations + :ivar domains: Domains operations + :vartype domains: azure.mgmt.web.v2018_02_01.operations.DomainsOperations + :ivar top_level_domains: TopLevelDomains operations + :vartype top_level_domains: azure.mgmt.web.v2018_02_01.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProvider operations + :vartype domain_registration_provider: azure.mgmt.web.v2018_02_01.operations.DomainRegistrationProviderOperations + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.web.v2018_02_01.operations.CertificatesOperations + :ivar deleted_web_apps: DeletedWebApps operations + :vartype deleted_web_apps: azure.mgmt.web.v2018_02_01.operations.DeletedWebAppsOperations + :ivar diagnostics: Diagnostics operations + :vartype diagnostics: azure.mgmt.web.v2018_02_01.operations.DiagnosticsOperations + :ivar provider: Provider operations + :vartype provider: azure.mgmt.web.v2018_02_01.operations.ProviderOperations + :ivar recommendations: Recommendations operations + :vartype recommendations: azure.mgmt.web.v2018_02_01.operations.RecommendationsOperations + :ivar web_apps: WebApps operations + :vartype web_apps: azure.mgmt.web.v2018_02_01.operations.WebAppsOperations + :ivar app_service_environments: AppServiceEnvironments operations + :vartype app_service_environments: azure.mgmt.web.v2018_02_01.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlans operations + :vartype app_service_plans: azure.mgmt.web.v2018_02_01.operations.AppServicePlansOperations + :ivar resource_health_metadata: ResourceHealthMetadata operations + :vartype resource_health_metadata: azure.mgmt.web.v2018_02_01.operations.ResourceHealthMetadataOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-02-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( + 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.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.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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/__init__.py new file mode 100644 index 00000000000..f46b704fcf8 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/__init__.py @@ -0,0 +1,946 @@ +# 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 AnalysisData + from ._models_py3 import AnalysisDefinition + from ._models_py3 import ApiDefinitionInfo + from ._models_py3 import ApplicationLogsConfig + from ._models_py3 import ApplicationStack + from ._models_py3 import AppServiceCertificate + from ._models_py3 import AppServiceCertificateOrder + from ._models_py3 import AppServiceCertificateOrderPatchResource + from ._models_py3 import AppServiceCertificatePatchResource + from ._models_py3 import AppServiceCertificateResource + from ._models_py3 import AppServiceEnvironment + from ._models_py3 import AppServiceEnvironmentPatchResource + from ._models_py3 import AppServiceEnvironmentResource + from ._models_py3 import AppServicePlan + from ._models_py3 import AppServicePlanPatchResource + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import AzureBlobStorageApplicationLogsConfig + from ._models_py3 import AzureBlobStorageHttpLogsConfig + from ._models_py3 import AzureStorageInfoValue + from ._models_py3 import AzureStoragePropertyDictionaryResource + from ._models_py3 import AzureTableStorageApplicationLogsConfig + from ._models_py3 import BackupItem + from ._models_py3 import BackupRequest + from ._models_py3 import BackupSchedule + from ._models_py3 import BillingMeter + from ._models_py3 import Capability + from ._models_py3 import Certificate + from ._models_py3 import CertificateDetails + from ._models_py3 import CertificateEmail + from ._models_py3 import CertificateOrderAction + from ._models_py3 import CertificatePatchResource + from ._models_py3 import CloningInfo + from ._models_py3 import ConnectionStringDictionary + from ._models_py3 import ConnStringInfo + from ._models_py3 import ConnStringValueTypePair + from ._models_py3 import Contact + from ._models_py3 import ContinuousWebJob + from ._models_py3 import CorsSettings + from ._models_py3 import CsmMoveResourceEnvelope + from ._models_py3 import CsmOperationDescription + from ._models_py3 import CsmOperationDescriptionProperties + from ._models_py3 import CsmOperationDisplay + from ._models_py3 import CsmPublishingProfileOptions + from ._models_py3 import CsmSlotEntity + from ._models_py3 import CsmUsageQuota + from ._models_py3 import CustomHostnameAnalysisResult + from ._models_py3 import DatabaseBackupSetting + from ._models_py3 import DataSource + from ._models_py3 import DataTableResponseColumn + from ._models_py3 import DataTableResponseObject + from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException + from ._models_py3 import DefaultErrorResponseError + from ._models_py3 import DefaultErrorResponseErrorDetailsItem + from ._models_py3 import DeletedAppRestoreRequest + from ._models_py3 import DeletedSite + from ._models_py3 import Deployment + 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 DiagnosticAnalysis + from ._models_py3 import DiagnosticCategory + from ._models_py3 import DiagnosticData + 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 DomainAvailablilityCheckResult + from ._models_py3 import DomainControlCenterSsoRequest + from ._models_py3 import DomainOwnershipIdentifier + 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 FileSystemApplicationLogsConfig + from ._models_py3 import FileSystemHttpLogsConfig + from ._models_py3 import FunctionEnvelope + from ._models_py3 import FunctionSecrets + from ._models_py3 import GeoDistribution + from ._models_py3 import GeoRegion + from ._models_py3 import GlobalCsmSkuDescription + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentDeploymentInfo + from ._models_py3 import HostingEnvironmentDiagnostics + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostKeys + from ._models_py3 import HostName + from ._models_py3 import HostNameBinding + from ._models_py3 import HostNameSslState + from ._models_py3 import HttpLogsConfig + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import HybridConnectionLimits + from ._models_py3 import Identifier + from ._models_py3 import InboundEnvironmentEndpoint + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import KeyInfo + from ._models_py3 import LocalizableString + from ._models_py3 import LogSpecification + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models_py3 import MetricAvailabilily + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricDefinition + from ._models_py3 import MetricSpecification + from ._models_py3 import MigrateMySqlRequest + from ._models_py3 import MigrateMySqlStatus + from ._models_py3 import MSDeploy + from ._models_py3 import MSDeployLog + from ._models_py3 import MSDeployLogEntry + from ._models_py3 import MSDeployStatus + from ._models_py3 import NameIdentifier + from ._models_py3 import NameValuePair + from ._models_py3 import NetworkAccessControlEntry + from ._models_py3 import NetworkFeatures + from ._models_py3 import NetworkTrace + from ._models_py3 import Operation + from ._models_py3 import OutboundEnvironmentEndpoint + 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 PremierAddOnPatchResource + from ._models_py3 import PrivateAccess + from ._models_py3 import PrivateAccessSubnet + from ._models_py3 import PrivateAccessVirtualNetwork + from ._models_py3 import ProcessInfo + from ._models_py3 import ProcessModuleInfo + from ._models_py3 import ProcessThreadInfo + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PublicCertificate + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import Recommendation + from ._models_py3 import RecommendationRule + from ._models_py3 import ReissueCertificateOrderRequest + from ._models_py3 import RelayServiceConnectionEntity + from ._models_py3 import Rendering + from ._models_py3 import RenewCertificateOrderRequest + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceHealthMetadata + from ._models_py3 import ResourceMetric + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceMetricName + from ._models_py3 import ResourceMetricProperty + from ._models_py3 import ResourceMetricValue + from ._models_py3 import ResourceNameAvailability + from ._models_py3 import ResourceNameAvailabilityRequest + from ._models_py3 import ResponseMetaData + from ._models_py3 import RestoreRequest + from ._models_py3 import ServiceSpecification + from ._models_py3 import Site + from ._models_py3 import SiteAuthSettings + from ._models_py3 import SiteCloneability + from ._models_py3 import SiteCloneabilityCriterion + from ._models_py3 import SiteConfig + from ._models_py3 import SiteConfigResource + from ._models_py3 import SiteConfigurationSnapshotInfo + from ._models_py3 import SiteExtensionInfo + from ._models_py3 import SiteInstance + 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 SkuInfos + from ._models_py3 import SlotConfigNamesResource + from ._models_py3 import SlotDifference + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotRecoverySource + from ._models_py3 import SnapshotRestoreRequest + from ._models_py3 import Solution + from ._models_py3 import SourceControl + from ._models_py3 import StackMajorVersion + from ._models_py3 import StackMinorVersion + from ._models_py3 import StampCapacity + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import StorageMigrationOptions + from ._models_py3 import StorageMigrationResponse + from ._models_py3 import StringDictionary + from ._models_py3 import SwiftVirtualNetwork + from ._models_py3 import TldLegalAgreement + from ._models_py3 import TopLevelDomain + from ._models_py3 import TopLevelDomainAgreementOption + from ._models_py3 import TriggeredJobHistory + from ._models_py3 import TriggeredJobRun + from ._models_py3 import TriggeredWebJob + from ._models_py3 import Usage + from ._models_py3 import User + from ._models_py3 import ValidateContainerSettingsRequest + 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 WebJob + from ._models_py3 import WorkerPool + from ._models_py3 import WorkerPoolResource +except (SyntaxError, ImportError): + from ._models import AbnormalTimePeriod + from ._models import Address + from ._models import AddressResponse + from ._models import AnalysisData + from ._models import AnalysisDefinition + from ._models import ApiDefinitionInfo + from ._models import ApplicationLogsConfig + from ._models import ApplicationStack + from ._models import AppServiceCertificate + from ._models import AppServiceCertificateOrder + from ._models import AppServiceCertificateOrderPatchResource + from ._models import AppServiceCertificatePatchResource + from ._models import AppServiceCertificateResource + from ._models import AppServiceEnvironment + from ._models import AppServiceEnvironmentPatchResource + from ._models import AppServiceEnvironmentResource + from ._models import AppServicePlan + from ._models import AppServicePlanPatchResource + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import AzureBlobStorageApplicationLogsConfig + from ._models import AzureBlobStorageHttpLogsConfig + from ._models import AzureStorageInfoValue + from ._models import AzureStoragePropertyDictionaryResource + from ._models import AzureTableStorageApplicationLogsConfig + from ._models import BackupItem + from ._models import BackupRequest + from ._models import BackupSchedule + from ._models import BillingMeter + from ._models import Capability + from ._models import Certificate + from ._models import CertificateDetails + from ._models import CertificateEmail + from ._models import CertificateOrderAction + from ._models import CertificatePatchResource + from ._models import CloningInfo + from ._models import ConnectionStringDictionary + from ._models import ConnStringInfo + from ._models import ConnStringValueTypePair + from ._models import Contact + from ._models import ContinuousWebJob + from ._models import CorsSettings + from ._models import CsmMoveResourceEnvelope + from ._models import CsmOperationDescription + from ._models import CsmOperationDescriptionProperties + from ._models import CsmOperationDisplay + from ._models import CsmPublishingProfileOptions + from ._models import CsmSlotEntity + from ._models import CsmUsageQuota + from ._models import CustomHostnameAnalysisResult + from ._models import DatabaseBackupSetting + from ._models import DataSource + from ._models import DataTableResponseColumn + from ._models import DataTableResponseObject + from ._models import DefaultErrorResponse, DefaultErrorResponseException + from ._models import DefaultErrorResponseError + from ._models import DefaultErrorResponseErrorDetailsItem + from ._models import DeletedAppRestoreRequest + from ._models import DeletedSite + from ._models import Deployment + from ._models import DeploymentLocations + from ._models import DetectorAbnormalTimePeriod + from ._models import DetectorDefinition + from ._models import DetectorInfo + from ._models import DetectorResponse + from ._models import DiagnosticAnalysis + from ._models import DiagnosticCategory + from ._models import DiagnosticData + from ._models import DiagnosticDetectorResponse + from ._models import DiagnosticMetricSample + from ._models import DiagnosticMetricSet + from ._models import Dimension + from ._models import Domain + from ._models import DomainAvailablilityCheckResult + from ._models import DomainControlCenterSsoRequest + from ._models import DomainOwnershipIdentifier + from ._models import DomainPatchResource + from ._models import DomainPurchaseConsent + from ._models import DomainRecommendationSearchParameters + from ._models import EnabledConfig + from ._models import EndpointDependency + from ._models import EndpointDetail + from ._models import ErrorEntity + from ._models import Experiments + from ._models import FileSystemApplicationLogsConfig + from ._models import FileSystemHttpLogsConfig + from ._models import FunctionEnvelope + from ._models import FunctionSecrets + from ._models import GeoDistribution + from ._models import GeoRegion + from ._models import GlobalCsmSkuDescription + from ._models import HandlerMapping + from ._models import HostingEnvironmentDeploymentInfo + from ._models import HostingEnvironmentDiagnostics + from ._models import HostingEnvironmentProfile + from ._models import HostKeys + from ._models import HostName + from ._models import HostNameBinding + from ._models import HostNameSslState + from ._models import HttpLogsConfig + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import HybridConnectionLimits + from ._models import Identifier + from ._models import InboundEnvironmentEndpoint + from ._models import IpSecurityRestriction + from ._models import KeyInfo + from ._models import LocalizableString + from ._models import LogSpecification + from ._models import ManagedServiceIdentity + from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models import MetricAvailabilily + from ._models import MetricAvailability + from ._models import MetricDefinition + from ._models import MetricSpecification + from ._models import MigrateMySqlRequest + from ._models import MigrateMySqlStatus + from ._models import MSDeploy + from ._models import MSDeployLog + from ._models import MSDeployLogEntry + from ._models import MSDeployStatus + from ._models import NameIdentifier + from ._models import NameValuePair + from ._models import NetworkAccessControlEntry + from ._models import NetworkFeatures + from ._models import NetworkTrace + from ._models import Operation + from ._models import OutboundEnvironmentEndpoint + from ._models import PerfMonResponse + from ._models import PerfMonSample + from ._models import PerfMonSet + from ._models import PremierAddOn + from ._models import PremierAddOnOffer + from ._models import PremierAddOnPatchResource + from ._models import PrivateAccess + from ._models import PrivateAccessSubnet + from ._models import PrivateAccessVirtualNetwork + from ._models import ProcessInfo + from ._models import ProcessModuleInfo + from ._models import ProcessThreadInfo + from ._models import ProxyOnlyResource + from ._models import PublicCertificate + from ._models import PushSettings + from ._models import RampUpRule + from ._models import Recommendation + from ._models import RecommendationRule + from ._models import ReissueCertificateOrderRequest + from ._models import RelayServiceConnectionEntity + from ._models import Rendering + from ._models import RenewCertificateOrderRequest + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceHealthMetadata + from ._models import ResourceMetric + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceMetricName + from ._models import ResourceMetricProperty + from ._models import ResourceMetricValue + from ._models import ResourceNameAvailability + from ._models import ResourceNameAvailabilityRequest + from ._models import ResponseMetaData + from ._models import RestoreRequest + from ._models import ServiceSpecification + from ._models import Site + from ._models import SiteAuthSettings + from ._models import SiteCloneability + from ._models import SiteCloneabilityCriterion + from ._models import SiteConfig + from ._models import SiteConfigResource + from ._models import SiteConfigurationSnapshotInfo + from ._models import SiteExtensionInfo + from ._models import SiteInstance + from ._models import SiteLimits + from ._models import SiteLogsConfig + from ._models import SiteMachineKey + from ._models import SitePatchResource + from ._models import SitePhpErrorLogFlag + from ._models import SiteSeal + from ._models import SiteSealRequest + from ._models import SiteSourceControl + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SkuInfo + from ._models import SkuInfos + from ._models import SlotConfigNamesResource + from ._models import SlotDifference + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import Snapshot + from ._models import SnapshotRecoverySource + from ._models import SnapshotRestoreRequest + from ._models import Solution + from ._models import SourceControl + from ._models import StackMajorVersion + from ._models import StackMinorVersion + from ._models import StampCapacity + from ._models import StatusCodesBasedTrigger + from ._models import StorageMigrationOptions + from ._models import StorageMigrationResponse + from ._models import StringDictionary + from ._models import SwiftVirtualNetwork + from ._models import TldLegalAgreement + from ._models import TopLevelDomain + from ._models import TopLevelDomainAgreementOption + from ._models import TriggeredJobHistory + from ._models import TriggeredJobRun + from ._models import TriggeredWebJob + from ._models import Usage + from ._models import User + from ._models import ValidateContainerSettingsRequest + from ._models import ValidateRequest + from ._models import ValidateResponse + from ._models import ValidateResponseError + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VirtualIPMapping + from ._models import VirtualNetworkProfile + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetParameters + from ._models import VnetRoute + from ._models import VnetValidationFailureDetails + from ._models import VnetValidationTestFailure + from ._models import WebAppCollection + from ._models import WebJob + from ._models import WorkerPool + from ._models import WorkerPoolResource +from ._paged_models import AnalysisDefinitionPaged +from ._paged_models import ApplicationStackPaged +from ._paged_models import AppServiceCertificateOrderPaged +from ._paged_models import AppServiceCertificateResourcePaged +from ._paged_models import AppServiceEnvironmentResourcePaged +from ._paged_models import AppServicePlanPaged +from ._paged_models import BackupItemPaged +from ._paged_models import BillingMeterPaged +from ._paged_models import CertificatePaged +from ._paged_models import ContinuousWebJobPaged +from ._paged_models import CsmOperationDescriptionPaged +from ._paged_models import CsmUsageQuotaPaged +from ._paged_models import DeletedSitePaged +from ._paged_models import DeploymentPaged +from ._paged_models import DetectorDefinitionPaged +from ._paged_models import DetectorResponsePaged +from ._paged_models import DiagnosticCategoryPaged +from ._paged_models import DomainOwnershipIdentifierPaged +from ._paged_models import DomainPaged +from ._paged_models import FunctionEnvelopePaged +from ._paged_models import GeoRegionPaged +from ._paged_models import HostNameBindingPaged +from ._paged_models import HybridConnectionPaged +from ._paged_models import IdentifierPaged +from ._paged_models import InboundEnvironmentEndpointPaged +from ._paged_models import NameIdentifierPaged +from ._paged_models import OutboundEnvironmentEndpointPaged +from ._paged_models import PerfMonResponsePaged +from ._paged_models import PremierAddOnOfferPaged +from ._paged_models import ProcessInfoPaged +from ._paged_models import ProcessModuleInfoPaged +from ._paged_models import ProcessThreadInfoPaged +from ._paged_models import PublicCertificatePaged +from ._paged_models import RecommendationPaged +from ._paged_models import ResourceHealthMetadataPaged +from ._paged_models import ResourceMetricDefinitionPaged +from ._paged_models import ResourceMetricPaged +from ._paged_models import SiteConfigResourcePaged +from ._paged_models import SiteConfigurationSnapshotInfoPaged +from ._paged_models import SiteExtensionInfoPaged +from ._paged_models import SiteInstancePaged +from ._paged_models import SitePaged +from ._paged_models import SkuInfoPaged +from ._paged_models import SlotDifferencePaged +from ._paged_models import SnapshotPaged +from ._paged_models import SourceControlPaged +from ._paged_models import StampCapacityPaged +from ._paged_models import StrPaged +from ._paged_models import TldLegalAgreementPaged +from ._paged_models import TopLevelDomainPaged +from ._paged_models import TriggeredJobHistoryPaged +from ._paged_models import TriggeredWebJobPaged +from ._paged_models import UsagePaged +from ._paged_models import WebJobPaged +from ._paged_models import WorkerPoolResourcePaged +from ._web_site_management_client_enums import ( + KeyVaultSecretStatus, + CertificateProductType, + ProvisioningState, + CertificateOrderStatus, + CertificateOrderActionType, + RouteType, + ManagedServiceIdentityType, + IpFilterTag, + AutoHealActionType, + ConnectionStringType, + AzureStorageType, + AzureStorageState, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + FtpsState, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + RedundancyMode, + StatusOptions, + DomainStatus, + AzureResourceType, + CustomHostNameDnsRecordType, + HostNameType, + DnsType, + DomainType, + HostingEnvironmentStatus, + InternalLoadBalancingMode, + ComputeModeOptions, + WorkerSizeOptions, + AccessControlEntryAction, + OperationStatus, + IssueType, + SolutionType, + RenderingType, + ResourceScopeType, + NotificationLevel, + Channels, + AppServicePlanRestrictions, + InAvailabilityReasonType, + CheckNameResourceTypes, + ValidateResourceTypes, + LogLevel, + BackupItemStatus, + DatabaseType, + FrequencyUnit, + ContinuousWebJobStatus, + WebJobType, + PublishingProfileFormat, + DnsVerificationTestResult, + MSDeployLogEntryType, + MSDeployProvisioningState, + MySqlMigrationType, + PublicCertificateLocation, + BackupRestoreOperationType, + UnauthenticatedClientAction, + BuiltInAuthenticationProvider, + CloneAbilityResult, + SiteExtensionType, + TriggeredWebJobStatus, + SkuName, +) + +__all__ = [ + 'AbnormalTimePeriod', + 'Address', + 'AddressResponse', + 'AnalysisData', + 'AnalysisDefinition', + 'ApiDefinitionInfo', + 'ApplicationLogsConfig', + 'ApplicationStack', + 'AppServiceCertificate', + 'AppServiceCertificateOrder', + 'AppServiceCertificateOrderPatchResource', + 'AppServiceCertificatePatchResource', + 'AppServiceCertificateResource', + 'AppServiceEnvironment', + 'AppServiceEnvironmentPatchResource', + 'AppServiceEnvironmentResource', + 'AppServicePlan', + 'AppServicePlanPatchResource', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'AzureBlobStorageApplicationLogsConfig', + 'AzureBlobStorageHttpLogsConfig', + 'AzureStorageInfoValue', + 'AzureStoragePropertyDictionaryResource', + 'AzureTableStorageApplicationLogsConfig', + 'BackupItem', + 'BackupRequest', + 'BackupSchedule', + 'BillingMeter', + 'Capability', + 'Certificate', + 'CertificateDetails', + 'CertificateEmail', + 'CertificateOrderAction', + 'CertificatePatchResource', + 'CloningInfo', + 'ConnectionStringDictionary', + 'ConnStringInfo', + 'ConnStringValueTypePair', + 'Contact', + 'ContinuousWebJob', + 'CorsSettings', + 'CsmMoveResourceEnvelope', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'CsmPublishingProfileOptions', + 'CsmSlotEntity', + 'CsmUsageQuota', + 'CustomHostnameAnalysisResult', + 'DatabaseBackupSetting', + 'DataSource', + 'DataTableResponseColumn', + 'DataTableResponseObject', + 'DefaultErrorResponse', 'DefaultErrorResponseException', + 'DefaultErrorResponseError', + 'DefaultErrorResponseErrorDetailsItem', + 'DeletedAppRestoreRequest', + 'DeletedSite', + 'Deployment', + 'DeploymentLocations', + 'DetectorAbnormalTimePeriod', + 'DetectorDefinition', + 'DetectorInfo', + 'DetectorResponse', + 'DiagnosticAnalysis', + 'DiagnosticCategory', + 'DiagnosticData', + 'DiagnosticDetectorResponse', + 'DiagnosticMetricSample', + 'DiagnosticMetricSet', + 'Dimension', + 'Domain', + 'DomainAvailablilityCheckResult', + 'DomainControlCenterSsoRequest', + 'DomainOwnershipIdentifier', + 'DomainPatchResource', + 'DomainPurchaseConsent', + 'DomainRecommendationSearchParameters', + 'EnabledConfig', + 'EndpointDependency', + 'EndpointDetail', + 'ErrorEntity', + 'Experiments', + 'FileSystemApplicationLogsConfig', + 'FileSystemHttpLogsConfig', + 'FunctionEnvelope', + 'FunctionSecrets', + 'GeoDistribution', + 'GeoRegion', + 'GlobalCsmSkuDescription', + 'HandlerMapping', + 'HostingEnvironmentDeploymentInfo', + 'HostingEnvironmentDiagnostics', + 'HostingEnvironmentProfile', + 'HostKeys', + 'HostName', + 'HostNameBinding', + 'HostNameSslState', + 'HttpLogsConfig', + 'HybridConnection', + 'HybridConnectionKey', + 'HybridConnectionLimits', + 'Identifier', + 'InboundEnvironmentEndpoint', + 'IpSecurityRestriction', + 'KeyInfo', + 'LocalizableString', + 'LogSpecification', + 'ManagedServiceIdentity', + 'ManagedServiceIdentityUserAssignedIdentitiesValue', + 'MetricAvailabilily', + 'MetricAvailability', + 'MetricDefinition', + 'MetricSpecification', + 'MigrateMySqlRequest', + 'MigrateMySqlStatus', + 'MSDeploy', + 'MSDeployLog', + 'MSDeployLogEntry', + 'MSDeployStatus', + 'NameIdentifier', + 'NameValuePair', + 'NetworkAccessControlEntry', + 'NetworkFeatures', + 'NetworkTrace', + 'Operation', + 'OutboundEnvironmentEndpoint', + 'PerfMonResponse', + 'PerfMonSample', + 'PerfMonSet', + 'PremierAddOn', + 'PremierAddOnOffer', + 'PremierAddOnPatchResource', + 'PrivateAccess', + 'PrivateAccessSubnet', + 'PrivateAccessVirtualNetwork', + 'ProcessInfo', + 'ProcessModuleInfo', + 'ProcessThreadInfo', + 'ProxyOnlyResource', + 'PublicCertificate', + 'PushSettings', + 'RampUpRule', + 'Recommendation', + 'RecommendationRule', + 'ReissueCertificateOrderRequest', + 'RelayServiceConnectionEntity', + 'Rendering', + 'RenewCertificateOrderRequest', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceHealthMetadata', + 'ResourceMetric', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceMetricName', + 'ResourceMetricProperty', + 'ResourceMetricValue', + 'ResourceNameAvailability', + 'ResourceNameAvailabilityRequest', + 'ResponseMetaData', + 'RestoreRequest', + 'ServiceSpecification', + 'Site', + 'SiteAuthSettings', + 'SiteCloneability', + 'SiteCloneabilityCriterion', + 'SiteConfig', + 'SiteConfigResource', + 'SiteConfigurationSnapshotInfo', + 'SiteExtensionInfo', + 'SiteInstance', + 'SiteLimits', + 'SiteLogsConfig', + 'SiteMachineKey', + 'SitePatchResource', + 'SitePhpErrorLogFlag', + 'SiteSeal', + 'SiteSealRequest', + 'SiteSourceControl', + 'SkuCapacity', + 'SkuDescription', + 'SkuInfo', + 'SkuInfos', + 'SlotConfigNamesResource', + 'SlotDifference', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'Snapshot', + 'SnapshotRecoverySource', + 'SnapshotRestoreRequest', + 'Solution', + 'SourceControl', + 'StackMajorVersion', + 'StackMinorVersion', + 'StampCapacity', + 'StatusCodesBasedTrigger', + 'StorageMigrationOptions', + 'StorageMigrationResponse', + 'StringDictionary', + 'SwiftVirtualNetwork', + 'TldLegalAgreement', + 'TopLevelDomain', + 'TopLevelDomainAgreementOption', + 'TriggeredJobHistory', + 'TriggeredJobRun', + 'TriggeredWebJob', + 'Usage', + 'User', + 'ValidateContainerSettingsRequest', + 'ValidateRequest', + 'ValidateResponse', + 'ValidateResponseError', + 'VirtualApplication', + 'VirtualDirectory', + 'VirtualIPMapping', + 'VirtualNetworkProfile', + 'VnetGateway', + 'VnetInfo', + 'VnetParameters', + 'VnetRoute', + 'VnetValidationFailureDetails', + 'VnetValidationTestFailure', + 'WebAppCollection', + 'WebJob', + 'WorkerPool', + 'WorkerPoolResource', + 'AppServiceCertificateOrderPaged', + 'AppServiceCertificateResourcePaged', + 'CsmOperationDescriptionPaged', + 'DomainPaged', + 'NameIdentifierPaged', + 'DomainOwnershipIdentifierPaged', + 'TopLevelDomainPaged', + 'TldLegalAgreementPaged', + 'CertificatePaged', + 'DeletedSitePaged', + 'DetectorResponsePaged', + 'DiagnosticCategoryPaged', + 'AnalysisDefinitionPaged', + 'DetectorDefinitionPaged', + 'ApplicationStackPaged', + 'RecommendationPaged', + 'SourceControlPaged', + 'BillingMeterPaged', + 'GeoRegionPaged', + 'IdentifierPaged', + 'PremierAddOnOfferPaged', + 'SitePaged', + 'BackupItemPaged', + 'SiteConfigResourcePaged', + 'SiteConfigurationSnapshotInfoPaged', + 'ContinuousWebJobPaged', + 'DeploymentPaged', + 'FunctionEnvelopePaged', + 'HostNameBindingPaged', + 'SiteInstancePaged', + 'ProcessInfoPaged', + 'ProcessModuleInfoPaged', + 'ProcessThreadInfoPaged', + 'ResourceMetricDefinitionPaged', + 'ResourceMetricPaged', + 'PerfMonResponsePaged', + 'PublicCertificatePaged', + 'SiteExtensionInfoPaged', + 'SlotDifferencePaged', + 'SnapshotPaged', + 'TriggeredWebJobPaged', + 'TriggeredJobHistoryPaged', + 'CsmUsageQuotaPaged', + 'WebJobPaged', + 'AppServiceEnvironmentResourcePaged', + 'StampCapacityPaged', + 'InboundEnvironmentEndpointPaged', + 'WorkerPoolResourcePaged', + 'SkuInfoPaged', + 'UsagePaged', + 'OutboundEnvironmentEndpointPaged', + 'AppServicePlanPaged', + 'StrPaged', + 'HybridConnectionPaged', + 'ResourceHealthMetadataPaged', + 'KeyVaultSecretStatus', + 'CertificateProductType', + 'ProvisioningState', + 'CertificateOrderStatus', + 'CertificateOrderActionType', + 'RouteType', + 'ManagedServiceIdentityType', + 'IpFilterTag', + 'AutoHealActionType', + 'ConnectionStringType', + 'AzureStorageType', + 'AzureStorageState', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'FtpsState', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'RedundancyMode', + 'StatusOptions', + 'DomainStatus', + 'AzureResourceType', + 'CustomHostNameDnsRecordType', + 'HostNameType', + 'DnsType', + 'DomainType', + 'HostingEnvironmentStatus', + 'InternalLoadBalancingMode', + 'ComputeModeOptions', + 'WorkerSizeOptions', + 'AccessControlEntryAction', + 'OperationStatus', + 'IssueType', + 'SolutionType', + 'RenderingType', + 'ResourceScopeType', + 'NotificationLevel', + 'Channels', + 'AppServicePlanRestrictions', + 'InAvailabilityReasonType', + 'CheckNameResourceTypes', + 'ValidateResourceTypes', + 'LogLevel', + 'BackupItemStatus', + 'DatabaseType', + 'FrequencyUnit', + 'ContinuousWebJobStatus', + 'WebJobType', + 'PublishingProfileFormat', + 'DnsVerificationTestResult', + 'MSDeployLogEntryType', + 'MSDeployProvisioningState', + 'MySqlMigrationType', + 'PublicCertificateLocation', + 'BackupRestoreOperationType', + 'UnauthenticatedClientAction', + 'BuiltInAuthenticationProvider', + 'CloneAbilityResult', + 'SiteExtensionType', + 'TriggeredWebJobStatus', + 'SkuName', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models.py new file mode 100644 index 00000000000..1e45858b69f --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models.py @@ -0,0 +1,12295 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2018_02_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2018_02_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(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.get('address1', None) + self.address2 = kwargs.get('address2', None) + self.city = kwargs.get('city', None) + self.country = kwargs.get('country', None) + self.postal_code = kwargs.get('postal_code', None) + self.state = kwargs.get('state', None) + + +class AddressResponse(Model): + """Describes main public IP address and any extra virtual IPs. + + :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.v2018_02_01.models.VirtualIPMapping] + """ + + _attribute_map = { + 'service_ip_address': {'key': 'serviceIpAddress', 'type': 'str'}, + 'internal_ip_address': {'key': 'internalIpAddress', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'outboundIpAddresses', 'type': '[str]'}, + 'vip_mappings': {'key': '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 AnalysisData(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.v2018_02_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2018_02_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2018_02_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 ProxyOnlyResource(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 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(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 ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2018_02_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2018_02_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2018_02_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(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.v2018_02_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2018_02_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]'}, + } + + 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) + + +class AppServiceCertificate(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.v2018_02_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': 'KeyVaultSecretStatus'}, + } + + 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 Resource(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: 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.get('location', None) + 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: Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2018_02_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2018_02_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2018_02_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.v2018_02_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2018_02_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2018_02_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2018_02_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2018_02_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.v2018_02_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2018_02_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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.v2018_02_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': 'KeyVaultSecretStatus'}, + } + + 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: 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.v2018_02_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': 'KeyVaultSecretStatus'}, + } + + 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(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2018_02_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2018_02_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) + self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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: Resource tags. + :type tags: dict[str, str] + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2018_02_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentResource, self).__init__(**kwargs) + self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) + self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) + + +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: Resource tags. + :type tags: dict[str, 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.v2018_02_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.v2018_02_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2018_02_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2018_02_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, 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.sku = kwargs.get('sku', 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.v2018_02_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.v2018_02_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2018_02_01.models.ProvisioningState + """ + + _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': 'StatusOptions'}, + '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': 'ProvisioningState'}, + } + + 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 + + +class AutoHealActions(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.v2018_02_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2018_02_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': 'AutoHealActionType'}, + '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(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(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.v2018_02_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2018_02_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2018_02_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) + + +class AzureBlobStorageApplicationLogsConfig(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.v2018_02_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': 'LogLevel'}, + '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(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 AzureStorageInfoValue(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.v2018_02_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' + :vartype state: str or + ~azure.mgmt.web.v2018_02_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + 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.v2018_02_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(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.v2018_02_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': 'LogLevel'}, + '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.get('sas_url', None) + + +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 backup_item_name: Name of this backup. + :vartype backup_item_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.v2018_02_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 + :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.v2018_02_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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.backup_item_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 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. + + 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 + :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: Required. 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.v2018_02_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2018_02_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account_url': {'required': 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(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). Default value: 7 . + :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.v2018_02_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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 + """ + + _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'}, + } + + 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) + + +class Capability(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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2018_02_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.v2018_02_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', '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) + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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 + """ + + _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.v2018_02_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: 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': 'CertificateOrderActionType'}, + '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 CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2018_02_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.v2018_02_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', '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) + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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.get('source_web_app_id', None) + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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.v2018_02_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(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.v2018_02_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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(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.v2018_02_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, **kwargs): + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) + + +class Contact(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.v2018_02_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.get('email', None) + self.fax = kwargs.get('fax', None) + self.job_title = kwargs.get('job_title', None) + self.name_first = kwargs.get('name_first', None) + self.name_last = kwargs.get('name_last', None) + self.name_middle = kwargs.get('name_middle', None) + self.organization = kwargs.get('organization', None) + self.phone = kwargs.get('phone', 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.v2018_02_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.v2018_02_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': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + '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 CorsSettings(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(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 CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2018_02_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2018_02_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(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2018_02_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(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 CsmPublishingProfileOptions(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.v2018_02_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(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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.get('target_slot', None) + self.preserve_vnet = kwargs.get('preserve_vnet', None) + + +class CsmUsageQuota(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 + :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.v2018_02_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 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: true if hostname is + already verified; otherwise, 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.v2018_02_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.v2018_02_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_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_cname_records = kwargs.get('alternate_cname_records', None) + self.alternate_txt_records = kwargs.get('alternate_txt_records', None) + + +class DatabaseBackupSetting(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.v2018_02_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.get('database_type', None) + 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 DataSource(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.v2018_02_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(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(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.v2018_02_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(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.v2018_02_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 DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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.v2018_02_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(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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_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.deleted_site_kind = None + self.geo_region_name = 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 + :param end_time: End time. + :type end_time: 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 DeploymentLocations(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.v2018_02_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironment] + :param hosting_environment_deployment_infos: Available App Service + Environments with basic information. + :type hosting_environment_deployment_infos: + list[~azure.mgmt.web.v2018_02_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(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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.v2018_02_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.v2018_02_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2018_02_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': 'IssueType'}, + '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(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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.v2018_02_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2018_02_01.models.DiagnosticData] + """ + + _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]'}, + } + + def __init__(self, **kwargs): + super(DetectorResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.dataset = kwargs.get('dataset', 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 + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2018_02_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2018_02_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.v2018_02_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 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 DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2018_02_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2018_02_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 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 + :param end_time: End time of the period + :type end_time: 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.v2018_02_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2018_02_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2018_02_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2018_02_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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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(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 + :param end_time: End time of the period + :type end_time: 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.v2018_02_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(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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2018_02_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.v2018_02_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.v2018_02_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2018_02_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2018_02_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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 DomainAvailablilityCheckResult(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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.v2018_02_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + def __init__(self, **kwargs): + super(DomainAvailablilityCheckResult, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.available = kwargs.get('available', None) + self.domain_type = kwargs.get('domain_type', None) + + +class DomainControlCenterSsoRequest(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 DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2018_02_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.v2018_02_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.v2018_02_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2018_02_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2018_02_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(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 + 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 + """ + + _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(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(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(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.v2018_02_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(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_accessable: Whether it is possible to create a TCP connection + from the App Service Environment to this IpAddress at this Port. + :type is_accessable: bool + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + 'is_accessable': {'key': 'isAccessable', '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_accessable = kwargs.get('is_accessable', None) + + +class ErrorEntity(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.v2018_02_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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2018_02_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 FileSystemApplicationLogsConfig(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2018_02_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, **kwargs): + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', "Off") + + +class FileSystemHttpLogsConfig(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 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: 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 FunctionSecrets(ProxyOnlyResource): + """Function secrets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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: Secret key. + :type key: str + :param trigger_url: Trigger URL. + :type trigger_url: 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'}, + 'key': {'key': 'properties.key', 'type': 'str'}, + 'trigger_url': {'key': 'properties.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 GeoDistribution(Model): + """A global distribution definition. + + :param location: Location. + :type location: str + :param number_of_workers: NumberOfWorkers. + :type number_of_workers: int + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GeoDistribution, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.number_of_workers = kwargs.get('number_of_workers', 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'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'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GeoRegion, self).__init__(**kwargs) + self.description = None + self.display_name = None + + +class GlobalCsmSkuDescription(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.v2018_02_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.v2018_02_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 HandlerMapping(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(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(Model): + """Diagnostics for an App Service Environment. + + :param name: Name/identifier of the diagnostics. + :type name: str + :param diagnosics_output: Diagnostics output. + :type diagnosics_output: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'diagnosics_output': {'key': 'diagnosicsOutput', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.diagnosics_output = kwargs.get('diagnosics_output', None) + + +class HostingEnvironmentProfile(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(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(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.v2018_02_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.v2018_02_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.v2018_02_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + 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.v2018_02_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.v2018_02_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2018_02_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2018_02_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + '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 HostNameSslState(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.v2018_02_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 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.v2018_02_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2018_02_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2018_02_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 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 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identifier, self).__init__(**kwargs) + self.identifier_id = kwargs.get('identifier_id', None) + + +class InboundEnvironmentEndpoint(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 IpSecurityRestriction(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' + :type tag: str or ~azure.mgmt.web.v2018_02_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 + """ + + _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': 'IpFilterTag'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', '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) + + +class KeyInfo(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 LocalizableString(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 LogSpecification(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 + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', '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) + + +class ManagedServiceIdentity(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.v2018_02_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.v2018_02_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _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': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailabilily(Model): + """Metric availability and retention. + + :param time_grain: Time grain. + :type time_grain: str + :param retention: Retention period for the current time grain. + :type retention: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricAvailabilily, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.retention = kwargs.get('retention', None) + + +class MetricAvailability(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 MetricDefinition(ProxyOnlyResource): + """Metadata for a metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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.v2018_02_01.models.MetricAvailabilily] + :ivar display_name: Friendly name shown in the UI. + :vartype display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'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'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, + 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.display_name = None + + +class MetricSpecification(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.v2018_02_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2018_02_01.models.MetricAvailability] + """ + + _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]'}, + } + + 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) + + +class MigrateMySqlRequest(ProxyOnlyResource): + """MySQL migration request. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2018_02_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + 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.v2018_02_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': 'OperationStatus'}, + '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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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.v2018_02_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(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2018_02_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': 'MSDeployLogEntryType'}, + '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.v2018_02_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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(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 NameValuePair(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 NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2018_02_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.description = kwargs.get('description', None) + self.order = kwargs.get('order', None) + self.remote_subnet = kwargs.get('remote_subnet', 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.v2018_02_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2018_02_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(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 Operation(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.v2018_02_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2018_02_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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(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.v2018_02_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 PerfMonResponse(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.v2018_02_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(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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(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 + :param end_time: End time of the period. + :type end_time: 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.v2018_02_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: 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: true if promotion code is + required; otherwise, 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.v2018_02_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': 'AppServicePlanRestrictions'}, + '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 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.v2018_02_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(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(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.v2018_02_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 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.v2018_02_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.v2018_02_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 + :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 + :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 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 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 + :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 priviledged_processor_time: Privileged processor time. + :type priviledged_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'}, + 'priviledged_processor_time': {'key': 'properties.priviledged_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.priviledged_processor_time = kwargs.get('priviledged_processor_time', None) + self.state = kwargs.get('state', None) + self.wait_reason = kwargs.get('wait_reason', 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.v2018_02_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': 'PublicCertificateLocation'}, + '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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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 + :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.v2018_02_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.v2018_02_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.v2018_02_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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 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.v2018_02_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.v2018_02_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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 Rendering(Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.v2018_02_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': 'RenderingType'}, + '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(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 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 ResourceMetric(Model): + """Object representing a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of metric. + :vartype name: ~azure.mgmt.web.v2018_02_01.models.ResourceMetricName + :ivar unit: Metric unit. + :vartype unit: str + :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D + :vartype time_grain: str + :ivar start_time: Metric start time. + :vartype start_time: datetime + :ivar end_time: Metric end time. + :vartype end_time: datetime + :ivar resource_id: Metric resource Id. + :vartype resource_id: str + :ivar id: Resource Id. + :vartype id: str + :ivar metric_values: Metric values. + :vartype metric_values: + list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricValue] + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricProperty] + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'id': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'ResourceMetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs): + super(ResourceMetric, self).__init__(**kwargs) + self.name = None + self.unit = None + self.time_grain = None + self.start_time = None + self.end_time = None + self.resource_id = None + self.id = None + self.metric_values = None + self.properties = None + + +class ResourceMetricAvailability(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.v2018_02_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 ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceMetricProperty(Model): + """Resource metric property. + + :param key: Key for resource metric property. + :type key: str + :param value: Value of pair. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricProperty, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + + +class ResourceMetricValue(Model): + """Value of resource metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Value timestamp. + :vartype timestamp: str + :ivar average: Value average. + :vartype average: float + :ivar minimum: Value minimum. + :vartype minimum: float + :ivar maximum: Value maximum. + :vartype maximum: float + :ivar total: Value total. + :vartype total: float + :ivar count: Value count. + :vartype count: float + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricProperty] + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'total': {'readonly': True}, + 'count': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'float'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs): + super(ResourceMetricValue, self).__init__(**kwargs) + self.timestamp = None + self.average = None + self.minimum = None + self.maximum = None + self.total = None + self.count = None + self.properties = None + + +class ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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.v2018_02_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(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.v2018_02_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.get('name', None) + self.type = kwargs.get('type', None) + self.is_fqdn = kwargs.get('is_fqdn', None) + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2018_02_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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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.v2018_02_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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.v2018_02_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + '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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2018_02_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: + list[~azure.mgmt.web.v2018_02_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: Resource tags. + :type tags: dict[str, str] + :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.v2018_02_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2018_02_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.v2018_02_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2018_02_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2018_02_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param client_cert_exclusion_paths: client certificate authentication + comma-separated exclusion paths + :type client_cert_exclusion_paths: str + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2018_02_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: true if the app is a default + container; otherwise, 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.v2018_02_01.models.SlotSwapStatus + :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.v2018_02_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 geo_distributions: GeoDistributions for this site + :type geo_distributions: + list[~azure.mgmt.web.v2018_02_01.models.GeoDistribution] + :param identity: + :type identity: ~azure.mgmt.web.v2018_02_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) + self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.geo_distributions = kwargs.get('geo_distributions', None) + self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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.v2018_02_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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' + :type default_provider: str or + ~azure.mgmt.web.v2018_02_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_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 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_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]'}, + 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, + 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, + 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, + 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, + 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, + 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, + 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, + 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, + 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, + 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, + 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', '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.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_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.google_client_id = kwargs.get('google_client_id', None) + self.google_client_secret = kwargs.get('google_client_secret', None) + self.google_oauth_scopes = kwargs.get('google_oauth_scopes', None) + self.facebook_app_id = kwargs.get('facebook_app_id', None) + self.facebook_app_secret = kwargs.get('facebook_app_secret', None) + self.facebook_oauth_scopes = kwargs.get('facebook_oauth_scopes', None) + self.twitter_consumer_key = kwargs.get('twitter_consumer_key', None) + self.twitter_consumer_secret = kwargs.get('twitter_consumer_secret', 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_oauth_scopes = kwargs.get('microsoft_account_oauth_scopes', None) + + +class SiteCloneability(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.v2018_02_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2018_02_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.v2018_02_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2018_02_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + '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(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(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. Default value: + "v4.6" . + :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 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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2018_02_01.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2018_02_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2018_02_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2018_02_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' + :type scm_type: str or ~azure.mgmt.web.v2018_02_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2018_02_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2018_02_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2018_02_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2018_02_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2018_02_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2018_02_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2018_02_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2018_02_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2018_02_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2018_02_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2018_02_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. Default value: True . + :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.v2018_02_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.v2018_02_01.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, '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'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'reservedInstanceCount', '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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.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.ftps_state = kwargs.get('ftps_state', None) + self.reserved_instance_count = kwargs.get('reserved_instance_count', 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. Default value: + "v4.6" . + :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 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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2018_02_01.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2018_02_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2018_02_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2018_02_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' + :type scm_type: str or ~azure.mgmt.web.v2018_02_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2018_02_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2018_02_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2018_02_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2018_02_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2018_02_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2018_02_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2018_02_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2018_02_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2018_02_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2018_02_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2018_02_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. Default value: True . + :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.v2018_02_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.v2018_02_01.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, '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'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, + 'push': {'key': 'properties.push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'properties.reservedInstanceCount', '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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.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.ftps_state = kwargs.get('ftps_state', None) + self.reserved_instance_count = kwargs.get('reserved_instance_count', 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 + :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 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.v2018_02_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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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': 'SiteExtensionType'}, + '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 SiteInstance(ProxyOnlyResource): + """Instance 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 site_instance_name: Name of instance. + :vartype site_instance_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'site_instance_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'}, + 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SiteInstance, self).__init__(**kwargs) + self.site_instance_name = None + + +class SiteLimits(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.v2018_02_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2018_02_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2018_02_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2018_02_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(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 + :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.v2018_02_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2018_02_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.v2018_02_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2018_02_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2018_02_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param client_cert_exclusion_paths: client certificate authentication + comma-separated exclusion paths + :type client_cert_exclusion_paths: str + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2018_02_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: true if the app is a default + container; otherwise, 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.v2018_02_01.models.SlotSwapStatus + :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.v2018_02_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 geo_distributions: GeoDistributions for this site + :type geo_distributions: + list[~azure.mgmt.web.v2018_02_01.models.GeoDistribution] + :param identity: + :type identity: ~azure.mgmt.web.v2018_02_01.models.ManagedServiceIdentity + """ + + _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'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(SitePatchResource, self).__init__(**kwargs) + 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) + self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.geo_distributions = kwargs.get('geo_distributions', None) + self.identity = kwargs.get('identity', 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(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.get('html', None) + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, + 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, + 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, + } + + 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.deployment_rollback_enabled = kwargs.get('deployment_rollback_enabled', None) + self.is_mercurial = kwargs.get('is_mercurial', None) + + +class SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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.v2018_02_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.v2018_02_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(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.v2018_02_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2018_02_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 SkuInfos(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.v2018_02_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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.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 SnapshotRecoverySource(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. + + 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 + :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.v2018_02_01.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': 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(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.v2018_02_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2018_02_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': 'SolutionType'}, + '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 + """ + + _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 StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2018_02_01.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: 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'}, + } + + 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) + + +class StackMinorVersion(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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(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.v2018_02_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'Default' + :type worker_size: str or + ~azure.mgmt.web.v2018_02_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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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 StatusCodesBasedTrigger(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 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'}, + '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.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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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 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(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.get('agreement_key', None) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) + self.url = kwargs.get('url', 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 true, then the top level domain supports + domain privacy; otherwise, 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(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + 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 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.v2018_02_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 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.v2018_02_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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': 'TriggeredWebJobStatus'}, + '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.v2018_02_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.v2018_02_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': 'WebJobType'}, + '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 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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2018_02_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': 'ComputeModeOptions'}, + '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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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 ValidateContainerSettingsRequest(Model): + """Container settings validation request context. + + :param base_url: Base URL of the container registry + :type base_url: str + :param username: Username for to access the container registry + :type username: str + :param password: Password for to access the container registry + :type password: str + :param repository: Repository name (image name) + :type repository: str + :param tag: Image tag + :type tag: str + :param platform: Platform (windows or linux) + :type platform: str + """ + + _attribute_map = { + 'base_url': {'key': 'baseUrl', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ValidateContainerSettingsRequest, self).__init__(**kwargs) + self.base_url = kwargs.get('base_url', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.repository = kwargs.get('repository', None) + self.tag = kwargs.get('tag', None) + self.platform = kwargs.get('platform', None) + + +class ValidateRequest(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' + :type type: str or + ~azure.mgmt.web.v2018_02_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: true if App Service plan is running as a + windows container + :type is_xenon: bool + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ValidateRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + 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) + + +class ValidateResponse(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.v2018_02_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(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(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2018_02_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(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(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 + """ + + _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'}, + } + + 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) + + +class VirtualNetworkProfile(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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.get('id', None) + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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.v2018_02_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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'}, + } + + 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) + + +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.v2018_02_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 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.v2018_02_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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, **kwargs): + super(VnetValidationFailureDetails, self).__init__(**kwargs) + self.failed = kwargs.get('failed', None) + self.failed_tests = kwargs.get('failed_tests', 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(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.v2018_02_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.get('value', None) + 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.v2018_02_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': 'WebJobType'}, + '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 WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.v2018_02_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 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.v2018_02_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] + :param sku: + :type sku: ~azure.mgmt.web.v2018_02_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(WorkerPoolResource, self).__init__(**kwargs) + 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 + self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models_py3.py new file mode 100644 index 00000000000..fd7a60480c3 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models_py3.py @@ -0,0 +1,12295 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2018_02_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2018_02_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: + super(AbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.events = events + self.solutions = solutions + + +class Address(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: str=None, **kwargs) -> None: + 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 AddressResponse(Model): + """Describes main public IP address and any extra virtual IPs. + + :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.v2018_02_01.models.VirtualIPMapping] + """ + + _attribute_map = { + 'service_ip_address': {'key': 'serviceIpAddress', 'type': 'str'}, + 'internal_ip_address': {'key': 'internalIpAddress', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'outboundIpAddresses', 'type': '[str]'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + } + + def __init__(self, *, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: + super(AddressResponse, self).__init__(**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 AnalysisData(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.v2018_02_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2018_02_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2018_02_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: + 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 ProxyOnlyResource(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: str=None, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = 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, *, kind: str=None, **kwargs) -> None: + super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) + self.description = None + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2018_02_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2018_02_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2018_02_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: + 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(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.v2018_02_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2018_02_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]'}, + } + + def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: + super(ApplicationStack, self).__init__(**kwargs) + self.name = name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + + +class AppServiceCertificate(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.v2018_02_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2018_02_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2018_02_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2018_02_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.v2018_02_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2018_02_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, location: str, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2018_02_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2018_02_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2018_02_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.v2018_02_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2018_02_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 + + +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.v2018_02_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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: 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.v2018_02_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2018_02_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2018_02_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) + self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2018_02_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_environment_resource_name = app_service_environment_resource_name + self.app_service_environment_resource_location = app_service_environment_resource_location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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: Resource tags. + :type tags: dict[str, 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.v2018_02_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.v2018_02_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2018_02_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2018_02_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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.sku = sku + + +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.v2018_02_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.v2018_02_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2018_02_01.models.ProvisioningState + """ + + _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': 'StatusOptions'}, + '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': 'ProvisioningState'}, + } + + def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: + 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 + + +class AutoHealActions(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.v2018_02_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2018_02_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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.v2018_02_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2018_02_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2018_02_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +class AzureBlobStorageApplicationLogsConfig(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.v2018_02_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + } + + def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: + super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + self.retention_in_days = retention_in_days + + +class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) + self.sas_url = sas_url + self.retention_in_days = retention_in_days + self.enabled = enabled + + +class AzureStorageInfoValue(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.v2018_02_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' + :vartype state: str or + ~azure.mgmt.web.v2018_02_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: + 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.v2018_02_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: str=None, properties=None, **kwargs) -> None: + super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class AzureTableStorageApplicationLogsConfig(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.v2018_02_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: + 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 backup_item_name: Name of this backup. + :vartype backup_item_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.v2018_02_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 + :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.v2018_02_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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: str=None, **kwargs) -> None: + super(BackupItem, self).__init__(kind=kind, **kwargs) + self.backup_id = None + self.storage_account_url = None + self.blob_name = None + self.backup_item_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 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. + + 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 + :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: Required. 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.v2018_02_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2018_02_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account_url': {'required': 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, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: + 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(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). Default value: 7 . + :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.v2018_02_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: + 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 + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: + 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 + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + 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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2018_02_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.v2018_02_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + } + + def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: + 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 + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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) -> None: + 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 + """ + + _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: + 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.v2018_02_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: 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': 'CertificateOrderActionType'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) + self.action_type = None + self.created_at = None + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2018_02_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.v2018_02_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + } + + def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: + 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 + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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.v2018_02_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: str=None, properties=None, **kwargs) -> None: + super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class ConnStringInfo(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.v2018_02_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class ConnStringValueTypePair(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.v2018_02_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, value: str, type, **kwargs) -> None: + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = value + self.type = type + + +class Contact(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.v2018_02_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: + 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 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.v2018_02_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.v2018_02_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': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.support_credentials = support_credentials + + +class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: + super(CsmMoveResourceEnvelope, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2018_02_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2018_02_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2018_02_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(CsmOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class CsmPublishingProfileOptions(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.v2018_02_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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = format + self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints + + +class CsmSlotEntity(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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) -> None: + super(CsmSlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.preserve_vnet = preserve_vnet + + +class CsmUsageQuota(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 + :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.v2018_02_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + 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 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: true if hostname is + already verified; otherwise, 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.v2018_02_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.v2018_02_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, + 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: + 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_cname_records = alternate_cname_records + self.alternate_txt_records = alternate_txt_records + + +class DatabaseBackupSetting(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.v2018_02_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: + 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 DataSource(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.v2018_02_01.models.NameValuePair] + """ + + _attribute_map = { + 'instructions': {'key': 'instructions', 'type': '[str]'}, + 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, + } + + def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: + super(DataSource, self).__init__(**kwargs) + self.instructions = instructions + self.data_source_uri = data_source_uri + + +class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: + super(DataTableResponseColumn, self).__init__(**kwargs) + self.column_name = column_name + self.data_type = data_type + self.column_type = column_type + + +class DataTableResponseObject(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.v2018_02_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: str=None, columns=None, rows=None, **kwargs) -> None: + super(DataTableResponseObject, self).__init__(**kwargs) + self.table_name = table_name + self.columns = columns + self.rows = rows + + +class DefaultErrorResponse(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.v2018_02_01.models.DefaultErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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.v2018_02_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=None, **kwargs) -> None: + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(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) -> None: + 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: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: + 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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, + 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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.deleted_site_kind = None + self.geo_region_name = 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 + :param end_time: End time. + :type end_time: 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: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: + 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 DeploymentLocations(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.v2018_02_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironment] + :param hosting_environment_deployment_infos: Available App Service + Environments with basic information. + :type hosting_environment_deployment_infos: + list[~azure.mgmt.web.v2018_02_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: + super(DeploymentLocations, self).__init__(**kwargs) + self.locations = locations + self.hosting_environments = hosting_environments + self.hosting_environment_deployment_infos = hosting_environment_deployment_infos + + +class DetectorAbnormalTimePeriod(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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.v2018_02_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.v2018_02_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2018_02_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': 'IssueType'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(DetectorDefinition, self).__init__(kind=kind, **kwargs) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None + + +class DetectorInfo(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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.v2018_02_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2018_02_01.models.DiagnosticData] + """ + + _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]'}, + } + + def __init__(self, *, kind: str=None, metadata=None, dataset=None, **kwargs) -> None: + super(DetectorResponse, self).__init__(kind=kind, **kwargs) + self.metadata = metadata + self.dataset = dataset + + +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 + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2018_02_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2018_02_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.v2018_02_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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) + self.description = None + + +class DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2018_02_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2018_02_01.models.Rendering + """ + + _attribute_map = { + 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, + 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, + } + + def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: + super(DiagnosticData, self).__init__(**kwargs) + self.table = table + self.rendering_properties = rendering_properties + + +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 + :param end_time: End time of the period + :type end_time: 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.v2018_02_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2018_02_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2018_02_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2018_02_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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: + 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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: + 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(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 + :param end_time: End time of the period + :type end_time: 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.v2018_02_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2018_02_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.v2018_02_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.v2018_02_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2018_02_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2018_02_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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 DomainAvailablilityCheckResult(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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.v2018_02_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: + super(DomainAvailablilityCheckResult, self).__init__(**kwargs) + self.name = name + self.available = available + self.domain_type = domain_type + + +class DomainControlCenterSsoRequest(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) -> None: + 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: str=None, ownership_id: str=None, **kwargs) -> None: + super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) + self.ownership_id = ownership_id + + +class DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2018_02_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2018_02_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.v2018_02_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.v2018_02_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2018_02_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2018_02_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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(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 + 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 + """ + + _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: + super(DomainPurchaseConsent, self).__init__(**kwargs) + self.agreement_keys = agreement_keys + self.agreed_by = agreed_by + self.agreed_at = agreed_at + + +class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: + super(DomainRecommendationSearchParameters, self).__init__(**kwargs) + self.keywords = keywords + self.max_domain_recommendations = max_domain_recommendations + + +class EnabledConfig(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: bool=None, **kwargs) -> None: + super(EnabledConfig, self).__init__(**kwargs) + self.enabled = enabled + + +class EndpointDependency(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.v2018_02_01.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(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_accessable: Whether it is possible to create a TCP connection + from the App Service Environment to this IpAddress at this Port. + :type is_accessable: bool + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + 'is_accessable': {'key': 'isAccessable', 'type': 'bool'}, + } + + def __init__(self, *, ip_address: str=None, port: int=None, latency: float=None, is_accessable: bool=None, **kwargs) -> None: + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.latency = latency + self.is_accessable = is_accessable + + +class ErrorEntity(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.v2018_02_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: + 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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2018_02_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class FileSystemApplicationLogsConfig(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2018_02_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, *, level="Off", **kwargs) -> None: + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + + +class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + super(FileSystemHttpLogsConfig, self).__init__(**kwargs) + self.retention_in_mb = retention_in_mb + self.retention_in_days = retention_in_days + self.enabled = enabled + + +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: 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: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: + 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 FunctionSecrets(ProxyOnlyResource): + """Function secrets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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: Secret key. + :type key: str + :param trigger_url: Trigger URL. + :type trigger_url: 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'}, + 'key': {'key': 'properties.key', 'type': 'str'}, + 'trigger_url': {'key': 'properties.trigger_url', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, key: str=None, trigger_url: str=None, **kwargs) -> None: + super(FunctionSecrets, self).__init__(kind=kind, **kwargs) + self.key = key + self.trigger_url = trigger_url + + +class GeoDistribution(Model): + """A global distribution definition. + + :param location: Location. + :type location: str + :param number_of_workers: NumberOfWorkers. + :type number_of_workers: int + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, number_of_workers: int=None, **kwargs) -> None: + super(GeoDistribution, self).__init__(**kwargs) + self.location = location + self.number_of_workers = number_of_workers + + +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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'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'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(GeoRegion, self).__init__(kind=kind, **kwargs) + self.description = None + self.display_name = None + + +class GlobalCsmSkuDescription(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.v2018_02_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.v2018_02_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: + super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) + self.name = name + self.location = location + + +class HostingEnvironmentDiagnostics(Model): + """Diagnostics for an App Service Environment. + + :param name: Name/identifier of the diagnostics. + :type name: str + :param diagnosics_output: Diagnostics output. + :type diagnosics_output: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'diagnosics_output': {'key': 'diagnosicsOutput', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, diagnosics_output: str=None, **kwargs) -> None: + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = name + self.diagnosics_output = diagnosics_output + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: + super(HostKeys, self).__init__(**kwargs) + self.master_key = master_key + self.function_keys = function_keys + self.system_keys = system_keys + + +class HostName(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.v2018_02_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.v2018_02_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.v2018_02_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: + 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.v2018_02_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.v2018_02_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2018_02_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2018_02_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: + 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 HostNameSslState(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.v2018_02_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 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.v2018_02_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2018_02_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2018_02_01.models.AzureBlobStorageHttpLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, + } + + def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: + super(HttpLogsConfig, self).__init__(**kwargs) + self.file_system = file_system + self.azure_blob_storage = azure_blob_storage + + +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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.identifier_id = identifier_id + + +class InboundEnvironmentEndpoint(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: str=None, endpoints=None, ports=None, **kwargs) -> None: + super(InboundEnvironmentEndpoint, self).__init__(**kwargs) + self.description = description + self.endpoints = endpoints + self.ports = ports + + +class IpSecurityRestriction(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' + :type tag: str or ~azure.mgmt.web.v2018_02_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 + """ + + _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': 'IpFilterTag'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, **kwargs) -> None: + 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 + + +class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: + super(KeyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class LogSpecification(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 + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class ManagedServiceIdentity(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.v2018_02_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.v2018_02_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _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': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = user_assigned_identities + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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) -> None: + super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailabilily(Model): + """Metric availability and retention. + + :param time_grain: Time grain. + :type time_grain: str + :param retention: Retention period for the current time grain. + :type retention: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + } + + def __init__(self, *, time_grain: str=None, retention: str=None, **kwargs) -> None: + super(MetricAvailabilily, self).__init__(**kwargs) + self.time_grain = time_grain + self.retention = retention + + +class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricDefinition(ProxyOnlyResource): + """Metadata for a metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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.v2018_02_01.models.MetricAvailabilily] + :ivar display_name: Friendly name shown in the UI. + :vartype display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'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'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, + 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(MetricDefinition, self).__init__(kind=kind, **kwargs) + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.display_name = None + + +class MetricSpecification(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.v2018_02_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2018_02_01.models.MetricAvailability] + """ + + _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]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, **kwargs) -> None: + 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 + + +class MigrateMySqlRequest(ProxyOnlyResource): + """MySQL migration request. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2018_02_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: + 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.v2018_02_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': 'OperationStatus'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: + 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.v2018_02_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: str=None, **kwargs) -> None: + super(MSDeployLog, self).__init__(kind=kind, **kwargs) + self.entries = None + + +class MSDeployLogEntry(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2018_02_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': 'MSDeployLogEntryType'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + 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.v2018_02_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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: str=None, **kwargs) -> None: + 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(Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2018_02_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = action + self.description = description + self.order = order + self.remote_subnet = remote_subnet + + +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.v2018_02_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2018_02_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: str=None, **kwargs) -> None: + 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(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: str=None, status: str=None, message: str=None, **kwargs) -> None: + super(NetworkTrace, self).__init__(**kwargs) + self.path = path + self.status = status + self.message = message + + +class Operation(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.v2018_02_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2018_02_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: + 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(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.v2018_02_01.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class PerfMonResponse(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.v2018_02_01.models.PerfMonSet + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'PerfMonSet'}, + } + + def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: + super(PerfMonResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.data = data + + +class PerfMonSample(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: + super(PerfMonSample, self).__init__(**kwargs) + self.time = time + self.instance_name = instance_name + self.value = value + + +class PerfMonSet(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 + :param end_time: End time of the period. + :type end_time: 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.v2018_02_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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: 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: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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: true if promotion code is + required; otherwise, 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.v2018_02_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': 'AppServicePlanRestrictions'}, + '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: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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 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: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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.v2018_02_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: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: + super(PrivateAccess, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.virtual_networks = virtual_networks + + +class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = name + self.key = key + + +class PrivateAccessVirtualNetwork(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.v2018_02_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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = name + self.key = key + self.resource_id = resource_id + self.subnets = subnets + + +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.v2018_02_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.v2018_02_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 + :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 + :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: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: + 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 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: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: + 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 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 + :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 priviledged_processor_time: Privileged processor time. + :type priviledged_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'}, + 'priviledged_processor_time': {'key': 'properties.priviledged_processor_time', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'wait_reason': {'key': 'properties.wait_reason', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, priviledged_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: + 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.priviledged_processor_time = priviledged_processor_time + self.state = state + self.wait_reason = wait_reason + + +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.v2018_02_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': 'PublicCertificateLocation'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: + super(PublicCertificate, self).__init__(kind=kind, **kwargs) + self.blob = blob + self.public_certificate_location = public_certificate_location + self.thumbprint = None + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 + :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.v2018_02_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.v2018_02_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.v2018_02_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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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 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.v2018_02_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.v2018_02_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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: + 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 Rendering(Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.v2018_02_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': 'RenderingType'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: + 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: + super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) + self.category = category + self.signal_availability = signal_availability + + +class ResourceMetric(Model): + """Object representing a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of metric. + :vartype name: ~azure.mgmt.web.v2018_02_01.models.ResourceMetricName + :ivar unit: Metric unit. + :vartype unit: str + :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D + :vartype time_grain: str + :ivar start_time: Metric start time. + :vartype start_time: datetime + :ivar end_time: Metric end time. + :vartype end_time: datetime + :ivar resource_id: Metric resource Id. + :vartype resource_id: str + :ivar id: Resource Id. + :vartype id: str + :ivar metric_values: Metric values. + :vartype metric_values: + list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricValue] + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricProperty] + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'id': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'ResourceMetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetric, self).__init__(**kwargs) + self.name = None + self.unit = None + self.time_grain = None + self.start_time = None + self.end_time = None + self.resource_id = None + self.id = None + self.metric_values = None + self.properties = None + + +class ResourceMetricAvailability(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) -> None: + 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.v2018_02_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: str=None, **kwargs) -> None: + 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 ResourceMetricName(Model): + """Name of a metric for any resource . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: metric name value. + :vartype value: str + :ivar localized_value: Localized metric name value. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceMetricProperty(Model): + """Resource metric property. + + :param key: Key for resource metric property. + :type key: str + :param value: Value of pair. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + super(ResourceMetricProperty, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ResourceMetricValue(Model): + """Value of resource metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Value timestamp. + :vartype timestamp: str + :ivar average: Value average. + :vartype average: float + :ivar minimum: Value minimum. + :vartype minimum: float + :ivar maximum: Value maximum. + :vartype maximum: float + :ivar total: Value total. + :vartype total: float + :ivar count: Value count. + :vartype count: float + :ivar properties: Resource metric properties collection. + :vartype properties: + list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricProperty] + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'total': {'readonly': True}, + 'count': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'float'}, + 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceMetricValue, self).__init__(**kwargs) + self.timestamp = None + self.average = None + self.minimum = None + self.maximum = None + self.total = None + self.count = None + self.properties = None + + +class ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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.v2018_02_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: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(ResourceNameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class ResourceNameAvailabilityRequest(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.v2018_02_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, is_fqdn: bool=None, **kwargs) -> None: + super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.is_fqdn = is_fqdn + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2018_02_01.models.DataSource + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, + } + + def __init__(self, *, data_source=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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.v2018_02_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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.v2018_02_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + } + + def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: + 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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2018_02_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: + list[~azure.mgmt.web.v2018_02_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :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.v2018_02_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2018_02_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.v2018_02_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2018_02_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2018_02_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param client_cert_exclusion_paths: client certificate authentication + comma-separated exclusion paths + :type client_cert_exclusion_paths: str + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2018_02_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: true if the app is a default + container; otherwise, 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.v2018_02_01.models.SlotSwapStatus + :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.v2018_02_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 geo_distributions: GeoDistributions for this site + :type geo_distributions: + list[~azure.mgmt.web.v2018_02_01.models.GeoDistribution] + :param identity: + :type identity: ~azure.mgmt.web.v2018_02_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, geo_distributions=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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_exclusion_paths = client_cert_exclusion_paths + self.host_names_disabled = host_names_disabled + 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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.geo_distributions = geo_distributions + self.identity = identity + + +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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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.v2018_02_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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' + :type default_provider: str or + ~azure.mgmt.web.v2018_02_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_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 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_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]'}, + 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, + 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, + 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, + 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, + 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, + 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, + 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, + 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, + 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, + 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, + 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, google_client_id: str=None, google_client_secret: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_oauth_scopes=None, **kwargs) -> None: + super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_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_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.google_client_id = google_client_id + self.google_client_secret = google_client_secret + self.google_oauth_scopes = google_oauth_scopes + self.facebook_app_id = facebook_app_id + self.facebook_app_secret = facebook_app_secret + self.facebook_oauth_scopes = facebook_oauth_scopes + self.twitter_consumer_key = twitter_consumer_key + self.twitter_consumer_secret = twitter_consumer_secret + self.microsoft_account_client_id = microsoft_account_client_id + self.microsoft_account_client_secret = microsoft_account_client_secret + self.microsoft_account_oauth_scopes = microsoft_account_oauth_scopes + + +class SiteCloneability(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.v2018_02_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2018_02_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.v2018_02_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2018_02_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, + } + + def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: + 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(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: str=None, description: str=None, **kwargs) -> None: + super(SiteCloneabilityCriterion, self).__init__(**kwargs) + self.name = name + self.description = description + + +class SiteConfig(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. Default value: + "v4.6" . + :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 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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2018_02_01.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2018_02_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2018_02_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2018_02_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' + :type scm_type: str or ~azure.mgmt.web.v2018_02_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2018_02_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2018_02_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2018_02_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2018_02_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2018_02_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2018_02_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2018_02_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2018_02_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2018_02_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2018_02_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2018_02_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. Default value: True . + :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.v2018_02_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.v2018_02_01.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, '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'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'reservedInstanceCount', 'type': 'int'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: + 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.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.cors = cors + self.push = push + self.api_definition = api_definition + 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.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.ftps_state = ftps_state + self.reserved_instance_count = reserved_instance_count + + +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. Default value: + "v4.6" . + :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 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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2018_02_01.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2018_02_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2018_02_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2018_02_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' + :type scm_type: str or ~azure.mgmt.web.v2018_02_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2018_02_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2018_02_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2018_02_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2018_02_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2018_02_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2018_02_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2018_02_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2018_02_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2018_02_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2018_02_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2018_02_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. Default value: True . + :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.v2018_02_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.v2018_02_01.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, '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'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, + 'push': {'key': 'properties.push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'properties.reservedInstanceCount', 'type': 'int'}, + } + + def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: + 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.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.cors = cors + self.push = push + self.api_definition = api_definition + 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.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.ftps_state = ftps_state + self.reserved_instance_count = reserved_instance_count + + +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 + :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: str=None, **kwargs) -> None: + super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) + self.time = None + self.snapshot_id = 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.v2018_02_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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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': 'SiteExtensionType'}, + '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: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: + 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 SiteInstance(ProxyOnlyResource): + """Instance 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 site_instance_name: Name of instance. + :vartype site_instance_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'site_instance_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'}, + 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(SiteInstance, self).__init__(kind=kind, **kwargs) + self.site_instance_name = None + + +class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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.v2018_02_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2018_02_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2018_02_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2018_02_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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: + 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + 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 + :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.v2018_02_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2018_02_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.v2018_02_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2018_02_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2018_02_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param client_cert_exclusion_paths: client certificate authentication + comma-separated exclusion paths + :type client_cert_exclusion_paths: str + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2018_02_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: true if the app is a default + container; otherwise, 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.v2018_02_01.models.SlotSwapStatus + :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.v2018_02_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 geo_distributions: GeoDistributions for this site + :type geo_distributions: + list[~azure.mgmt.web.v2018_02_01.models.GeoDistribution] + :param identity: + :type identity: ~azure.mgmt.web.v2018_02_01.models.ManagedServiceIdentity + """ + + _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'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, geo_distributions=None, identity=None, **kwargs) -> None: + super(SitePatchResource, self).__init__(kind=kind, **kwargs) + 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_exclusion_paths = client_cert_exclusion_paths + self.host_names_disabled = host_names_disabled + 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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.geo_distributions = geo_distributions + self.identity = identity + + +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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: + 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(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) -> None: + super(SiteSeal, self).__init__(**kwargs) + self.html = html + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: + 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, + 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, + 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: + super(SiteSourceControl, self).__init__(kind=kind, **kwargs) + self.repo_url = repo_url + self.branch = branch + self.is_manual_integration = is_manual_integration + self.deployment_rollback_enabled = deployment_rollback_enabled + self.is_mercurial = is_mercurial + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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.v2018_02_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.v2018_02_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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(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.v2018_02_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2018_02_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: str=None, sku=None, capacity=None, **kwargs) -> None: + super(SkuInfo, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity + + +class SkuInfos(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.v2018_02_01.models.GlobalCsmSkuDescription] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, + } + + def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: + 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: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + 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: str=None, **kwargs) -> None: + super(Snapshot, self).__init__(kind=kind, **kwargs) + self.time = None + + +class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: + 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. + + 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 + :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.v2018_02_01.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': 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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: + 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(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.v2018_02_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2018_02_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': 'SolutionType'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: + 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 + """ + + _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: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: + 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 StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2018_02_01.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: 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'}, + } + + def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, **kwargs) -> None: + 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 + + +class StackMinorVersion(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: + 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(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.v2018_02_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'Default' + :type worker_size: str or + ~azure.mgmt.web.v2018_02_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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: + 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 StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, properties=None, **kwargs) -> None: + super(StringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +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: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: + super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) + self.subnet_resource_id = subnet_resource_id + self.swift_supported = swift_supported + + +class TldLegalAgreement(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: str=None, **kwargs) -> None: + super(TldLegalAgreement, self).__init__(**kwargs) + self.agreement_key = agreement_key + self.title = title + self.content = content + self.url = url + + +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 true, then the top level domain supports + domain privacy; otherwise, 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: str=None, privacy: bool=None, **kwargs) -> None: + super(TopLevelDomain, self).__init__(kind=kind, **kwargs) + self.privacy = privacy + + +class TopLevelDomainAgreementOption(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + """ + + _attribute_map = { + 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, + 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, + } + + def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: + super(TopLevelDomainAgreementOption, self).__init__(**kwargs) + self.include_privacy = include_privacy + self.for_transfer = for_transfer + + +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.v2018_02_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: str=None, runs=None, **kwargs) -> None: + super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) + self.runs = runs + + +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.v2018_02_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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': 'TriggeredWebJobStatus'}, + '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: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: + 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.v2018_02_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.v2018_02_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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2018_02_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': 'ComputeModeOptions'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: + 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 ValidateContainerSettingsRequest(Model): + """Container settings validation request context. + + :param base_url: Base URL of the container registry + :type base_url: str + :param username: Username for to access the container registry + :type username: str + :param password: Password for to access the container registry + :type password: str + :param repository: Repository name (image name) + :type repository: str + :param tag: Image tag + :type tag: str + :param platform: Platform (windows or linux) + :type platform: str + """ + + _attribute_map = { + 'base_url': {'key': 'baseUrl', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + } + + def __init__(self, *, base_url: str=None, username: str=None, password: str=None, repository: str=None, tag: str=None, platform: str=None, **kwargs) -> None: + super(ValidateContainerSettingsRequest, self).__init__(**kwargs) + self.base_url = base_url + self.username = username + self.password = password + self.repository = repository + self.tag = tag + self.platform = platform + + +class ValidateRequest(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' + :type type: str or + ~azure.mgmt.web.v2018_02_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: true if App Service plan is running as a + windows container + :type is_xenon: bool + """ + + _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'}, + } + + def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, **kwargs) -> None: + 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 + + +class ValidateResponse(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.v2018_02_01.models.ValidateResponseError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ValidateResponseError'}, + } + + def __init__(self, *, status: str=None, error=None, **kwargs) -> None: + super(ValidateResponse, self).__init__(**kwargs) + self.status = status + self.error = error + + +class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: + super(ValidateResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2018_02_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +class VirtualIPMapping(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 + """ + + _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'}, + } + + def __init__(self, *, virtual_ip: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, **kwargs) -> None: + 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 + + +class VirtualNetworkProfile(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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=None, subnet: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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.v2018_02_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: + 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 + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: + 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 + + +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.v2018_02_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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + 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 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.v2018_02_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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, *, kind: str=None, failed: bool=None, failed_tests=None, **kwargs) -> None: + super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) + self.failed = failed + self.failed_tests = failed_tests + + +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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: + super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) + self.test_name = test_name + self.details = details + + +class WebAppCollection(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.v2018_02_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, **kwargs) -> None: + super(WebAppCollection, 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.v2018_02_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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.v2018_02_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 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.v2018_02_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] + :param sku: + :type sku: ~azure.mgmt.web.v2018_02_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: + super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) + 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 + self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_paged_models.py new file mode 100644 index 00000000000..908d8095c47 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_paged_models.py @@ -0,0 +1,729 @@ +# 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 msrest.paging import Paged + + +class AppServiceCertificateOrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) +class AppServiceCertificateResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) +class CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) +class DomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`Domain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Domain]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainPaged, self).__init__(*args, **kwargs) +class NameIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`NameIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(NameIdentifierPaged, self).__init__(*args, **kwargs) +class DomainOwnershipIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) +class TopLevelDomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`TopLevelDomain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} + } + + def __init__(self, *args, **kwargs): + + super(TopLevelDomainPaged, self).__init__(*args, **kwargs) +class TldLegalAgreementPaged(Paged): + """ + A paging container for iterating over a list of :class:`TldLegalAgreement ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} + } + + def __init__(self, *args, **kwargs): + + super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) +class CertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`Certificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Certificate]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificatePaged, self).__init__(*args, **kwargs) +class DeletedSitePaged(Paged): + """ + A paging container for iterating over a list of :class:`DeletedSite ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeletedSite]'} + } + + def __init__(self, *args, **kwargs): + + super(DeletedSitePaged, self).__init__(*args, **kwargs) +class DetectorResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorResponsePaged, self).__init__(*args, **kwargs) +class DiagnosticCategoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiagnosticCategory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} + } + + def __init__(self, *args, **kwargs): + + super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) +class AnalysisDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AnalysisDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) +class DetectorDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) +class ApplicationStackPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationStack ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationStack]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationStackPaged, self).__init__(*args, **kwargs) +class RecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Recommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Recommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendationPaged, self).__init__(*args, **kwargs) +class SourceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlPaged, self).__init__(*args, **kwargs) +class BillingMeterPaged(Paged): + """ + A paging container for iterating over a list of :class:`BillingMeter ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BillingMeter]'} + } + + def __init__(self, *args, **kwargs): + + super(BillingMeterPaged, self).__init__(*args, **kwargs) +class GeoRegionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoRegion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoRegion]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoRegionPaged, self).__init__(*args, **kwargs) +class IdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`Identifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Identifier]'} + } + + def __init__(self, *args, **kwargs): + + super(IdentifierPaged, self).__init__(*args, **kwargs) +class PremierAddOnOfferPaged(Paged): + """ + A paging container for iterating over a list of :class:`PremierAddOnOffer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} + } + + def __init__(self, *args, **kwargs): + + super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) +class SitePaged(Paged): + """ + A paging container for iterating over a list of :class:`Site ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Site]'} + } + + def __init__(self, *args, **kwargs): + + super(SitePaged, self).__init__(*args, **kwargs) +class BackupItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupItem]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupItemPaged, self).__init__(*args, **kwargs) +class SiteConfigResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) +class SiteConfigurationSnapshotInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) +class ContinuousWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContinuousWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) +class DeploymentPaged(Paged): + """ + A paging container for iterating over a list of :class:`Deployment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Deployment]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentPaged, self).__init__(*args, **kwargs) +class FunctionEnvelopePaged(Paged): + """ + A paging container for iterating over a list of :class:`FunctionEnvelope ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} + } + + def __init__(self, *args, **kwargs): + + super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) +class HostNameBindingPaged(Paged): + """ + A paging container for iterating over a list of :class:`HostNameBinding ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} + } + + def __init__(self, *args, **kwargs): + + super(HostNameBindingPaged, self).__init__(*args, **kwargs) +class SiteInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteInstancePaged, self).__init__(*args, **kwargs) +class ProcessInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessInfoPaged, self).__init__(*args, **kwargs) +class ProcessModuleInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessModuleInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) +class ProcessThreadInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessThreadInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) +class ResourceMetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) +class ResourceMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricPaged, self).__init__(*args, **kwargs) +class PerfMonResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`PerfMonResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(PerfMonResponsePaged, self).__init__(*args, **kwargs) +class PublicCertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`PublicCertificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} + } + + def __init__(self, *args, **kwargs): + + super(PublicCertificatePaged, self).__init__(*args, **kwargs) +class SiteExtensionInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteExtensionInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) +class SlotDifferencePaged(Paged): + """ + A paging container for iterating over a list of :class:`SlotDifference ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SlotDifference]'} + } + + def __init__(self, *args, **kwargs): + + super(SlotDifferencePaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) +class TriggeredWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) +class TriggeredJobHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredJobHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) +class CsmUsageQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmUsageQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) +class WebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(WebJobPaged, self).__init__(*args, **kwargs) +class AppServiceEnvironmentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) +class StampCapacityPaged(Paged): + """ + A paging container for iterating over a list of :class:`StampCapacity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StampCapacity]'} + } + + def __init__(self, *args, **kwargs): + + super(StampCapacityPaged, self).__init__(*args, **kwargs) +class InboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class WorkerPoolResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkerPoolResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) +class SkuInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInfoPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class OutboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class AppServicePlanPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServicePlan ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServicePlanPaged, self).__init__(*args, **kwargs) +class StrPaged(Paged): + """ + A paging container for iterating over a list of str object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[str]'} + } + + def __init__(self, *args, **kwargs): + + super(StrPaged, self).__init__(*args, **kwargs) +class HybridConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`HybridConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HybridConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(HybridConnectionPaged, self).__init__(*args, **kwargs) +class ResourceHealthMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..a4db9855c59 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_web_site_management_client_enums.py @@ -0,0 +1,559 @@ +# 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 + + +class KeyVaultSecretStatus(str, Enum): + + 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 CertificateProductType(str, Enum): + + standard_domain_validated_ssl = "StandardDomainValidatedSsl" + standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class CertificateOrderStatus(str, Enum): + + pendingissuance = "Pendingissuance" + issued = "Issued" + revoked = "Revoked" + canceled = "Canceled" + denied = "Denied" + pendingrevocation = "Pendingrevocation" + pending_rekey = "PendingRekey" + unused = "Unused" + expired = "Expired" + not_submitted = "NotSubmitted" + + +class CertificateOrderActionType(str, Enum): + + 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 RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" + + +class IpFilterTag(str, Enum): + + default = "Default" + xff_proxy = "XffProxy" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 AzureStorageType(str, Enum): + + azure_files = "AzureFiles" + azure_blob = "AzureBlob" + + +class AzureStorageState(str, Enum): + + ok = "Ok" + invalid_credentials = "InvalidCredentials" + invalid_share = "InvalidShare" + + +class ScmType(str, Enum): + + 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" + + +class ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class FtpsState(str, Enum): + + all_allowed = "AllAllowed" + ftps_only = "FtpsOnly" + disabled = "Disabled" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class RedundancyMode(str, Enum): + + none = "None" + manual = "Manual" + failover = "Failover" + active_active = "ActiveActive" + geo_redundant = "GeoRedundant" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class DomainStatus(str, Enum): + + 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 AzureResourceType(str, Enum): + + website = "Website" + traffic_manager = "TrafficManager" + + +class CustomHostNameDnsRecordType(str, Enum): + + cname = "CName" + a = "A" + + +class HostNameType(str, Enum): + + verified = "Verified" + managed = "Managed" + + +class DnsType(str, Enum): + + azure_dns = "AzureDns" + default_domain_registrar_dns = "DefaultDomainRegistrarDns" + + +class DomainType(str, Enum): + + regular = "Regular" + soft_deleted = "SoftDeleted" + + +class HostingEnvironmentStatus(str, Enum): + + preparing = "Preparing" + ready = "Ready" + scaling = "Scaling" + deleting = "Deleting" + + +class InternalLoadBalancingMode(str, Enum): + + none = "None" + web = "Web" + publishing = "Publishing" + + +class ComputeModeOptions(str, Enum): + + shared = "Shared" + dedicated = "Dedicated" + dynamic = "Dynamic" + + +class WorkerSizeOptions(str, Enum): + + small = "Small" + medium = "Medium" + large = "Large" + d1 = "D1" + d2 = "D2" + d3 = "D3" + default = "Default" + + +class AccessControlEntryAction(str, Enum): + + permit = "Permit" + deny = "Deny" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" + + +class IssueType(str, Enum): + + 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 SolutionType(str, Enum): + + quick_solution = "QuickSolution" + deep_investigation = "DeepInvestigation" + best_practices = "BestPractices" + + +class RenderingType(str, Enum): + + no_graph = "NoGraph" + table = "Table" + time_series = "TimeSeries" + time_series_per_instance = "TimeSeriesPerInstance" + + +class ResourceScopeType(str, Enum): + + server_farm = "ServerFarm" + subscription = "Subscription" + web_site = "WebSite" + + +class NotificationLevel(str, Enum): + + critical = "Critical" + warning = "Warning" + information = "Information" + non_urgent_suggestion = "NonUrgentSuggestion" + + +class Channels(str, Enum): + + notification = "Notification" + api = "Api" + email = "Email" + webhook = "Webhook" + all = "All" + + +class AppServicePlanRestrictions(str, Enum): + + none = "None" + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class InAvailabilityReasonType(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class CheckNameResourceTypes(str, Enum): + + site = "Site" + slot = "Slot" + hosting_environment = "HostingEnvironment" + publishing_user = "PublishingUser" + microsoft_websites = "Microsoft.Web/sites" + microsoft_websitesslots = "Microsoft.Web/sites/slots" + microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" + microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" + + +class ValidateResourceTypes(str, Enum): + + server_farm = "ServerFarm" + site = "Site" + + +class LogLevel(str, Enum): + + off = "Off" + verbose = "Verbose" + information = "Information" + warning = "Warning" + error = "Error" + + +class BackupItemStatus(str, Enum): + + 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 DatabaseType(str, Enum): + + sql_azure = "SqlAzure" + my_sql = "MySql" + local_my_sql = "LocalMySql" + postgre_sql = "PostgreSql" + + +class FrequencyUnit(str, Enum): + + day = "Day" + hour = "Hour" + + +class ContinuousWebJobStatus(str, Enum): + + initializing = "Initializing" + starting = "Starting" + running = "Running" + pending_restart = "PendingRestart" + stopped = "Stopped" + + +class WebJobType(str, Enum): + + continuous = "Continuous" + triggered = "Triggered" + + +class PublishingProfileFormat(str, Enum): + + file_zilla3 = "FileZilla3" + web_deploy = "WebDeploy" + ftp = "Ftp" + + +class DnsVerificationTestResult(str, Enum): + + passed = "Passed" + failed = "Failed" + skipped = "Skipped" + + +class MSDeployLogEntryType(str, Enum): + + message = "Message" + warning = "Warning" + error = "Error" + + +class MSDeployProvisioningState(str, Enum): + + accepted = "accepted" + running = "running" + succeeded = "succeeded" + failed = "failed" + canceled = "canceled" + + +class MySqlMigrationType(str, Enum): + + local_to_remote = "LocalToRemote" + remote_to_local = "RemoteToLocal" + + +class PublicCertificateLocation(str, Enum): + + current_user_my = "CurrentUserMy" + local_machine_my = "LocalMachineMy" + unknown = "Unknown" + + +class BackupRestoreOperationType(str, Enum): + + default = "Default" + clone = "Clone" + relocation = "Relocation" + snapshot = "Snapshot" + cloud_fs = "CloudFS" + + +class UnauthenticatedClientAction(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + + +class BuiltInAuthenticationProvider(str, Enum): + + azure_active_directory = "AzureActiveDirectory" + facebook = "Facebook" + google = "Google" + microsoft_account = "MicrosoftAccount" + twitter = "Twitter" + + +class CloneAbilityResult(str, Enum): + + cloneable = "Cloneable" + partially_cloneable = "PartiallyCloneable" + not_cloneable = "NotCloneable" + + +class SiteExtensionType(str, Enum): + + gallery = "Gallery" + web_root = "WebRoot" + + +class TriggeredWebJobStatus(str, Enum): + + success = "Success" + failed = "Failed" + error = "Error" + + +class SkuName(str, Enum): + + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + dynamic = "Dynamic" + isolated = "Isolated" + premium_v2 = "PremiumV2" + elastic_premium = "ElasticPremium" + elastic_isolated = "ElasticIsolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/__init__.py new file mode 100644 index 00000000000..b77b412497f --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/__init__.py @@ -0,0 +1,44 @@ +# 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_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 ._provider_operations import ProviderOperations +from ._recommendations_operations import RecommendationsOperations +from ._web_apps_operations import WebAppsOperations +from ._app_service_environments_operations import AppServiceEnvironmentsOperations +from ._app_service_plans_operations import AppServicePlansOperations +from ._resource_health_metadata_operations import ResourceHealthMetadataOperations +from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin + +__all__ = [ + 'AppServiceCertificateOrdersOperations', + 'CertificateRegistrationProviderOperations', + 'DomainsOperations', + 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', + 'CertificatesOperations', + 'DeletedWebAppsOperations', + 'DiagnosticsOperations', + 'ProviderOperations', + 'RecommendationsOperations', + 'WebAppsOperations', + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', + 'ResourceHealthMetadataOperations', + 'WebSiteManagementClientOperationsMixin', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_certificate_orders_operations.py new file mode 100644 index 00000000000..8e37127a7cb --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_certificate_orders_operations.py @@ -0,0 +1,1427 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceCertificateOrdersOperations(object): + """AppServiceCertificateOrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all certificate orders in a subscription. + + List all certificate orders in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def validate_purchase_information( + self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): + """Validate information for a certificate order. + + Validate information for a certificate order. + + :param app_service_certificate_order: Information for a certificate + order. + :type app_service_certificate_order: + ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate_purchase_information.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get certificate orders in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def get( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """Get a certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + + def _create_or_update_initial( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a certificate purchase order. + + 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.v2018_02_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateOrder or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def delete( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """Delete an existing certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate purchase order. + + 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.v2018_02_01.models.AppServiceCertificateOrderPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def list_certificates( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """List all certificates associated with a certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateResource + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_certificates.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} + + def get_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """Get the certificate associated with a certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + + def _create_or_update_certificate_initial( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a certificate and associates with key vault secret. + + 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.v2018_02_01.models.AppServiceCertificateResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def delete_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """Delete the certificate associated with a certificate order. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + """Creates or updates a certificate and associates with key vault secret. + + 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.v2018_02_01.models.AppServiceCertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def reissue( + self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """Reissue an existing certificate order. + + 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.v2018_02_01.models.ReissueCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reissue.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} + + def renew( + self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """Renew an existing certificate order. + + 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.v2018_02_01.models.RenewCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} + + def resend_email( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """Resend certificate email. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.resend_email.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} + + def resend_request_emails( + self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): + """Verify domain ownership for this certificate order. + + 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: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + name_identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.resend_request_emails.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} + + def retrieve_site_seal( + self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): + """Verify domain ownership for this certificate order. + + 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 light_theme: If 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSeal or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSeal or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) + + # Construct URL + url = self.retrieve_site_seal.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSeal', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} + + def verify_domain_ownership( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """Verify domain ownership for this certificate order. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.verify_domain_ownership.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} + + def retrieve_certificate_actions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieve the list of certificate actions. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2018_02_01.models.CertificateOrderAction] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_actions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateOrderAction]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} + + def retrieve_certificate_email_history( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieve email history. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.CertificateEmail] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_email_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateEmail]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_environments_operations.py new file mode 100644 index 00000000000..016b079e600 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_environments_operations.py @@ -0,0 +1,3376 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceEnvironmentsOperations(object): + """AppServiceEnvironmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all App Service Environments for a subscription. + + Get all App Service Environments for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all App Service Environments in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the properties of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an App Service Environment. + + 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.v2018_02_01.models.AppServiceEnvironmentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceEnvironmentResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete an App Service Environment. + + 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 true to force the deletion + even if the App Service Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update an App Service Environment. + + 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.v2018_02_01.models.AppServiceEnvironmentPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def list_capacities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the used, available, and total worker capacity an App Service + Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StampCapacity + :rtype: + ~azure.mgmt.web.v2018_02_01.models.StampCapacityPaged[~azure.mgmt.web.v2018_02_01.models.StampCapacity] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_capacities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} + + def list_vips( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get IP addresses assigned to an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.AddressResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vips.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} + + + def _change_vnet_initial( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): + vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) + + # Construct URL + url = self.change_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def change_vnet( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Move an App Service Environment to a different VNET. + + 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 id: Resource id of the Virtual Network. + :type id: str + :param subnet: Subnet within the Virtual Network. + :type subnet: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._change_vnet_initial( + resource_group_name=resource_group_name, + name=name, + id=id, + subnet=subnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} + + def list_diagnostics( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get diagnostic information for an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2018_02_01.models.HostingEnvironmentDiagnostics] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_diagnostics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} + + def get_diagnostics_item( + self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): + """Get a diagnostics item for an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostingEnvironmentDiagnostics or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.HostingEnvironmentDiagnostics or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostics_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} + + def get_inbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the network endpoints of all inbound dependencies of an App Service + Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2018_02_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2018_02_01.models.InboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_inbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} + + def list_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get global metric definitions of an App Service Environment. + + Get global metric definitions 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MetricDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'} + + def list_metrics( + self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get global metrics of an App Service Environment. + + Get global 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 details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'} + + def list_multi_role_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get all multi-role pools. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} + + def get_multi_role_pool( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get properties of a multi-role pool. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + + def _create_or_update_multi_role_pool_initial( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a multi-role pool. + + 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.v2018_02_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a multi-role pool. + + 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.v2018_02_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def list_multi_role_pool_instance_metric_definitions( + self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): + """Get metric definitions for a specific instance of a multi-role pool of + an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} + + def list_multi_role_pool_instance_metrics( + self, resource_group_name, name, instance, details=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for a specific instance of a multi-role pool of an App + Service Environment. + + Get metrics 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 + :param details: Specify true to include instance details. + The default is false. + :type details: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'} + + def list_multi_role_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get metric definitions for a multi-role pool of an App Service + Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} + + def list_multi_role_metrics( + self, resource_group_name, name, start_time=None, end_time=None, time_grain=None, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for a multi-role pool of an App Service Environment. + + Get 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 + :param start_time: Beginning time of the metrics query. + :type start_time: str + :param end_time: End time of the metrics query. + :type end_time: str + :param time_grain: Time granularity of the metrics query. + :type time_grain: str + :param details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'str') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'str') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str') + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'} + + def list_multi_role_pool_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get available SKUs for scaling a multi-role pool. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SkuInfoPaged[~azure.mgmt.web.v2018_02_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} + + def list_multi_role_usages( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get usage metrics for a multi-role pool of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2018_02_01.models.UsagePaged[~azure.mgmt.web.v2018_02_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} + + def list_operations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List all currently running operations on the App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.Operation] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_operations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Operation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} + + def get_outbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the network endpoints of all outbound dependencies of an App + Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OutboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2018_02_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2018_02_01.models.OutboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_outbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} + + def reboot( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Reboot all machines in an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reboot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} + + + def _resume_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.resume.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def resume( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Resume an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} + + def list_app_service_plans( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans in an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServicePlanPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_app_service_plans.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} + + def list_web_apps( + self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): + """Get all apps in an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} + + + def _suspend_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.suspend.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def suspend( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Suspend an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Get global usage metrics of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} + + def list_worker_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get all worker pools of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} + + def get_worker_pool( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """Get properties of a worker pool. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + + def _create_or_update_worker_pool_initial( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a worker pool. + + 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.v2018_02_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a worker pool. + + 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.v2018_02_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def list_worker_pool_instance_metric_definitions( + self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): + """Get metric definitions for a specific instance of a worker pool of an + App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} + + def list_worker_pool_instance_metrics( + self, resource_group_name, name, worker_pool_name, instance, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for a specific instance of a worker pool of an App Service + Environment. + + Get metrics 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 + :param details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'} + + def list_web_worker_metric_definitions( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """Get metric definitions for a worker pool of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} + + def list_web_worker_metrics( + self, resource_group_name, name, worker_pool_name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for a worker pool of a AppServiceEnvironment (App Service + Environment). + + Get metrics for a worker pool of a AppServiceEnvironment (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 worker pool + :type worker_pool_name: str + :param details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'} + + def list_worker_pool_skus( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """Get available SKUs for scaling a worker pool. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SkuInfoPaged[~azure.mgmt.web.v2018_02_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} + + def list_web_worker_usages( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """Get usage metrics for a worker pool of an App Service Environment. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2018_02_01.models.UsagePaged[~azure.mgmt.web.v2018_02_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_plans_operations.py new file mode 100644 index 00000000000..f61257bf766 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_plans_operations.py @@ -0,0 +1,2114 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServicePlansOperations(object): + """AppServicePlansOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, detailed=None, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans for a subscription. + + Get all App Service plans for a subscription. + + :param detailed: Specify true to return all App Service + plan properties. The default is false, which returns a + subset of the properties. + Retrieval of all properties may increase the API latency. + :type detailed: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServicePlanPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + if detailed is not None: + query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AppServicePlanPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlan') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an App Service Plan. + + 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.v2018_02_01.models.AppServicePlan + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AppServicePlan or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.AppServicePlan]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Delete an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + """Creates or updates an App Service Plan. + + 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.v2018_02_01.models.AppServicePlanPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def list_capabilities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List all capabilities of an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.Capability] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_capabilities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Capability]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a Hybrid Connection in use in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Delete a Hybrid Connection in use in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Get the send key name and value of a Hybrid Connection. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_web_apps_by_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Get all apps that use a Hybrid Connection in an App Service Plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of str + :rtype: ~azure.mgmt.web.v2018_02_01.models.StrPaged[str] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps_by_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} + + def get_hybrid_connection_plan_limit( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the maximum number of Hybrid Connections allowed in an App Service + plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionLimits or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnectionLimits or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_plan_limit.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionLimits', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieve all Hybrid Connections in use in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HybridConnection + :rtype: + ~azure.mgmt.web.v2018_02_01.models.HybridConnectionPaged[~azure.mgmt.web.v2018_02_01.models.HybridConnection] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} + + def list_metric_defintions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get metrics that can be queried for an App Service plan, and their + definitions. + + Get metrics that can be queried for an App Service plan, and their + definitions. + + :param 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metric_defintions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metric_defintions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'} + + def list_metrics( + self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get metrics for an App Service plan. + + Get metrics for 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 details: Specify true to include instance details. + The default is false. + :type details: bool + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'} + + def restart_web_apps( + self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): + """Restart all apps in an App Service plan. + + 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 true to perform a soft + restart, applies the configuration settings and restarts the apps if + necessary. The default is false, which always restarts + and reprovisions the apps + :type soft_restart: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} + + def list_web_apps( + self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """Get all apps associated with an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} + + def get_server_farm_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets all selectable SKUs for a given App Service Plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_server_farm_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets server farm usage information. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} + + def list_vnets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get all Virtual Networks associated with an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} + + def get_vnet_from_server_farm( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """Get a Virtual Network associated with an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_from_server_farm.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """Get a Virtual Network gateway. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Update a Virtual Network gateway. + + 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.v2018_02_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_routes_for_vnet( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """Get all routes that are associated with a Virtual Network in an App + Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_routes_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} + + def get_route_for_vnet( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """Get a Virtual Network route in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_route_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def create_or_update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """Create or update a Virtual Network route in an App Service plan. + + 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.v2018_02_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def delete_vnet_route( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """Delete a Virtual Network route in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """Create or update a Virtual Network route in an App Service plan. + + 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.v2018_02_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def reboot_worker( + self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): + """Reboot a worker machine in an App Service plan. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reboot_worker.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificate_registration_provider_operations.py new file mode 100644 index 00000000000..a8a23e8917b --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificate_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificateRegistrationProviderOperations(object): + """CertificateRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificates_operations.py new file mode 100644 index 00000000000..1c2850cb061 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificates_operations.py @@ -0,0 +1,439 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all certificates for a subscription. + + Get all certificates for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CertificatePaged[~azure.mgmt.web.v2018_02_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all certificates in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CertificatePaged[~azure.mgmt.web.v2018_02_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get a certificate. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def create_or_update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate. + + 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.v2018_02_01.models.Certificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'Certificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Delete a certificate. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate. + + 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.v2018_02_01.models.CertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_deleted_web_apps_operations.py new file mode 100644 index 00000000000..97e5c74c82b --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_deleted_web_apps_operations.py @@ -0,0 +1,238 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DeletedWebAppsOperations(object): + """DeletedWebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all deleted apps for a subscription. + + Get all deleted apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DeletedSitePaged[~azure.mgmt.web.v2018_02_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Get all deleted apps for a subscription at location. + + Get all deleted apps for a subscription at location. + + :param location: + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DeletedSitePaged[~azure.mgmt.web.v2018_02_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} + + def get_deleted_web_app_by_location( + self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): + """Get deleted app for a subscription at location. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeletedSite or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DeletedSite or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deleted_web_app_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeletedSite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_diagnostics_operations.py new file mode 100644 index 00000000000..e2c0bb8cde9 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_diagnostics_operations.py @@ -0,0 +1,1735 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DiagnosticsOperations(object): + """DiagnosticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list_hosting_environment_detector_responses( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List Hosting Environment Detector Responses. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DetectorResponsePaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hosting_environment_detector_responses.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} + + def get_hosting_environment_detector_response( + self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Get Hosting Environment Detector Response. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hosting_environment_detector_response.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} + + def list_site_detector_responses( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """List Site Detector Responses. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DetectorResponsePaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} + + def get_site_detector_response( + self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Get site detector response. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} + + def list_site_diagnostic_categories( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Categories. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} + + def get_site_diagnostic_category( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Category. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Site Analyses. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): + """Get Site Analysis. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Analysis. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Detectors. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector( + self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): + """Get Detector. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_site_detector.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector( + self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Detector. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} + + def list_site_detector_responses_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """List Site Detector Responses. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DetectorResponsePaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} + + def get_site_detector_response_slot( + self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Get site detector response. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} + + def list_site_diagnostic_categories_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Categories. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} + + def get_site_diagnostic_category_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Category. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Site Analyses. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Site Analysis. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Analysis. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Detectors. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector_slot( + self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Detector. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_site_detector_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector_slot( + self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Detector. + + 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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domain_registration_provider_operations.py new file mode 100644 index 00000000000..1bc59d42587 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domain_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DomainRegistrationProviderOperations(object): + """DomainRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py new file mode 100644 index 00000000000..3dcb3a8654d --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py @@ -0,0 +1,1093 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DomainsOperations(object): + """DomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def check_availability( + self, name=None, custom_headers=None, raw=False, **operation_config): + """Check if a domain is available for registration. + + Check if a domain is available for registration. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainAvailablilityCheckResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DomainAvailablilityCheckResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.check_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainAvailablilityCheckResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all domains in a subscription. + + Get all domains in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DomainPaged[~azure.mgmt.web.v2018_02_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} + + def get_control_center_sso_request( + self, custom_headers=None, raw=False, **operation_config): + """Generate a single sign-on request for the domain management portal. + + Generate a single sign-on request for the domain management portal. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainControlCenterSsoRequest or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DomainControlCenterSsoRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_control_center_sso_request.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainControlCenterSsoRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} + + def list_recommendations( + self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): + """Get domain name recommendations based on keywords. + + Get domain name recommendations based on keywords. + + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NameIdentifier + :rtype: + ~azure.mgmt.web.v2018_02_01.models.NameIdentifierPaged[~azure.mgmt.web.v2018_02_01.models.NameIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommendations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all domains in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DomainPaged[~azure.mgmt.web.v2018_02_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} + + def get( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Get a domain. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'Domain') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a domain. + + 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.v2018_02_01.models.Domain + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.Domain]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def delete( + self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): + """Delete a domain. + + 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 true to delete + the domain immediately. The default is false which + deletes the domain after 24 hours. + :type force_hard_delete_domain: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + """Creates or updates a domain. + + 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.v2018_02_01.models.DomainPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'DomainPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def list_ownership_identifiers( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Lists domain ownership identifiers. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DomainOwnershipIdentifier + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_ownership_identifiers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} + + def get_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """Get ownership identifier for domain. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def create_or_update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """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 identifer. + + :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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.create_or_update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def delete_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """Delete ownership identifier for domain. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """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 identifer. + + :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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def renew( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Renew a domain. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204, 400, 500]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_provider_operations.py new file mode 100644 index 00000000000..28477ed78d4 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_provider_operations.py @@ -0,0 +1,244 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProviderOperations(object): + """ProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def get_available_stacks( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Get available application frameworks and their versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStack + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ApplicationStackPaged[~azure.mgmt.web.v2018_02_01.models.ApplicationStack] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks.metadata['url'] + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """Gets all available operations for the Microsoft.Web resource provider. + Also exposes resource metric definitions. + + Gets all available operations for the Microsoft.Web resource provider. + Also exposes resource metric definitions. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} + + def get_available_stacks_on_prem( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Get available application frameworks and their versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStack + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ApplicationStackPaged[~azure.mgmt.web.v2018_02_01.models.ApplicationStack] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks_on_prem.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_recommendations_operations.py new file mode 100644 index 00000000000..65038b41936 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_recommendations_operations.py @@ -0,0 +1,1078 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RecommendationsOperations(object): + """RecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """List all recommendations for a subscription. + + List all recommendations for a subscription. + + :param featured: Specify true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} + + def reset_all_filters( + self, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for a subscription. + + Reset all recommendation opt-out settings for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_all_filters.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} + + def disable_recommendation_for_subscription( + self, name, custom_headers=None, raw=False, **operation_config): + """Disables the specified rule so it will not apply to a subscription in + the future. + + Disables the specified rule so it will not apply to a subscription in + the future. + + :param name: Rule name + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_recommendation_for_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} + + def list_history_for_hosting_environment( + self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get past recommendations for an app, optionally specified by the time + range. + + 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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} + + def list_recommended_rules_for_hosting_environment( + self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get all recommendations for an app. + + 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 hosting_environment_name: Name of the app. + :type hosting_environment_name: str + :param featured: Specify true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} + + def disable_all_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """Disable all recommendations for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_all_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} + + def reset_all_filters_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_all_filters_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} + + def get_rule_details_by_hosting_environment( + self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """Get a recommendation rule for an app. + + 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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} + + def disable_recommendation_for_hosting_environment( + self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """Disables the specific rule for a web site permanently. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_recommendation_for_hosting_environment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} + + def list_history_for_web_app( + self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get past recommendations for an app, optionally specified by the time + range. + + 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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} + + def list_recommended_rules_for_web_app( + self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Get all recommendations for an app. + + 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 true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} + + def disable_all_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """Disable all recommendations for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_all_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} + + def reset_all_filters_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_all_filters_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} + + def get_rule_details_by_web_app( + self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """Get a recommendation rule for an app. + + 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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} + + def disable_recommendation_for_site( + self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): + """Disables the specific rule for a web site permanently. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_recommendation_for_site.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_resource_health_metadata_operations.py new file mode 100644 index 00000000000..2923705786a --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_resource_health_metadata_operations.py @@ -0,0 +1,465 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceHealthMetadataOperations(object): + """ResourceHealthMetadataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the subscription. + + List all ResourceHealthMetadata for all sites in the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the resource group in + the subscription. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site + as a collection. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} + + def get_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} + + def list_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site + as a collection. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} + + def get_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_top_level_domains_operations.py new file mode 100644 index 00000000000..e930abcb731 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_top_level_domains_operations.py @@ -0,0 +1,251 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TopLevelDomainsOperations(object): + """TopLevelDomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all top-level domains supported for registration. + + Get all top-level domains supported for registration. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TopLevelDomain + :rtype: + ~azure.mgmt.web.v2018_02_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2018_02_01.models.TopLevelDomain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} + + def get( + self, name, custom_headers=None, raw=False, **operation_config): + """Get details of a top-level domain. + + Get details of a top-level domain. + + :param name: Name of the top-level domain. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TopLevelDomain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.TopLevelDomain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TopLevelDomain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} + + def list_agreements( + self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): + """Gets all legal agreements that user needs to accept before purchasing a + domain. + + 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 include_privacy: If true, then the list of + agreements will include agreements for domain privacy as well; + otherwise, false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TldLegalAgreement + :rtype: + ~azure.mgmt.web.v2018_02_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2018_02_01.models.TldLegalAgreement] + :raises: + :class:`DefaultErrorResponseException` + """ + agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_agreements.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_apps_operations.py new file mode 100644 index 00000000000..0e61cb62ca7 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_apps_operations.py @@ -0,0 +1,26850 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WebAppsOperations(object): + """WebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all apps for a subscription. + + Get all apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} + + def list_by_resource_group( + self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): + """Gets all web, mobile, and API apps in the specified resource group. + + 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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + if include_slots is not None: + query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a web, mobile, or API app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + 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.v2018_02_01.models.Site + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def delete( + self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """Deletes a web, mobile, or API app, or one of the deployment slots. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + 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.v2018_02_01.models.SitePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def analyze_custom_hostname( + self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): + """Analyze a custom hostname. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} + + def apply_slot_config_to_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Applies the configuration settings from the target slot onto the + current slot. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_config_to_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} + + def backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """Creates a backup of an app. + + 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.v2018_02_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} + + def list_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets existing backups of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2018_02_01.models.BackupItemPaged[~azure.mgmt.web.v2018_02_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} + + def get_backup_status( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """Gets a backup of an app by its ID. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def delete_backup( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """Deletes a backup of an app by its ID. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def list_backup_status_secrets( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + """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. + + 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.v2018_02_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} + + + def _restore_initial( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a specific backup to another app (or deployment slot, if + specified). + + 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.v2018_02_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} + + def list_configurations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List the configurations of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} + + def update_application_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the application settings of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} + + def list_application_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the application settings of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} + + def update_auth_settings( + self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): + """Updates the Authentication / Authorization settings associated with web + app. + + 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.v2018_02_01.models.SiteAuthSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} + + def get_auth_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the Authentication/Authorization settings of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} + + def update_azure_storage_accounts( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Updates the Azure storage account configurations of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} + + def list_azure_storage_accounts( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the Azure storage account configurations of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} + + def update_backup_configuration( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """Updates the backup configuration of an app. + + 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.v2018_02_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def delete_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Deletes the backup configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def get_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the backup configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} + + def update_connection_strings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the connection strings of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2018_02_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} + + def list_connection_strings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the connection strings of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the logging configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_diagnostic_logs_config( + self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): + """Updates the logging configuration of an app. + + 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.v2018_02_01.models.SiteLogsConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_metadata( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the metadata of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} + + def list_metadata( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the metadata of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} + + + def _list_publishing_credentials_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Gets the Git/FTP publishing credentials of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} + + def update_site_push_settings( + self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): + """Updates the Push settings associated with web app. + + 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.v2018_02_01.models.PushSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} + + def list_site_push_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the Push settings associated with web app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} + + def list_slot_configuration_names( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the names of app settings and connection strings that stick to the + slot (not swapped). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def update_slot_configuration_names( + self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): + """Updates the names of application settings and connection string that + remain with the slot during swap operation. + + 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.v2018_02_01.models.SlotConfigNamesResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def get_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the configuration of an app, such as platform version and bitness, + default documents, virtual applications, Always On, etc. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def create_or_update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. + + 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.v2018_02_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. + + 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.v2018_02_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def list_configuration_snapshot_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets a list of web app configuration snapshots identifiers. Each + element of the list contains a timestamp and the ID of the snapshot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} + + def get_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """Gets a snapshot of the configuration of an app at a previous point in + time. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """Reverts the configuration of an app to a previous snapshot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.recover_site_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the last lines of docker logs for the given site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} + + def get_container_logs_zip( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the ZIP archived docker log files for the given site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} + + def list_continuous_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List continuous web jobs for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2018_02_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} + + def get_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Gets a continuous web job by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Delete a continuous web job by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Start a continuous web job for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Stop a continuous web job for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List deployments for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DeploymentPaged[~azure.mgmt.web.v2018_02_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} + + def get_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """Get a deployment by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def create_deployment( + self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): + """Create a deployment for an app, or a deployment slot. + + 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.v2018_02_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def delete_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """Delete a deployment by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def list_deployment_log( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """List deployment log for specific deployment for an app, or a deployment + slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} + + def discover_backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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. + + 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.v2018_02_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} + + def list_domain_ownership_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Lists ownership identifiers for domain associated with web app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2018_02_01.models.IdentifierPaged[~azure.mgmt.web.v2018_02_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """Get domain ownership identifier for web app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. + + 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 kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """Deletes a domain ownership identifier for a web app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. + + 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 kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + + # Construct URL + url = self.update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the status of the last MSDeploy operation. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_initial( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + 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.v2018_02_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + raw_result = self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + def get_ms_deploy_log( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} + + def list_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List the functions for a web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} + + def get_functions_admin_token( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Fetch a short lived token that can be exchanged for a master key. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} + + def get_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """Get function information by its ID for web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + + def _create_function_initial( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_function( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create function for web site, or a deployment slot. + + 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.v2018_02_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def delete_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """Delete a function for web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def create_or_update_function_secret( + self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """Add or update a function secret. + + 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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def delete_function_secret( + self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): + """Delete a function secret. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """Get function keys for a function in a web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} + + def list_function_secrets( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """Get function secrets for a function in a web site, or a deployment + slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} + + def list_host_keys( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get host secrets for a function app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} + + def list_sync_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """This is to allow calling via powershell and ARM template. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} + + def sync_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Syncs function trigger metadata to the management database. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} + + def create_or_update_host_secret( + self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """Add or update a host level secret. + + 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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def delete_host_secret( + self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): + """Delete a host level secret. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get hostname bindings for an app or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2018_02_01.models.HostNameBindingPaged[~azure.mgmt.web.v2018_02_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} + + def get_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """Get the named hostname binding for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding( + self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + 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.v2018_02_01.models.HostNameBinding + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def delete_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Retrieves a specific Service Bus Hybrid Connection used by this Web + App. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. + + 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.v2018_02_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Removes a Hybrid Connection from this site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. + + 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.v2018_02_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Gets the send key name and value for a Hybrid Connection. + + Gets the send key name and value for a Hybrid Connection. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} + + def list_relay_service_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets hybrid connections configured for an app (or deployment slot, if + specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} + + def get_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """Gets a hybrid connection configuration by its name. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). + + 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.v2018_02_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def delete_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """Deletes a relay service connection by its name. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). + + 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.v2018_02_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def list_instance_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets all scale-out instances of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteInstance + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SiteInstancePaged[~azure.mgmt.web.v2018_02_01.models.SiteInstance] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} + + def get_instance_ms_deploy_status( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the status of the last MSDeploy operation. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + + def _create_instance_ms_deploy_operation_initial( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + 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.v2018_02_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} + + def list_instance_processes( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} + + def get_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} + + def list_instance_process_modules( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module( + self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} + + def list_instance_process_threads( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} + + def get_instance_process_thread( + self, resource_group_name, name, process_id, thread_id, instance_id, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in 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 thread_id: TID. + :type thread_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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_thread.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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'), + 'threadId': self._serialize.url("thread_id", thread_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessThreadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} + + def is_cloneable( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Shows whether an app can be cloned to another resource group or + subscription. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} + + def list_sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """This is to allow calling via powershell and ARM template. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} + + def list_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets all metric definitions of an app (or deployment slot, if + specified). + + Gets all metric definitions 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'} + + def list_metrics( + self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets performance metrics of an app (or deployment slot, if specified). + + Gets performance metrics 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 details: Specify "true" to include metric details in the + response. It is "false" by default. + :type details: bool + :param filter: Return only metrics 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'} + + + def _migrate_storage_initial( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_storage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_storage( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a web app. + + 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.v2018_02_01.models.StorageMigrationOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StorageMigrationResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.StorageMigrationResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.StorageMigrationResponse]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} + + + def _migrate_my_sql_initial( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_my_sql.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_my_sql( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Migrates a local (in-app) MySql database to a remote MySql database. + + 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.v2018_02_01.models.MigrateMySqlRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Operation or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.Operation] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.Operation]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} + + def get_migrate_my_sql_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Returns the status of MySql in app migration, if one is active, and + whether or not MySql in app is enabled. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} + + def get_swift_virtual_network_connection( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets a Swift Virtual Network connection. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Deletes a Swift Virtual Network connection from an app (or deployment + slot). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_swift_virtual_network.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def list_network_features( + self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): + """Gets all network features used by the app (or deployment slot, if + specified). + + 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. This can either be "summary" or + "detailed". + :type view: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_network_features.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} + + def get_network_trace_operation( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """Start capturing network packets for the site (To be deprecated). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Start capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} + + def stop_web_site_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Stop ongoing capturing network packets for the site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} + + def get_network_traces( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} + + def get_network_trace_operation_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} + + def get_network_traces_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Generates a new publishing password for an app (or deployment slot, if + specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generate_new_site_publishing_password.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} + + def list_perf_mon_counters( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets perfmon counters for web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2018_02_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2018_02_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} + + def get_site_php_error_log_flag( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets web app's event logs. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} + + def list_premier_add_ons( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the premier add-ons of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} + + def get_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """Gets a named add-on of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """Updates a named add-on of an app. + + 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.v2018_02_01.models.PremierAddOn + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """Delete a premier add-on from an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """Updates a named add-on of an app. + + 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.v2018_02_01.models.PremierAddOnPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def get_private_access( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets data around private site access enablement and authorized Virtual + Networks that can access the site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def put_private_access_vnet( + self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): + """Sets data around private site access enablement and authorized Virtual + Networks that can access the site. + + 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.v2018_02_01.models.PrivateAccess + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def list_processes( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} + + def get_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def delete_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def get_process_dump( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} + + def list_process_modules( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} + + def get_process_module( + self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} + + def get_process_thread( + self, resource_group_name, name, process_id, thread_id, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in 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 thread_id: TID. + :type thread_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_thread.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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'), + 'threadId': self._serialize.url("thread_id", thread_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessThreadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} + + def list_public_certificates( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get public certificates for an app or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2018_02_01.models.PublicCertificatePaged[~azure.mgmt.web.v2018_02_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} + + def get_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Get the named public certificate for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate( + self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + 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.v2018_02_01.models.PublicCertificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets( + self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the publishing profile for an app (or deployment slot, if + specified). + + 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 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.v2018_02_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the + DisasterRecover endpoint if true + :type include_disaster_recovery_endpoints: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} + + def reset_production_slot_config( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Resets the configuration settings of the current slot if they were + previously modified by calling the API with POST. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_production_slot_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} + + def restart( + self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """Restarts an app (or deployment slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} + + + def _restore_from_backup_blob_initial( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob( + self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores an app from a backup blob in Azure Storage. + + 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.v2018_02_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_from_backup_blob_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a deleted web app to this web app. + + 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.v2018_02_01.models.DeletedAppRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_from_deleted_app_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} + + + def _restore_snapshot_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a web app from a snapshot. + + 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.v2018_02_01.models.SnapshotRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_snapshot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} + + def list_site_extensions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get list of siteextensions for a web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} + + def get_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """Get site extension information by its ID for a web site, or a + deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_initial( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Install site extension on a web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo]] + :raises: :class:`CloudError` + """ + raw_result = self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def delete_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """Remove a site extension from a web site, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def list_slots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets an app's deployment slots. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} + + def get_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the details of a web, mobile, or API app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + + def _create_or_update_slot_initial( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + 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.v2018_02_01.models.Site + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def delete_slot( + self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """Deletes a web, mobile, or API app, or one of the deployment slots. + + 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 true if the App Service plan + will be empty after app deletion and you want to delete the empty App + Service plan. By default, the empty App Service plan is not deleted. + :type delete_empty_server_farm: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + 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.v2018_02_01.models.SitePatchResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def analyze_custom_hostname_slot( + self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): + """Analyze a custom hostname. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} + + def apply_slot_configuration_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Applies the configuration settings from the target slot onto the + current slot. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} + + def backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """Creates a backup of an app. + + 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.v2018_02_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} + + def list_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets existing backups of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2018_02_01.models.BackupItemPaged[~azure.mgmt.web.v2018_02_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} + + def get_backup_status_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a backup of an app by its ID. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def delete_backup_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a backup of an app by its ID. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def list_backup_status_secrets_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """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. + + 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.v2018_02_01.models.BackupRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} + + + def _restore_slot_initial( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a specific backup to another app (or deployment slot, if + specified). + + 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.v2018_02_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} + + def list_configurations_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List the configurations of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} + + def update_application_settings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the application settings of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} + + def list_application_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the application settings of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} + + def update_auth_settings_slot( + self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): + """Updates the Authentication / Authorization settings associated with web + app. + + 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.v2018_02_01.models.SiteAuthSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} + + def get_auth_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Authentication/Authorization settings of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} + + def update_azure_storage_accounts_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Updates the Azure storage account configurations of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} + + def list_azure_storage_accounts_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Azure storage account configurations of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} + + def update_backup_configuration_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """Updates the backup configuration of an app. + + 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.v2018_02_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def delete_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes the backup configuration of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def get_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the backup configuration of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} + + def update_connection_strings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the connection strings of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2018_02_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} + + def list_connection_strings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the connection strings of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the logging configuration of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_diagnostic_logs_config_slot( + self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the logging configuration of an app. + + 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.v2018_02_01.models.SiteLogsConfig + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_metadata_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the metadata of an app. + + 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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} + + def list_metadata_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the metadata of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} + + + def _list_publishing_credentials_slot_initial( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Gets the Git/FTP publishing credentials of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} + + def update_site_push_settings_slot( + self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): + """Updates the Push settings associated with web app. + + 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.v2018_02_01.models.PushSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} + + def list_site_push_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Push settings associated with web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} + + def get_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the configuration of an app, such as platform version and bitness, + default documents, virtual applications, Always On, etc. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def create_or_update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. + + 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.v2018_02_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. + + 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.v2018_02_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def list_configuration_snapshot_info_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a list of web app configuration snapshots identifiers. Each + element of the list contains a timestamp and the ID of the snapshot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} + + def get_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a snapshot of the configuration of an app at a previous point in + time. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """Reverts the configuration of an app to a previous snapshot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.recover_site_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the last lines of docker logs for the given site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} + + def get_container_logs_zip_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the ZIP archived docker log files for the given site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} + + def list_continuous_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List continuous web jobs for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2018_02_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} + + def get_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a continuous web job by its ID for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a continuous web job by its ID for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Start a continuous web job for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Stop a continuous web job for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List deployments for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2018_02_01.models.DeploymentPaged[~azure.mgmt.web.v2018_02_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} + + def get_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """Get a deployment by its ID for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def create_deployment_slot( + self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): + """Create a deployment for an app, or a deployment slot. + + 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.v2018_02_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def delete_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """Delete a deployment by its ID for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def list_deployment_log_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """List deployment log for specific deployment for an app, or a deployment + slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} + + def discover_backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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. + + 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.v2018_02_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} + + def list_domain_ownership_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Lists ownership identifiers for domain associated with web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2018_02_01.models.IdentifierPaged[~azure.mgmt.web.v2018_02_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """Get domain ownership identifier for web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. + + 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 kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a domain ownership identifier for a web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. + + 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 kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + + # Construct URL + url = self.update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get the status of the last MSDeploy operation. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation_slot( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + 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.v2018_02_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + raw_result = self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + def get_ms_deploy_log_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} + + def list_instance_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List the functions for a web site, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} + + def get_functions_admin_token_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Fetch a short lived token that can be exchanged for a master key. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} + + def get_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """Get function information by its ID for web site, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + + def _create_instance_function_slot_initial( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_function_slot( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create function for web site, or a deployment slot. + + 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.v2018_02_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def delete_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a function for web site, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def create_or_update_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """Add or update a function secret. + + 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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a function secret. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """Get function keys for a function in a web site, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} + + def list_function_secrets_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """Get function secrets for a function in a web site, or a deployment + slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} + + def list_host_keys_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get host secrets for a function app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} + + def list_sync_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """This is to allow calling via powershell and ARM template. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} + + def sync_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Syncs function trigger metadata to the management database. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} + + def create_or_update_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """Add or update a host level secret. + + 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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a host level secret. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get hostname bindings for an app or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2018_02_01.models.HostNameBindingPaged[~azure.mgmt.web.v2018_02_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} + + def get_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """Get the named hostname binding for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding_slot( + self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + 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.v2018_02_01.models.HostNameBinding + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def delete_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def get_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """Retrieves a specific Service Bus Hybrid Connection used by this Web + App. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. + + 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.v2018_02_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """Removes a Hybrid Connection from this site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. + + 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.v2018_02_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the send key name and value for a Hybrid Connection. + + Gets the send key name and value for a Hybrid Connection. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connection_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_hybrid_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} + + def list_relay_service_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets hybrid connections configured for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} + + def get_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a hybrid connection configuration by its name. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). + + 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.v2018_02_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def delete_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a relay service connection by its name. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). + + 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.v2018_02_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def list_instance_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets all scale-out instances of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteInstance + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SiteInstancePaged[~azure.mgmt.web.v2018_02_01.models.SiteInstance] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} + + def get_instance_ms_deploy_status_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the status of the last MSDeploy operation. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + + def _create_instance_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation_slot( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + 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.v2018_02_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_processes_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} + + def get_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_process_modules_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def list_instance_process_threads_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} + + def get_instance_process_thread_slot( + self, resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in 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 thread_id: TID. + :type thread_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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_thread_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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'), + 'threadId': self._serialize.url("thread_id", thread_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessThreadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} + + def is_cloneable_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Shows whether an app can be cloned to another resource group or + subscription. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} + + def list_sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """This is to allow calling via powershell and ARM template. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} + + def list_metric_definitions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets all metric definitions of an app (or deployment slot, if + specified). + + Gets all metric definitions 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 metric definitions of the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metric_definitions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} + + def list_metrics_slot( + self, resource_group_name, name, slot, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets performance metrics of an app (or deployment slot, if specified). + + Gets performance metrics 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 metrics of the production slot. + :type slot: str + :param details: Specify "true" to include metric details in the + response. It is "false" by default. + :type details: bool + :param filter: Return only metrics 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} + + def get_migrate_my_sql_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Returns the status of MySql in app migration, if one is active, and + whether or not MySql in app is enabled. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} + + def get_swift_virtual_network_connection_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a Swift Virtual Network connection. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a Swift Virtual Network connection from an app (or deployment + slot). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_swift_virtual_network_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def list_network_features_slot( + self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): + """Gets all network features used by the app (or deployment slot, if + specified). + + 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. This can either be "summary" or + "detailed". + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_network_features_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} + + def get_network_trace_operation_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """Start capturing network packets for the site (To be deprecated). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Start capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} + + def stop_web_site_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Stop ongoing capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} + + def get_network_traces_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} + + def get_network_trace_operation_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def get_network_traces_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Generates a new publishing password for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.generate_new_site_publishing_password_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} + + def list_perf_mon_counters_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets perfmon counters for web app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2018_02_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2018_02_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} + + def get_site_php_error_log_flag_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets web app's event logs. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} + + def list_premier_add_ons_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the premier add-ons of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} + + def get_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named add-on of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """Updates a named add-on of an app. + + 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.v2018_02_01.models.PremierAddOn + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a premier add-on from an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """Updates a named add-on of an app. + + 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.v2018_02_01.models.PremierAddOnPatchResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def get_private_access_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets data around private site access enablement and authorized Virtual + Networks that can access the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def put_private_access_vnet_slot( + self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): + """Sets data around private site access enablement and authorized Virtual + Networks that can access the site. + + 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.v2018_02_01.models.PrivateAccess + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def list_processes_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} + + def get_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def delete_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def get_process_dump_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} + + def list_process_modules_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} + + def get_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} + + def get_process_thread_slot( + self, resource_group_name, name, process_id, thread_id, slot, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in 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 thread_id: TID. + :type thread_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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_process_thread_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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'), + 'threadId': self._serialize.url("thread_id", thread_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessThreadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'} + + def list_public_certificates_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get public certificates for an app or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2018_02_01.models.PublicCertificatePaged[~azure.mgmt.web.v2018_02_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} + + def get_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Get the named public certificate for an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate_slot( + self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + 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.v2018_02_01.models.PublicCertificate + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets_slot( + self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the publishing profile for an app (or deployment slot, if + specified). + + 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 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.v2018_02_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the + DisasterRecover endpoint if true + :type include_disaster_recovery_endpoints: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} + + def reset_slot_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Resets the configuration settings of the current slot if they were + previously modified by calling the API with POST. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} + + def restart_slot( + self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """Restarts an app (or deployment slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} + + + def _restore_from_backup_blob_slot_initial( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores an app from a backup blob in Azure Storage. + + 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.v2018_02_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_from_backup_blob_slot_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a deleted web app to this web app. + + 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.v2018_02_01.models.DeletedAppRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_from_deleted_app_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} + + + def _restore_snapshot_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a web app from a snapshot. + + 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.v2018_02_01.models.SnapshotRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_snapshot_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} + + def list_site_extensions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get list of siteextensions for a web site, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} + + def get_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """Get site extension information by its ID for a web site, or a + deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_slot_initial( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Install site extension on a web site, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo]] + :raises: :class:`CloudError` + """ + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def delete_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """Remove a site extension from a web site, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def list_slot_differences_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Get the difference in configuration settings between two web app slots. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SlotDifferencePaged[~azure.mgmt.web.v2018_02_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} + + + def _swap_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """Swaps two deployment slots of an app. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._swap_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} + + def list_snapshots_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Returns all Snapshots to the user. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SnapshotPaged[~azure.mgmt.web.v2018_02_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} + + def list_snapshots_from_dr_secondary_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Returns all Snapshots to the user from DRSecondary endpoint. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SnapshotPaged[~azure.mgmt.web.v2018_02_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} + + def get_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the source control configuration of an app. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + + def _create_or_update_source_control_slot_initial( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the source control configuration of an app. + + 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.v2018_02_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def delete_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes the source control configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + """Updates the source control configuration of an app. + + 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.v2018_02_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def start_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Starts an app (or deployment slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} + + + def _start_network_trace_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Start capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} + + def stop_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Stops an app (or deployment slot, if specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} + + def stop_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Stop ongoing capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} + + def sync_repository_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Sync web app repository. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_repository_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} + + def sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Syncs function trigger metadata to the management database. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} + + def list_triggered_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List triggered web jobs for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2018_02_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} + + def get_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a triggered web job by its ID for an app, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a triggered web job by its ID for an app, or a deployment slot. + + 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 a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """List a triggered web job's history for an app, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a triggered web job's history by its ID for an app, , or a + deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def run_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Run a triggered web job for an app, or a deployment slot. + + 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 deletes a deployment for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.run_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} + + def list_usages_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets the quota usage information of an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} + + def list_vnet_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the virtual networks the app (or deployment slot) is connected to. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} + + def get_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a virtual network the app (or deployment slot) is connected to by + name. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Adds a Virtual Network connection to an app or slot (PUT) or updates + the connection properties (PATCH). + + 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.v2018_02_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a connection from an app (or deployment slot to a named virtual + network. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Adds a Virtual Network connection to an app or slot (PUT) or updates + the connection properties (PATCH). + + 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.v2018_02_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets an app's Virtual Network gateway. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Adds a gateway to a connected Virtual Network (PUT) or updates it + (PATCH). + + 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.v2018_02_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Adds a gateway to a connected Virtual Network (PUT) or updates it + (PATCH). + + 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.v2018_02_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List webjobs for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2018_02_01.models.WebJobPaged[~azure.mgmt.web.v2018_02_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} + + def get_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """Get webjob information for an app, or a deployment slot. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} + + def list_slot_differences_from_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Get the difference in configuration settings between two web app slots. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SlotDifferencePaged[~azure.mgmt.web.v2018_02_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_from_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} + + + def _swap_slot_with_production_initial( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_with_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_with_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """Swaps two deployment slots of an app. + + 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} + + def list_snapshots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Returns all Snapshots to the user. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SnapshotPaged[~azure.mgmt.web.v2018_02_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} + + def list_snapshots_from_dr_secondary( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Returns all Snapshots to the user from DRSecondary endpoint. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SnapshotPaged[~azure.mgmt.web.v2018_02_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} + + def get_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the source control configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + + def _create_or_update_source_control_initial( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the source control configuration of an app. + + 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.v2018_02_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def delete_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Deletes the source control configuration of an app. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + """Updates the source control configuration of an app. + + 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.v2018_02_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def start( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Starts an app (or deployment slot, if specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} + + + def _start_network_trace_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Start capturing network packets for the site. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} + + def stop( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Stops an app (or deployment slot, if specified). + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} + + def stop_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Stop ongoing capturing network packets for the site. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} + + def sync_repository( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Sync web app repository. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_repository.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} + + def sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Syncs function trigger metadata to the management database. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} + + def list_triggered_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List triggered web jobs for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2018_02_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} + + def get_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Gets a triggered web job by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Delete a triggered web job by its ID for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """List a triggered web job's history for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history( + self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): + """Gets a triggered web job's history by its ID for an app, , or a + deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} + + def run_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Run a triggered web job for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.run_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets the quota usage information of an app (or deployment slot, if + specified). + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} + + def list_vnet_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the virtual networks the app (or deployment slot) is connected to. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} + + def get_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """Gets a virtual network the app (or deployment slot) is connected to by + name. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Adds a Virtual Network connection to an app or slot (PUT) or updates + the connection properties (PATCH). + + 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.v2018_02_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """Deletes a connection from an app (or deployment slot to a named virtual + network. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Adds a Virtual Network connection to an app or slot (PUT) or updates + the connection properties (PATCH). + + 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.v2018_02_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """Gets an app's Virtual Network gateway. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Adds a gateway to a connected Virtual Network (PUT) or updates it + (PATCH). + + 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.v2018_02_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Adds a gateway to a connected Virtual Network (PUT) or updates it + (PATCH). + + 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.v2018_02_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """List webjobs for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2018_02_01.models.WebJobPaged[~azure.mgmt.web.v2018_02_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} + + def get_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """Get webjob information for an app, or a deployment slot. + + 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_site_management_client_operations.py new file mode 100644 index 00000000000..1b6dd1aa23a --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_site_management_client_operations.py @@ -0,0 +1,1129 @@ +# 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 msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from .. import models +import uuid + + +class WebSiteManagementClientOperationsMixin(object): + + def get_publishing_user( + self, custom_headers=None, raw=False, **operation_config): + """Gets publishing user. + + Gets publishing user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def update_publishing_user( + self, user_details, custom_headers=None, raw=False, **operation_config): + """Updates publishing user. + + Updates publishing user. + + :param user_details: Details of publishing user + :type user_details: ~azure.mgmt.web.v2018_02_01.models.User + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(user_details, 'User') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def list_source_controls( + self, custom_headers=None, raw=False, **operation_config): + """Gets the source controls available for Azure websites. + + Gets the source controls available for Azure websites. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.web.v2018_02_01.models.SourceControlPaged[~azure.mgmt.web.v2018_02_01.models.SourceControl] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_source_controls.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} + + def get_source_control( + self, source_control_type, custom_headers=None, raw=False, **operation_config): + """Gets source control token. + + Gets source control token. + + :param source_control_type: Type of source control + :type source_control_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def update_source_control( + self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): + """Updates source control token. + + 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.v2018_02_01.models.SourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request_message, 'SourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def list_billing_meters( + self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of meters for a given location. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BillingMeter + :rtype: + ~azure.mgmt.web.v2018_02_01.models.BillingMeterPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeter] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_billing_meters.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} + + def check_name_availability( + self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): + """Check if a resource name is available. + + Check if a resource name is available. + + :param name: Resource name to verify. + :type name: str + :param type: 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.v2018_02_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceNameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) + + # Construct URL + url = self.check_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceNameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} + + def get_subscription_deployment_locations( + self, custom_headers=None, raw=False, **operation_config): + """Gets list of available geo regions plus ministamps. + + Gets list of available geo regions plus ministamps. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentLocations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.DeploymentLocations or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_subscription_deployment_locations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeploymentLocations', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} + + def list_geo_regions( + self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + """Get a list of available geographical regions. + + Get a list of available geographical regions. + + :param sku: Name of SKU used to filter the regions. Possible values + include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', + 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + :type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName + :param linux_workers_enabled: Specify true if you want to + filter to only regions that support Linux workers. + :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify true if you want to + filter to only regions that support Xenon workers. + :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify true if you + want to filter to only regions that support Linux Consumption Workers. + :type linux_dynamic_workers_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GeoRegion + :rtype: + ~azure.mgmt.web.v2018_02_01.models.GeoRegionPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegion] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_geo_regions.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} + + def list_site_identifiers_assigned_to_host_name( + self, name=None, custom_headers=None, raw=False, **operation_config): + """List all apps that are assigned to a hostname. + + List all apps that are assigned to a hostname. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2018_02_01.models.IdentifierPaged[~azure.mgmt.web.v2018_02_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} + + def list_premier_add_on_offers( + self, custom_headers=None, raw=False, **operation_config): + """List all premier add-on offers. + + List all premier add-on offers. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PremierAddOnOffer + :rtype: + ~azure.mgmt.web.v2018_02_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2018_02_01.models.PremierAddOnOffer] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_premier_add_on_offers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} + + def list_skus( + self, custom_headers=None, raw=False, **operation_config): + """List all SKUs. + + List all SKUs. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SkuInfos or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.SkuInfos or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SkuInfos', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} + + def verify_hosting_environment_vnet( + self, parameters, custom_headers=None, raw=False, **operation_config): + """Verifies if this VNET is compatible with an App Service Environment by + analyzing the Network Security Group rules. + + 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.v2018_02_01.models.VnetParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetValidationFailureDetails or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2018_02_01.models.VnetValidationFailureDetails or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_hosting_environment_vnet.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VnetParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetValidationFailureDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} + + def move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """Move resources between resource groups. + + 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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} + + def validate( + self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): + """Validate if a resource can be created. + + 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.v2018_02_01.models.ValidateRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_02_01.models.ValidateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_request, 'ValidateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} + + def validate_container_settings( + self, validate_container_settings_request, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Validate if the container settings are correct. + + Validate if the container settings are correct. + + :param validate_container_settings_request: + :type validate_container_settings_request: + ~azure.mgmt.web.v2018_02_01.models.ValidateContainerSettingsRequest + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate_container_settings.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_container_settings_request, 'ValidateContainerSettingsRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_container_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validateContainerSettings'} + + def validate_move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """Validate whether a resource can be moved. + + 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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.validate_move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/version.py @@ -0,0 +1,13 @@ +# 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_web_site_management_client.py new file mode 100644 index 00000000000..67eb48a12b0 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_web_site_management_client.py @@ -0,0 +1,50 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import CertificatesOperations +from . import models + + +class WebSiteManagementClient(SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.web.v2018_11_01.operations.CertificatesOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-11-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.certificates = CertificatesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/__init__.py new file mode 100644 index 00000000000..7558f02f8c2 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/__init__.py @@ -0,0 +1,216 @@ +# 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 ApiDefinitionInfo + from ._models_py3 import AppServicePlan + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import AzureStorageInfoValue + from ._models_py3 import Capability + from ._models_py3 import Certificate + from ._models_py3 import CertificatePatchResource + from ._models_py3 import CloningInfo + from ._models_py3 import ConnStringInfo + from ._models_py3 import CorsSettings + from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException + from ._models_py3 import DefaultErrorResponseError + from ._models_py3 import DefaultErrorResponseErrorDetailsItem + from ._models_py3 import DeletedSite + from ._models_py3 import Experiments + from ._models_py3 import GeoDistribution + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostNameSslState + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import Identifier + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models_py3 import NameValuePair + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import Site + from ._models_py3 import SiteConfig + from ._models_py3 import SiteLimits + from ._models_py3 import SiteMachineKey + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuDescription + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import Snapshot + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import User + from ._models_py3 import VirtualApplication + from ._models_py3 import VirtualDirectory + from ._models_py3 import VnetGateway + from ._models_py3 import VnetInfo + from ._models_py3 import VnetRoute +except (SyntaxError, ImportError): + from ._models import ApiDefinitionInfo + from ._models import AppServicePlan + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import AzureStorageInfoValue + from ._models import Capability + from ._models import Certificate + from ._models import CertificatePatchResource + from ._models import CloningInfo + from ._models import ConnStringInfo + from ._models import CorsSettings + from ._models import DefaultErrorResponse, DefaultErrorResponseException + from ._models import DefaultErrorResponseError + from ._models import DefaultErrorResponseErrorDetailsItem + from ._models import DeletedSite + from ._models import Experiments + from ._models import GeoDistribution + from ._models import HandlerMapping + from ._models import HostingEnvironmentProfile + from ._models import HostNameSslState + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import Identifier + from ._models import IpSecurityRestriction + from ._models import ManagedServiceIdentity + from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models import NameValuePair + from ._models import ProxyOnlyResource + from ._models import PushSettings + from ._models import RampUpRule + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import Site + from ._models import SiteConfig + from ._models import SiteLimits + from ._models import SiteMachineKey + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import Snapshot + from ._models import StatusCodesBasedTrigger + from ._models import User + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetRoute +from ._paged_models import CertificatePaged +from ._web_site_management_client_enums import ( + KeyVaultSecretStatus, + RouteType, + ManagedServiceIdentityType, + IpFilterTag, + AutoHealActionType, + ConnectionStringType, + AzureStorageType, + AzureStorageState, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + FtpsState, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + RedundancyMode, + StatusOptions, + ProvisioningState, +) + +__all__ = [ + 'ApiDefinitionInfo', + 'AppServicePlan', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'AzureStorageInfoValue', + 'Capability', + 'Certificate', + 'CertificatePatchResource', + 'CloningInfo', + 'ConnStringInfo', + 'CorsSettings', + 'DefaultErrorResponse', 'DefaultErrorResponseException', + 'DefaultErrorResponseError', + 'DefaultErrorResponseErrorDetailsItem', + 'DeletedSite', + 'Experiments', + 'GeoDistribution', + 'HandlerMapping', + 'HostingEnvironmentProfile', + 'HostNameSslState', + 'HybridConnection', + 'HybridConnectionKey', + 'Identifier', + 'IpSecurityRestriction', + 'ManagedServiceIdentity', + 'ManagedServiceIdentityUserAssignedIdentitiesValue', + 'NameValuePair', + 'ProxyOnlyResource', + 'PushSettings', + 'RampUpRule', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'Site', + 'SiteConfig', + 'SiteLimits', + 'SiteMachineKey', + 'SkuCapacity', + 'SkuDescription', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'Snapshot', + 'StatusCodesBasedTrigger', + 'User', + 'VirtualApplication', + 'VirtualDirectory', + 'VnetGateway', + 'VnetInfo', + 'VnetRoute', + 'CertificatePaged', + 'KeyVaultSecretStatus', + 'RouteType', + 'ManagedServiceIdentityType', + 'IpFilterTag', + 'AutoHealActionType', + 'ConnectionStringType', + 'AzureStorageType', + 'AzureStorageState', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'FtpsState', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'RedundancyMode', + 'StatusOptions', + 'ProvisioningState', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models.py new file mode 100644 index 00000000000..6edea73571f --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models.py @@ -0,0 +1,2750 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ApiDefinitionInfo(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 Resource(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: 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.get('location', None) + self.type = None + self.tags = kwargs.get('tags', None) + + +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: Resource tags. + :type tags: dict[str, 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.v2018_11_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.v2018_11_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2018_11_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2018_11_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, 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.sku = kwargs.get('sku', None) + + +class AutoHealActions(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.v2018_11_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2018_11_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': 'AutoHealActionType'}, + '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(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(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.v2018_11_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2018_11_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2018_11_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.v2018_11_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2018_11_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) + + +class AzureStorageInfoValue(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.v2018_11_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' + :vartype state: str or + ~azure.mgmt.web.v2018_11_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + 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 Capability(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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2018_11_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.v2018_11_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', '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) + + +class ProxyOnlyResource(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 CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2018_11_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.v2018_11_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', '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) + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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.get('source_web_app_id', None) + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2018_11_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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 CorsSettings(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 DefaultErrorResponse(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.v2018_11_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 DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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.v2018_11_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(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 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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_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.deleted_site_kind = None + self.geo_region_name = None + + +class Experiments(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2018_11_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 GeoDistribution(Model): + """A global distribution definition. + + :param location: Location. + :type location: str + :param number_of_workers: NumberOfWorkers. + :type number_of_workers: int + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GeoDistribution, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.number_of_workers = kwargs.get('number_of_workers', None) + + +class HandlerMapping(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 HostingEnvironmentProfile(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 HostNameSslState(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.v2018_11_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 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.v2018_11_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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 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 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 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identifier, self).__init__(**kwargs) + self.identifier_id = kwargs.get('identifier_id', None) + + +class IpSecurityRestriction(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' + :type tag: str or ~azure.mgmt.web.v2018_11_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 + """ + + _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': 'IpFilterTag'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', '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) + + +class ManagedServiceIdentity(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.v2018_11_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.v2018_11_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _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': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class NameValuePair(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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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 RequestsBasedTrigger(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 ResourceMetricAvailability(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.v2018_11_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 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: Resource tags. + :type tags: dict[str, str] + :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.v2018_11_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2018_11_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.v2018_11_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2018_11_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2018_11_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param client_cert_exclusion_paths: client certificate authentication + comma-separated exclusion paths + :type client_cert_exclusion_paths: str + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2018_11_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: true if the app is a default + container; otherwise, 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.v2018_11_01.models.SlotSwapStatus + :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.v2018_11_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 geo_distributions: GeoDistributions for this site + :type geo_distributions: + list[~azure.mgmt.web.v2018_11_01.models.GeoDistribution] + :param identity: + :type identity: ~azure.mgmt.web.v2018_11_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) + self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.geo_distributions = kwargs.get('geo_distributions', None) + self.identity = kwargs.get('identity', None) + + +class SiteConfig(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. Default value: + "v4.6" . + :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 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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2018_11_01.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2018_11_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2018_11_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2018_11_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2018_11_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' + :type scm_type: str or ~azure.mgmt.web.v2018_11_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2018_11_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2018_11_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2018_11_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2018_11_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2018_11_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2018_11_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2018_11_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2018_11_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2018_11_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2018_11_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2018_11_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. Default value: True . + :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.v2018_11_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.v2018_11_01.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, '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'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'reservedInstanceCount', '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.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.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', 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.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.ftps_state = kwargs.get('ftps_state', None) + self.reserved_instance_count = kwargs.get('reserved_instance_count', None) + + +class SiteLimits(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 SiteMachineKey(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 SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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.v2018_11_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.v2018_11_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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.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 StatusCodesBasedTrigger(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 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'}, + '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.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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 VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2018_11_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(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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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.v2018_11_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 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.v2018_11_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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models_py3.py new file mode 100644 index 00000000000..77ef8bba271 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models_py3.py @@ -0,0 +1,2750 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class Resource(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: 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: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.location = location + self.type = None + self.tags = tags + + +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: Resource tags. + :type tags: dict[str, 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.v2018_11_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.v2018_11_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2018_11_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2018_11_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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.sku = sku + + +class AutoHealActions(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.v2018_11_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2018_11_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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.v2018_11_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2018_11_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2018_11_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.v2018_11_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2018_11_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +class AzureStorageInfoValue(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.v2018_11_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' + :vartype state: str or + ~azure.mgmt.web.v2018_11_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: + 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 Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + 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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2018_11_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.v2018_11_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + } + + def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: + 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 + + +class ProxyOnlyResource(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: str=None, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = None + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2018_11_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.v2018_11_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + } + + def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: + 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 + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnStringInfo(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.v2018_11_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.support_credentials = support_credentials + + +class DefaultErrorResponse(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.v2018_11_01.models.DefaultErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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.v2018_11_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=None, **kwargs) -> None: + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(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) -> None: + super(DefaultErrorResponseErrorDetailsItem, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = 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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, + 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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.deleted_site_kind = None + self.geo_region_name = None + + +class Experiments(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2018_11_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class GeoDistribution(Model): + """A global distribution definition. + + :param location: Location. + :type location: str + :param number_of_workers: NumberOfWorkers. + :type number_of_workers: int + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, number_of_workers: int=None, **kwargs) -> None: + super(GeoDistribution, self).__init__(**kwargs) + self.location = location + self.number_of_workers = number_of_workers + + +class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostNameSslState(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.v2018_11_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 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.v2018_11_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) + self.send_key_name = None + self.send_key_value = 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 identifier_id: String representation of the identity. + :type identifier_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'}, + 'identifier_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.identifier_id = identifier_id + + +class IpSecurityRestriction(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' + :type tag: str or ~azure.mgmt.web.v2018_11_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 + """ + + _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': 'IpFilterTag'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, **kwargs) -> None: + 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 + + +class ManagedServiceIdentity(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.v2018_11_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.v2018_11_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _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': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = user_assigned_identities + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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) -> None: + super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + MinReroutePercentage or MaxReroutePercentage. + Site metrics are checked every N minutes specified in + ChangeIntervalInMinutes. + Custom decision algorithm can be provided in TiPCallback site extension + which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +class ResourceMetricAvailability(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) -> None: + 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.v2018_11_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: str=None, **kwargs) -> None: + 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 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: Resource tags. + :type tags: dict[str, str] + :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.v2018_11_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2018_11_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.v2018_11_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2018_11_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2018_11_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param client_cert_exclusion_paths: client certificate authentication + comma-separated exclusion paths + :type client_cert_exclusion_paths: str + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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. 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 + :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.v2018_11_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: true if the app is a default + container; otherwise, 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.v2018_11_01.models.SlotSwapStatus + :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.v2018_11_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 geo_distributions: GeoDistributions for this site + :type geo_distributions: + list[~azure.mgmt.web.v2018_11_01.models.GeoDistribution] + :param identity: + :type identity: ~azure.mgmt.web.v2018_11_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, geo_distributions=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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_exclusion_paths = client_cert_exclusion_paths + self.host_names_disabled = host_names_disabled + 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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.geo_distributions = geo_distributions + self.identity = identity + + +class SiteConfig(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. Default value: + "v4.6" . + :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 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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2018_11_01.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2018_11_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2018_11_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2018_11_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2018_11_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' + :type scm_type: str or ~azure.mgmt.web.v2018_11_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2018_11_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2018_11_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2018_11_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2018_11_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2018_11_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2018_11_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2018_11_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2018_11_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2018_11_01.models.ApiDefinitionInfo + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2018_11_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2018_11_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. Default value: True . + :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.v2018_11_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.v2018_11_01.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, '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'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'reservedInstanceCount', 'type': 'int'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: + 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.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.cors = cors + self.push = push + self.api_definition = api_definition + 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.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.ftps_state = ftps_state + self.reserved_instance_count = reserved_instance_count + + +class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + super(SiteMachineKey, self).__init__(**kwargs) + self.validation = validation + self.validation_key = validation_key + self.decryption = decryption + self.decryption_key = decryption_key + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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.v2018_11_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.v2018_11_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + 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: str=None, **kwargs) -> None: + super(Snapshot, self).__init__(kind=kind, **kwargs) + self.time = None + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + self.count = count + self.time_interval = time_interval + + +class User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: + 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 VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2018_11_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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.v2018_11_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: + 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 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.v2018_11_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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + super(VnetRoute, self).__init__(kind=kind, **kwargs) + self.start_address = start_address + self.end_address = end_address + self.route_type = route_type diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_paged_models.py new file mode 100644 index 00000000000..596f67f1794 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_paged_models.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class CertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`Certificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Certificate]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificatePaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..13703438d9e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_web_site_management_client_enums.py @@ -0,0 +1,180 @@ +# 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 + + +class KeyVaultSecretStatus(str, Enum): + + 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 RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" + + +class IpFilterTag(str, Enum): + + default = "Default" + xff_proxy = "XffProxy" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 AzureStorageType(str, Enum): + + azure_files = "AzureFiles" + azure_blob = "AzureBlob" + + +class AzureStorageState(str, Enum): + + ok = "Ok" + invalid_credentials = "InvalidCredentials" + invalid_share = "InvalidShare" + + +class ScmType(str, Enum): + + 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" + + +class ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class FtpsState(str, Enum): + + all_allowed = "AllAllowed" + ftps_only = "FtpsOnly" + disabled = "Disabled" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class RedundancyMode(str, Enum): + + none = "None" + manual = "Manual" + failover = "Failover" + active_active = "ActiveActive" + geo_redundant = "GeoRedundant" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/__init__.py new file mode 100644 index 00000000000..4ae1c595329 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/__init__.py @@ -0,0 +1,16 @@ +# 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 ._certificates_operations import CertificatesOperations + +__all__ = [ + 'CertificatesOperations', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/_certificates_operations.py new file mode 100644 index 00000000000..f17fd25713e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/_certificates_operations.py @@ -0,0 +1,439 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all certificates for a subscription. + + Get all certificates for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2018_11_01.models.CertificatePaged[~azure.mgmt.web.v2018_11_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all certificates in a resource group. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2018_11_01.models.CertificatePaged[~azure.mgmt.web.v2018_11_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get a certificate. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_11_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def create_or_update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate. + + 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.v2018_11_01.models.Certificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_11_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'Certificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Delete a certificate. + + 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate. + + 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.v2018_11_01.models.CertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2018_11_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/version.py @@ -0,0 +1,13 @@ +# 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py new file mode 100644 index 00000000000..35bbe570223 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py @@ -0,0 +1,126 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import WebSiteManagementClientOperationsMixin +from .operations import AppServiceCertificateOrdersOperations +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 ProviderOperations +from .operations import RecommendationsOperations +from .operations import WebAppsOperations +from .operations import StaticSitesOperations +from .operations import AppServiceEnvironmentsOperations +from .operations import AppServicePlansOperations +from .operations import ResourceHealthMetadataOperations +from .operations import KubeEnvironmentsOperations +from . import models + + +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar app_service_certificate_orders: AppServiceCertificateOrders operations + :vartype app_service_certificate_orders: azure.mgmt.web.v2019_08_01.operations.AppServiceCertificateOrdersOperations + :ivar certificate_registration_provider: CertificateRegistrationProvider operations + :vartype certificate_registration_provider: azure.mgmt.web.v2019_08_01.operations.CertificateRegistrationProviderOperations + :ivar domains: Domains operations + :vartype domains: azure.mgmt.web.v2019_08_01.operations.DomainsOperations + :ivar top_level_domains: TopLevelDomains operations + :vartype top_level_domains: azure.mgmt.web.v2019_08_01.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProvider operations + :vartype domain_registration_provider: azure.mgmt.web.v2019_08_01.operations.DomainRegistrationProviderOperations + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.web.v2019_08_01.operations.CertificatesOperations + :ivar deleted_web_apps: DeletedWebApps operations + :vartype deleted_web_apps: azure.mgmt.web.v2019_08_01.operations.DeletedWebAppsOperations + :ivar diagnostics: Diagnostics operations + :vartype diagnostics: azure.mgmt.web.v2019_08_01.operations.DiagnosticsOperations + :ivar provider: Provider operations + :vartype provider: azure.mgmt.web.v2019_08_01.operations.ProviderOperations + :ivar recommendations: Recommendations operations + :vartype recommendations: azure.mgmt.web.v2019_08_01.operations.RecommendationsOperations + :ivar web_apps: WebApps operations + :vartype web_apps: azure.mgmt.web.v2019_08_01.operations.WebAppsOperations + :ivar static_sites: StaticSites operations + :vartype static_sites: azure.mgmt.web.v2019_08_01.operations.StaticSitesOperations + :ivar app_service_environments: AppServiceEnvironments operations + :vartype app_service_environments: azure.mgmt.web.v2019_08_01.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlans operations + :vartype app_service_plans: azure.mgmt.web.v2019_08_01.operations.AppServicePlansOperations + :ivar resource_health_metadata: ResourceHealthMetadata operations + :vartype resource_health_metadata: azure.mgmt.web.v2019_08_01.operations.ResourceHealthMetadataOperations + :ivar kube_environments: KubeEnvironments operations + :vartype kube_environments: azure.mgmt.web.v2019_08_01.operations.KubeEnvironmentsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-08-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( + 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.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) + self.kube_environments = KubeEnvironmentsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py new file mode 100644 index 00000000000..5ddd6c68d24 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py @@ -0,0 +1,1049 @@ +# 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 AnalysisData + from ._models_py3 import AnalysisDefinition + from ._models_py3 import ApiDefinitionInfo + from ._models_py3 import ApiKVReference + from ._models_py3 import ApiManagementConfig + from ._models_py3 import ApplicationLogsConfig + from ._models_py3 import ApplicationStack + from ._models_py3 import ApplicationStackResource + from ._models_py3 import AppServiceCertificate + from ._models_py3 import AppServiceCertificateOrder + from ._models_py3 import AppServiceCertificateOrderPatchResource + from ._models_py3 import AppServiceCertificatePatchResource + from ._models_py3 import AppServiceCertificateResource + from ._models_py3 import AppServiceEnvironment + from ._models_py3 import AppServiceEnvironmentPatchResource + from ._models_py3 import AppServiceEnvironmentResource + from ._models_py3 import AppServicePlan + from ._models_py3 import AppServicePlanPatchResource + from ._models_py3 import ArmIdWrapper + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import AzureBlobStorageApplicationLogsConfig + from ._models_py3 import AzureBlobStorageHttpLogsConfig + from ._models_py3 import AzureStorageInfoValue + from ._models_py3 import AzureStoragePropertyDictionaryResource + from ._models_py3 import AzureTableStorageApplicationLogsConfig + from ._models_py3 import BackupItem + from ._models_py3 import BackupRequest + from ._models_py3 import BackupSchedule + from ._models_py3 import BillingMeter + from ._models_py3 import Capability + from ._models_py3 import Certificate + from ._models_py3 import CertificateDetails + from ._models_py3 import CertificateEmail + from ._models_py3 import CertificateOrderAction + from ._models_py3 import CertificatePatchResource + from ._models_py3 import CloningInfo + from ._models_py3 import ConnectionStringDictionary + from ._models_py3 import ConnStringInfo + from ._models_py3 import ConnStringValueTypePair + 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 CorsSettings + from ._models_py3 import CsmCopySlotEntity + from ._models_py3 import CsmMoveResourceEnvelope + from ._models_py3 import CsmOperationDescription + from ._models_py3 import CsmOperationDescriptionProperties + from ._models_py3 import CsmOperationDisplay + from ._models_py3 import CsmPublishingProfileOptions + from ._models_py3 import CsmSlotEntity + from ._models_py3 import CsmUsageQuota + from ._models_py3 import CustomHostnameAnalysisResult + from ._models_py3 import DatabaseBackupSetting + from ._models_py3 import DataSource + from ._models_py3 import DataTableResponseColumn + from ._models_py3 import DataTableResponseObject + from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException + from ._models_py3 import DefaultErrorResponseError + from ._models_py3 import DefaultErrorResponseErrorDetailsItem + from ._models_py3 import DeletedAppRestoreRequest + from ._models_py3 import DeletedSite + from ._models_py3 import Deployment + 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 DiagnosticAnalysis + from ._models_py3 import DiagnosticCategory + from ._models_py3 import DiagnosticData + 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 DomainControlCenterSsoRequest + from ._models_py3 import DomainOwnershipIdentifier + 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 FileSystemApplicationLogsConfig + from ._models_py3 import FileSystemHttpLogsConfig + from ._models_py3 import FunctionEnvelope + from ._models_py3 import FunctionSecrets + from ._models_py3 import GeoRegion + from ._models_py3 import GlobalCsmSkuDescription + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentDeploymentInfo + from ._models_py3 import HostingEnvironmentDiagnostics + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostKeys + from ._models_py3 import HostName + from ._models_py3 import HostNameBinding + from ._models_py3 import HostNameSslState + from ._models_py3 import HttpLogsConfig + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import HybridConnectionLimits + from ._models_py3 import Identifier + from ._models_py3 import InboundEnvironmentEndpoint + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import KeyInfo + from ._models_py3 import KeyVaultReferenceCollection + from ._models_py3 import KeyVaultReferenceResource + from ._models_py3 import KubeEnvironmentProfile + from ._models_py3 import KubeEnvironmentResource + from ._models_py3 import KubeNodePool + from ._models_py3 import LocalizableString + from ._models_py3 import LogSpecification + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricSpecification + from ._models_py3 import MigrateMySqlRequest + from ._models_py3 import MigrateMySqlStatus + from ._models_py3 import MSDeploy + from ._models_py3 import MSDeployLog + from ._models_py3 import MSDeployLogEntry + from ._models_py3 import MSDeployStatus + from ._models_py3 import NameIdentifier + from ._models_py3 import NameValuePair + from ._models_py3 import NetworkAccessControlEntry + from ._models_py3 import NetworkFeatures + from ._models_py3 import NetworkTrace + from ._models_py3 import Operation + from ._models_py3 import OutboundEnvironmentEndpoint + 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 PremierAddOnPatchResource + from ._models_py3 import PrivateAccess + from ._models_py3 import PrivateAccessSubnet + from ._models_py3 import PrivateAccessVirtualNetwork + from ._models_py3 import PrivateEndpointConnectionResource + 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 ProcessModuleInfo + from ._models_py3 import ProcessThreadInfo + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PublicCertificate + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import Recommendation + from ._models_py3 import RecommendationRule + from ._models_py3 import ReissueCertificateOrderRequest + from ._models_py3 import RelayServiceConnectionEntity + from ._models_py3 import Rendering + from ._models_py3 import RenewCertificateOrderRequest + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceHealthMetadata + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceNameAvailability + from ._models_py3 import ResourceNameAvailabilityRequest + from ._models_py3 import ResponseMetaData + from ._models_py3 import RestoreRequest + from ._models_py3 import ServiceSpecification + from ._models_py3 import Site + from ._models_py3 import SiteAuthSettings + from ._models_py3 import SiteCloneability + from ._models_py3 import SiteCloneabilityCriterion + from ._models_py3 import SiteConfig + from ._models_py3 import SiteConfigResource + from ._models_py3 import SiteConfigurationSnapshotInfo + from ._models_py3 import SiteExtensionInfo + from ._models_py3 import SiteInstance + 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 SkuInfos + from ._models_py3 import SlotConfigNamesResource + from ._models_py3 import SlotDifference + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotRecoverySource + from ._models_py3 import SnapshotRestoreRequest + from ._models_py3 import Solution + from ._models_py3 import SourceControl + from ._models_py3 import StackMajorVersion + from ._models_py3 import StackMinorVersion + from ._models_py3 import StampCapacity + from ._models_py3 import StaticSiteARMResource + from ._models_py3 import StaticSiteBuildARMResource + from ._models_py3 import StaticSiteBuildProperties + from ._models_py3 import StaticSiteCustomDomainOverviewARMResource + from ._models_py3 import StaticSiteFunctionOverviewARMResource + from ._models_py3 import StaticSitePatchResource + from ._models_py3 import StaticSiteResetPropertiesARMResource + from ._models_py3 import StaticSiteUserARMResource + from ._models_py3 import StaticSiteUserInvitationRequestResource + from ._models_py3 import StaticSiteUserInvitationResponseResource + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import StorageMigrationOptions + from ._models_py3 import StorageMigrationResponse + from ._models_py3 import StringDictionary + from ._models_py3 import SwiftVirtualNetwork + from ._models_py3 import TldLegalAgreement + from ._models_py3 import TopLevelDomain + from ._models_py3 import TopLevelDomainAgreementOption + from ._models_py3 import TriggeredJobHistory + from ._models_py3 import TriggeredJobRun + from ._models_py3 import TriggeredWebJob + from ._models_py3 import Usage + 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 WebJob + from ._models_py3 import WebSiteInstanceStatus + from ._models_py3 import WorkerPool + from ._models_py3 import WorkerPoolResource +except (SyntaxError, ImportError): + from ._models import AbnormalTimePeriod + from ._models import Address + from ._models import AddressResponse + from ._models import AnalysisData + from ._models import AnalysisDefinition + from ._models import ApiDefinitionInfo + from ._models import ApiKVReference + from ._models import ApiManagementConfig + from ._models import ApplicationLogsConfig + from ._models import ApplicationStack + from ._models import ApplicationStackResource + from ._models import AppServiceCertificate + from ._models import AppServiceCertificateOrder + from ._models import AppServiceCertificateOrderPatchResource + from ._models import AppServiceCertificatePatchResource + from ._models import AppServiceCertificateResource + from ._models import AppServiceEnvironment + from ._models import AppServiceEnvironmentPatchResource + from ._models import AppServiceEnvironmentResource + from ._models import AppServicePlan + from ._models import AppServicePlanPatchResource + from ._models import ArmIdWrapper + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import AzureBlobStorageApplicationLogsConfig + from ._models import AzureBlobStorageHttpLogsConfig + from ._models import AzureStorageInfoValue + from ._models import AzureStoragePropertyDictionaryResource + from ._models import AzureTableStorageApplicationLogsConfig + from ._models import BackupItem + from ._models import BackupRequest + from ._models import BackupSchedule + from ._models import BillingMeter + from ._models import Capability + from ._models import Certificate + from ._models import CertificateDetails + from ._models import CertificateEmail + from ._models import CertificateOrderAction + from ._models import CertificatePatchResource + from ._models import CloningInfo + from ._models import ConnectionStringDictionary + from ._models import ConnStringInfo + from ._models import ConnStringValueTypePair + from ._models import Contact + from ._models import ContainerCpuStatistics + from ._models import ContainerCpuUsage + from ._models import ContainerInfo + from ._models import ContainerMemoryStatistics + from ._models import ContainerNetworkInterfaceStatistics + from ._models import ContainerThrottlingData + from ._models import ContinuousWebJob + from ._models import CorsSettings + from ._models import CsmCopySlotEntity + from ._models import CsmMoveResourceEnvelope + from ._models import CsmOperationDescription + from ._models import CsmOperationDescriptionProperties + from ._models import CsmOperationDisplay + from ._models import CsmPublishingProfileOptions + from ._models import CsmSlotEntity + from ._models import CsmUsageQuota + from ._models import CustomHostnameAnalysisResult + from ._models import DatabaseBackupSetting + from ._models import DataSource + from ._models import DataTableResponseColumn + from ._models import DataTableResponseObject + from ._models import DefaultErrorResponse, DefaultErrorResponseException + from ._models import DefaultErrorResponseError + from ._models import DefaultErrorResponseErrorDetailsItem + from ._models import DeletedAppRestoreRequest + from ._models import DeletedSite + from ._models import Deployment + from ._models import DeploymentLocations + from ._models import DetectorAbnormalTimePeriod + from ._models import DetectorDefinition + from ._models import DetectorInfo + from ._models import DetectorResponse + from ._models import DiagnosticAnalysis + from ._models import DiagnosticCategory + from ._models import DiagnosticData + from ._models import DiagnosticDetectorResponse + from ._models import DiagnosticMetricSample + from ._models import DiagnosticMetricSet + from ._models import Dimension + from ._models import Domain + from ._models import DomainAvailabilityCheckResult + from ._models import DomainControlCenterSsoRequest + from ._models import DomainOwnershipIdentifier + from ._models import DomainPatchResource + from ._models import DomainPurchaseConsent + from ._models import DomainRecommendationSearchParameters + from ._models import EnabledConfig + from ._models import EndpointDependency + from ._models import EndpointDetail + from ._models import ErrorEntity + from ._models import Experiments + from ._models import FileSystemApplicationLogsConfig + from ._models import FileSystemHttpLogsConfig + from ._models import FunctionEnvelope + from ._models import FunctionSecrets + from ._models import GeoRegion + from ._models import GlobalCsmSkuDescription + from ._models import HandlerMapping + from ._models import HostingEnvironmentDeploymentInfo + from ._models import HostingEnvironmentDiagnostics + from ._models import HostingEnvironmentProfile + from ._models import HostKeys + from ._models import HostName + from ._models import HostNameBinding + from ._models import HostNameSslState + from ._models import HttpLogsConfig + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import HybridConnectionLimits + from ._models import Identifier + from ._models import InboundEnvironmentEndpoint + from ._models import IpSecurityRestriction + from ._models import KeyInfo + from ._models import KeyVaultReferenceCollection + from ._models import KeyVaultReferenceResource + from ._models import KubeEnvironmentProfile + from ._models import KubeEnvironmentResource + from ._models import KubeNodePool + from ._models import LocalizableString + from ._models import LogSpecification + from ._models import ManagedServiceIdentity + from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models import MetricAvailability + from ._models import MetricSpecification + from ._models import MigrateMySqlRequest + from ._models import MigrateMySqlStatus + from ._models import MSDeploy + from ._models import MSDeployLog + from ._models import MSDeployLogEntry + from ._models import MSDeployStatus + from ._models import NameIdentifier + from ._models import NameValuePair + from ._models import NetworkAccessControlEntry + from ._models import NetworkFeatures + from ._models import NetworkTrace + from ._models import Operation + from ._models import OutboundEnvironmentEndpoint + from ._models import PerfMonResponse + from ._models import PerfMonSample + from ._models import PerfMonSet + from ._models import PremierAddOn + from ._models import PremierAddOnOffer + from ._models import PremierAddOnPatchResource + from ._models import PrivateAccess + from ._models import PrivateAccessSubnet + from ._models import PrivateAccessVirtualNetwork + from ._models import PrivateEndpointConnectionResource + from ._models import PrivateLinkConnectionApprovalRequestResource + from ._models import PrivateLinkConnectionState + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceProperties + from ._models import PrivateLinkResourcesWrapper + from ._models import ProcessInfo + from ._models import ProcessModuleInfo + from ._models import ProcessThreadInfo + from ._models import ProxyOnlyResource + from ._models import PublicCertificate + from ._models import PushSettings + from ._models import RampUpRule + from ._models import Recommendation + from ._models import RecommendationRule + from ._models import ReissueCertificateOrderRequest + from ._models import RelayServiceConnectionEntity + from ._models import Rendering + from ._models import RenewCertificateOrderRequest + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceHealthMetadata + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceNameAvailability + from ._models import ResourceNameAvailabilityRequest + from ._models import ResponseMetaData + from ._models import RestoreRequest + from ._models import ServiceSpecification + from ._models import Site + from ._models import SiteAuthSettings + from ._models import SiteCloneability + from ._models import SiteCloneabilityCriterion + from ._models import SiteConfig + from ._models import SiteConfigResource + from ._models import SiteConfigurationSnapshotInfo + from ._models import SiteExtensionInfo + from ._models import SiteInstance + from ._models import SiteLimits + from ._models import SiteLogsConfig + from ._models import SiteMachineKey + from ._models import SitePatchResource + from ._models import SitePhpErrorLogFlag + from ._models import SiteSeal + from ._models import SiteSealRequest + from ._models import SiteSourceControl + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SkuInfo + from ._models import SkuInfos + from ._models import SlotConfigNamesResource + from ._models import SlotDifference + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import Snapshot + from ._models import SnapshotRecoverySource + from ._models import SnapshotRestoreRequest + from ._models import Solution + from ._models import SourceControl + from ._models import StackMajorVersion + from ._models import StackMinorVersion + from ._models import StampCapacity + from ._models import StaticSiteARMResource + from ._models import StaticSiteBuildARMResource + from ._models import StaticSiteBuildProperties + from ._models import StaticSiteCustomDomainOverviewARMResource + from ._models import StaticSiteFunctionOverviewARMResource + from ._models import StaticSitePatchResource + from ._models import StaticSiteResetPropertiesARMResource + from ._models import StaticSiteUserARMResource + from ._models import StaticSiteUserInvitationRequestResource + from ._models import StaticSiteUserInvitationResponseResource + from ._models import StatusCodesBasedTrigger + from ._models import StorageMigrationOptions + from ._models import StorageMigrationResponse + from ._models import StringDictionary + from ._models import SwiftVirtualNetwork + from ._models import TldLegalAgreement + from ._models import TopLevelDomain + from ._models import TopLevelDomainAgreementOption + from ._models import TriggeredJobHistory + from ._models import TriggeredJobRun + from ._models import TriggeredWebJob + from ._models import Usage + from ._models import User + from ._models import ValidateRequest + from ._models import ValidateResponse + from ._models import ValidateResponseError + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VirtualIPMapping + from ._models import VirtualNetworkProfile + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetParameters + from ._models import VnetRoute + from ._models import VnetValidationFailureDetails + from ._models import VnetValidationTestFailure + from ._models import WebAppCollection + from ._models import WebJob + from ._models import WebSiteInstanceStatus + from ._models import WorkerPool + from ._models import WorkerPoolResource +from ._paged_models import AnalysisDefinitionPaged +from ._paged_models import ApplicationStackResourcePaged +from ._paged_models import AppServiceCertificateOrderPaged +from ._paged_models import AppServiceCertificateResourcePaged +from ._paged_models import AppServiceEnvironmentResourcePaged +from ._paged_models import AppServicePlanPaged +from ._paged_models import BackupItemPaged +from ._paged_models import BillingMeterPaged +from ._paged_models import CertificatePaged +from ._paged_models import ContinuousWebJobPaged +from ._paged_models import CsmOperationDescriptionPaged +from ._paged_models import CsmUsageQuotaPaged +from ._paged_models import DeletedSitePaged +from ._paged_models import DeploymentPaged +from ._paged_models import DetectorDefinitionPaged +from ._paged_models import DetectorResponsePaged +from ._paged_models import DiagnosticCategoryPaged +from ._paged_models import DomainOwnershipIdentifierPaged +from ._paged_models import DomainPaged +from ._paged_models import FunctionEnvelopePaged +from ._paged_models import GeoRegionPaged +from ._paged_models import HostNameBindingPaged +from ._paged_models import HybridConnectionPaged +from ._paged_models import IdentifierPaged +from ._paged_models import InboundEnvironmentEndpointPaged +from ._paged_models import KubeEnvironmentResourcePaged +from ._paged_models import NameIdentifierPaged +from ._paged_models import OutboundEnvironmentEndpointPaged +from ._paged_models import PerfMonResponsePaged +from ._paged_models import PremierAddOnOfferPaged +from ._paged_models import ProcessInfoPaged +from ._paged_models import ProcessModuleInfoPaged +from ._paged_models import ProcessThreadInfoPaged +from ._paged_models import PublicCertificatePaged +from ._paged_models import RecommendationPaged +from ._paged_models import ResourceHealthMetadataPaged +from ._paged_models import ResourceMetricDefinitionPaged +from ._paged_models import SiteConfigResourcePaged +from ._paged_models import SiteConfigurationSnapshotInfoPaged +from ._paged_models import SiteExtensionInfoPaged +from ._paged_models import SiteInstancePaged +from ._paged_models import SitePaged +from ._paged_models import SkuInfoPaged +from ._paged_models import SlotDifferencePaged +from ._paged_models import SnapshotPaged +from ._paged_models import SourceControlPaged +from ._paged_models import StampCapacityPaged +from ._paged_models import StaticSiteARMResourcePaged +from ._paged_models import StaticSiteBuildARMResourcePaged +from ._paged_models import StaticSiteCustomDomainOverviewARMResourcePaged +from ._paged_models import StaticSiteFunctionOverviewARMResourcePaged +from ._paged_models import StaticSiteUserARMResourcePaged +from ._paged_models import StrPaged +from ._paged_models import TldLegalAgreementPaged +from ._paged_models import TopLevelDomainPaged +from ._paged_models import TriggeredJobHistoryPaged +from ._paged_models import TriggeredWebJobPaged +from ._paged_models import UsagePaged +from ._paged_models import WebJobPaged +from ._paged_models import WorkerPoolResourcePaged +from ._web_site_management_client_enums import ( + KeyVaultSecretStatus, + CertificateProductType, + ProvisioningState, + CertificateOrderStatus, + CertificateOrderActionType, + RouteType, + ManagedServiceIdentityType, + IpFilterTag, + AutoHealActionType, + ConnectionStringType, + AzureStorageType, + AzureStorageState, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + FtpsState, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + ClientCertMode, + RedundancyMode, + StatusOptions, + DomainStatus, + AzureResourceType, + CustomHostNameDnsRecordType, + HostNameType, + DnsType, + DomainType, + HostingEnvironmentStatus, + InternalLoadBalancingMode, + ComputeModeOptions, + WorkerSizeOptions, + AccessControlEntryAction, + OperationStatus, + IssueType, + SolutionType, + RenderingType, + ResourceScopeType, + NotificationLevel, + Channels, + AppServicePlanRestrictions, + InAvailabilityReasonType, + CheckNameResourceTypes, + ValidateResourceTypes, + ResolveStatus, + ConfigReferenceSource, + ConfigReferenceLocation, + LogLevel, + BackupItemStatus, + DatabaseType, + FrequencyUnit, + ContinuousWebJobStatus, + WebJobType, + PublishingProfileFormat, + DnsVerificationTestResult, + MSDeployLogEntryType, + MSDeployProvisioningState, + MySqlMigrationType, + PublicCertificateLocation, + BackupRestoreOperationType, + UnauthenticatedClientAction, + BuiltInAuthenticationProvider, + CloneAbilityResult, + SiteExtensionType, + TriggeredWebJobStatus, + SiteRuntimeState, + BuildStatus, + TriggerTypes, + K8SEProvisioningState, + K8SENetworkPlugin, + SkuName, +) + +__all__ = [ + 'AbnormalTimePeriod', + 'Address', + 'AddressResponse', + 'AnalysisData', + 'AnalysisDefinition', + 'ApiDefinitionInfo', + 'ApiKVReference', + 'ApiManagementConfig', + 'ApplicationLogsConfig', + 'ApplicationStack', + 'ApplicationStackResource', + 'AppServiceCertificate', + 'AppServiceCertificateOrder', + 'AppServiceCertificateOrderPatchResource', + 'AppServiceCertificatePatchResource', + 'AppServiceCertificateResource', + 'AppServiceEnvironment', + 'AppServiceEnvironmentPatchResource', + 'AppServiceEnvironmentResource', + 'AppServicePlan', + 'AppServicePlanPatchResource', + 'ArmIdWrapper', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'AzureBlobStorageApplicationLogsConfig', + 'AzureBlobStorageHttpLogsConfig', + 'AzureStorageInfoValue', + 'AzureStoragePropertyDictionaryResource', + 'AzureTableStorageApplicationLogsConfig', + 'BackupItem', + 'BackupRequest', + 'BackupSchedule', + 'BillingMeter', + 'Capability', + 'Certificate', + 'CertificateDetails', + 'CertificateEmail', + 'CertificateOrderAction', + 'CertificatePatchResource', + 'CloningInfo', + 'ConnectionStringDictionary', + 'ConnStringInfo', + 'ConnStringValueTypePair', + 'Contact', + 'ContainerCpuStatistics', + 'ContainerCpuUsage', + 'ContainerInfo', + 'ContainerMemoryStatistics', + 'ContainerNetworkInterfaceStatistics', + 'ContainerThrottlingData', + 'ContinuousWebJob', + 'CorsSettings', + 'CsmCopySlotEntity', + 'CsmMoveResourceEnvelope', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'CsmPublishingProfileOptions', + 'CsmSlotEntity', + 'CsmUsageQuota', + 'CustomHostnameAnalysisResult', + 'DatabaseBackupSetting', + 'DataSource', + 'DataTableResponseColumn', + 'DataTableResponseObject', + 'DefaultErrorResponse', 'DefaultErrorResponseException', + 'DefaultErrorResponseError', + 'DefaultErrorResponseErrorDetailsItem', + 'DeletedAppRestoreRequest', + 'DeletedSite', + 'Deployment', + 'DeploymentLocations', + 'DetectorAbnormalTimePeriod', + 'DetectorDefinition', + 'DetectorInfo', + 'DetectorResponse', + 'DiagnosticAnalysis', + 'DiagnosticCategory', + 'DiagnosticData', + 'DiagnosticDetectorResponse', + 'DiagnosticMetricSample', + 'DiagnosticMetricSet', + 'Dimension', + 'Domain', + 'DomainAvailabilityCheckResult', + 'DomainControlCenterSsoRequest', + 'DomainOwnershipIdentifier', + 'DomainPatchResource', + 'DomainPurchaseConsent', + 'DomainRecommendationSearchParameters', + 'EnabledConfig', + 'EndpointDependency', + 'EndpointDetail', + 'ErrorEntity', + 'Experiments', + 'FileSystemApplicationLogsConfig', + 'FileSystemHttpLogsConfig', + 'FunctionEnvelope', + 'FunctionSecrets', + 'GeoRegion', + 'GlobalCsmSkuDescription', + 'HandlerMapping', + 'HostingEnvironmentDeploymentInfo', + 'HostingEnvironmentDiagnostics', + 'HostingEnvironmentProfile', + 'HostKeys', + 'HostName', + 'HostNameBinding', + 'HostNameSslState', + 'HttpLogsConfig', + 'HybridConnection', + 'HybridConnectionKey', + 'HybridConnectionLimits', + 'Identifier', + 'InboundEnvironmentEndpoint', + 'IpSecurityRestriction', + 'KeyInfo', + 'KeyVaultReferenceCollection', + 'KeyVaultReferenceResource', + 'KubeEnvironmentProfile', + 'KubeEnvironmentResource', + 'KubeNodePool', + 'LocalizableString', + 'LogSpecification', + 'ManagedServiceIdentity', + 'ManagedServiceIdentityUserAssignedIdentitiesValue', + 'MetricAvailability', + 'MetricSpecification', + 'MigrateMySqlRequest', + 'MigrateMySqlStatus', + 'MSDeploy', + 'MSDeployLog', + 'MSDeployLogEntry', + 'MSDeployStatus', + 'NameIdentifier', + 'NameValuePair', + 'NetworkAccessControlEntry', + 'NetworkFeatures', + 'NetworkTrace', + 'Operation', + 'OutboundEnvironmentEndpoint', + 'PerfMonResponse', + 'PerfMonSample', + 'PerfMonSet', + 'PremierAddOn', + 'PremierAddOnOffer', + 'PremierAddOnPatchResource', + 'PrivateAccess', + 'PrivateAccessSubnet', + 'PrivateAccessVirtualNetwork', + 'PrivateEndpointConnectionResource', + 'PrivateLinkConnectionApprovalRequestResource', + 'PrivateLinkConnectionState', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'PrivateLinkResourcesWrapper', + 'ProcessInfo', + 'ProcessModuleInfo', + 'ProcessThreadInfo', + 'ProxyOnlyResource', + 'PublicCertificate', + 'PushSettings', + 'RampUpRule', + 'Recommendation', + 'RecommendationRule', + 'ReissueCertificateOrderRequest', + 'RelayServiceConnectionEntity', + 'Rendering', + 'RenewCertificateOrderRequest', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceHealthMetadata', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceNameAvailability', + 'ResourceNameAvailabilityRequest', + 'ResponseMetaData', + 'RestoreRequest', + 'ServiceSpecification', + 'Site', + 'SiteAuthSettings', + 'SiteCloneability', + 'SiteCloneabilityCriterion', + 'SiteConfig', + 'SiteConfigResource', + 'SiteConfigurationSnapshotInfo', + 'SiteExtensionInfo', + 'SiteInstance', + 'SiteLimits', + 'SiteLogsConfig', + 'SiteMachineKey', + 'SitePatchResource', + 'SitePhpErrorLogFlag', + 'SiteSeal', + 'SiteSealRequest', + 'SiteSourceControl', + 'SkuCapacity', + 'SkuDescription', + 'SkuInfo', + 'SkuInfos', + 'SlotConfigNamesResource', + 'SlotDifference', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'Snapshot', + 'SnapshotRecoverySource', + 'SnapshotRestoreRequest', + 'Solution', + 'SourceControl', + 'StackMajorVersion', + 'StackMinorVersion', + 'StampCapacity', + 'StaticSiteARMResource', + 'StaticSiteBuildARMResource', + 'StaticSiteBuildProperties', + 'StaticSiteCustomDomainOverviewARMResource', + 'StaticSiteFunctionOverviewARMResource', + 'StaticSitePatchResource', + 'StaticSiteResetPropertiesARMResource', + 'StaticSiteUserARMResource', + 'StaticSiteUserInvitationRequestResource', + 'StaticSiteUserInvitationResponseResource', + 'StatusCodesBasedTrigger', + 'StorageMigrationOptions', + 'StorageMigrationResponse', + 'StringDictionary', + 'SwiftVirtualNetwork', + 'TldLegalAgreement', + 'TopLevelDomain', + 'TopLevelDomainAgreementOption', + 'TriggeredJobHistory', + 'TriggeredJobRun', + 'TriggeredWebJob', + 'Usage', + 'User', + 'ValidateRequest', + 'ValidateResponse', + 'ValidateResponseError', + 'VirtualApplication', + 'VirtualDirectory', + 'VirtualIPMapping', + 'VirtualNetworkProfile', + 'VnetGateway', + 'VnetInfo', + 'VnetParameters', + 'VnetRoute', + 'VnetValidationFailureDetails', + 'VnetValidationTestFailure', + 'WebAppCollection', + 'WebJob', + 'WebSiteInstanceStatus', + 'WorkerPool', + 'WorkerPoolResource', + 'AppServiceCertificateOrderPaged', + 'AppServiceCertificateResourcePaged', + 'CsmOperationDescriptionPaged', + 'DomainPaged', + 'NameIdentifierPaged', + 'DomainOwnershipIdentifierPaged', + 'TopLevelDomainPaged', + 'TldLegalAgreementPaged', + 'CertificatePaged', + 'DeletedSitePaged', + 'DetectorResponsePaged', + 'DiagnosticCategoryPaged', + 'AnalysisDefinitionPaged', + 'DetectorDefinitionPaged', + 'ApplicationStackResourcePaged', + 'RecommendationPaged', + 'SourceControlPaged', + 'BillingMeterPaged', + 'GeoRegionPaged', + 'IdentifierPaged', + 'PremierAddOnOfferPaged', + 'SitePaged', + 'BackupItemPaged', + 'SiteConfigResourcePaged', + 'SiteConfigurationSnapshotInfoPaged', + 'ContinuousWebJobPaged', + 'DeploymentPaged', + 'FunctionEnvelopePaged', + 'HostNameBindingPaged', + 'SiteInstancePaged', + 'ProcessInfoPaged', + 'ProcessModuleInfoPaged', + 'ProcessThreadInfoPaged', + 'PerfMonResponsePaged', + 'PublicCertificatePaged', + 'SiteExtensionInfoPaged', + 'SlotDifferencePaged', + 'SnapshotPaged', + 'TriggeredWebJobPaged', + 'TriggeredJobHistoryPaged', + 'CsmUsageQuotaPaged', + 'WebJobPaged', + 'StaticSiteARMResourcePaged', + 'StaticSiteUserARMResourcePaged', + 'StaticSiteBuildARMResourcePaged', + 'StaticSiteFunctionOverviewARMResourcePaged', + 'StaticSiteCustomDomainOverviewARMResourcePaged', + 'AppServiceEnvironmentResourcePaged', + 'StampCapacityPaged', + 'InboundEnvironmentEndpointPaged', + 'WorkerPoolResourcePaged', + 'ResourceMetricDefinitionPaged', + 'SkuInfoPaged', + 'UsagePaged', + 'OutboundEnvironmentEndpointPaged', + 'AppServicePlanPaged', + 'StrPaged', + 'HybridConnectionPaged', + 'ResourceHealthMetadataPaged', + 'KubeEnvironmentResourcePaged', + 'KeyVaultSecretStatus', + 'CertificateProductType', + 'ProvisioningState', + 'CertificateOrderStatus', + 'CertificateOrderActionType', + 'RouteType', + 'ManagedServiceIdentityType', + 'IpFilterTag', + 'AutoHealActionType', + 'ConnectionStringType', + 'AzureStorageType', + 'AzureStorageState', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'FtpsState', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'ClientCertMode', + 'RedundancyMode', + 'StatusOptions', + 'DomainStatus', + 'AzureResourceType', + 'CustomHostNameDnsRecordType', + 'HostNameType', + 'DnsType', + 'DomainType', + 'HostingEnvironmentStatus', + 'InternalLoadBalancingMode', + 'ComputeModeOptions', + 'WorkerSizeOptions', + 'AccessControlEntryAction', + 'OperationStatus', + 'IssueType', + 'SolutionType', + 'RenderingType', + 'ResourceScopeType', + 'NotificationLevel', + 'Channels', + 'AppServicePlanRestrictions', + 'InAvailabilityReasonType', + 'CheckNameResourceTypes', + 'ValidateResourceTypes', + 'ResolveStatus', + 'ConfigReferenceSource', + 'ConfigReferenceLocation', + 'LogLevel', + 'BackupItemStatus', + 'DatabaseType', + 'FrequencyUnit', + 'ContinuousWebJobStatus', + 'WebJobType', + 'PublishingProfileFormat', + 'DnsVerificationTestResult', + 'MSDeployLogEntryType', + 'MSDeployProvisioningState', + 'MySqlMigrationType', + 'PublicCertificateLocation', + 'BackupRestoreOperationType', + 'UnauthenticatedClientAction', + 'BuiltInAuthenticationProvider', + 'CloneAbilityResult', + 'SiteExtensionType', + 'TriggeredWebJobStatus', + 'SiteRuntimeState', + 'BuildStatus', + 'TriggerTypes', + 'K8SEProvisioningState', + 'K8SENetworkPlugin', + 'SkuName', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py new file mode 100644 index 00000000000..d8853cd12a0 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py @@ -0,0 +1,13656 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2019_08_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2019_08_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(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.get('address1', None) + self.address2 = kwargs.get('address2', None) + self.city = kwargs.get('city', None) + self.country = kwargs.get('country', None) + self.postal_code = kwargs.get('postal_code', None) + self.state = kwargs.get('state', None) + + +class ProxyOnlyResource(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.v2019_08_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 AnalysisData(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.v2019_08_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2019_08_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2019_08_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(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(Model): + """Description of site key vault references. + + :param reference: + :type reference: str + :param status: Possible values include: 'Initialized', 'Resolved', + 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', + 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons' + :type status: str or ~azure.mgmt.web.v2019_08_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: Possible values include: 'None', 'SystemAssigned', + 'UserAssigned' + :type identity_type: str or + ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType + :param details: + :type details: str + :param source: Possible values include: 'KeyVault' + :type source: str or + ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceSource + :param location: Possible values include: 'ApplicationSetting' + :type location: str or + ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceLocation + """ + + _attribute_map = { + 'reference': {'key': 'reference', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ResolveStatus'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'secret_version': {'key': 'secretVersion', 'type': 'str'}, + 'identity_type': {'key': 'identityType', 'type': 'ManagedServiceIdentityType'}, + 'details': {'key': 'details', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'ConfigReferenceSource'}, + 'location': {'key': 'location', 'type': 'ConfigReferenceLocation'}, + } + + 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.source = kwargs.get('source', None) + self.location = kwargs.get('location', None) + + +class ApiManagementConfig(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 ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2019_08_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2019_08_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2019_08_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(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.v2019_08_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2019_08_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]'}, + } + + 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) + + +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 application_stack_resource_name: Application stack name. + :type application_stack_resource_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.v2019_08_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2019_08_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'}, + 'application_stack_resource_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]'}, + } + + def __init__(self, **kwargs): + super(ApplicationStackResource, self).__init__(**kwargs) + self.application_stack_resource_name = kwargs.get('application_stack_resource_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) + + +class AppServiceCertificate(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.v2019_08_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': 'KeyVaultSecretStatus'}, + } + + 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 Resource(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: 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.get('location', None) + 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: Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2019_08_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2019_08_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2019_08_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.v2019_08_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2019_08_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2019_08_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2019_08_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2019_08_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.v2019_08_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2019_08_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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.v2019_08_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': 'KeyVaultSecretStatus'}, + } + + 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: 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.v2019_08_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': 'KeyVaultSecretStatus'}, + } + + 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(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2019_08_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2019_08_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) + self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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: Resource tags. + :type tags: dict[str, str] + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2019_08_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentResource, self).__init__(**kwargs) + self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) + self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) + + +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: Resource tags. + :type tags: dict[str, 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.v2019_08_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.v2019_08_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.KubeEnvironmentProfile + :param sku: + :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, 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) + self.sku = kwargs.get('sku', 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.v2019_08_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.v2019_08_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2019_08_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.v2019_08_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': 'StatusOptions'}, + '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': 'ProvisioningState'}, + '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(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 AutoHealActions(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.v2019_08_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2019_08_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': 'AutoHealActionType'}, + '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(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(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.v2019_08_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2019_08_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2019_08_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) + + +class AzureBlobStorageApplicationLogsConfig(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.v2019_08_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': 'LogLevel'}, + '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(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 AzureStorageInfoValue(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.v2019_08_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' + :vartype state: str or + ~azure.mgmt.web.v2019_08_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + 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.v2019_08_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(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.v2019_08_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': 'LogLevel'}, + '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.get('sas_url', None) + + +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 backup_item_name: Name of this backup. + :vartype backup_item_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.v2019_08_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 + :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.v2019_08_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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.backup_item_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 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. + + 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 + :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: Required. 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.v2019_08_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2019_08_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account_url': {'required': 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(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). Default value: 7 . + :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.v2019_08_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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 + """ + + _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'}, + } + + 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) + + +class Capability(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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2019_08_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.v2019_08_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', '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) + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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 + """ + + _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.v2019_08_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: 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': 'CertificateOrderActionType'}, + '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 CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2019_08_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.v2019_08_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', '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) + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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.get('source_web_app_id', None) + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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.v2019_08_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(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.v2019_08_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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(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.v2019_08_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, **kwargs): + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) + + +class Contact(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.v2019_08_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.get('email', None) + self.fax = kwargs.get('fax', None) + self.job_title = kwargs.get('job_title', None) + self.name_first = kwargs.get('name_first', None) + self.name_last = kwargs.get('name_last', None) + self.name_middle = kwargs.get('name_middle', None) + self.organization = kwargs.get('organization', None) + self.phone = kwargs.get('phone', None) + + +class ContainerCpuStatistics(Model): + """ContainerCpuStatistics. + + :param cpu_usage: + :type cpu_usage: ~azure.mgmt.web.v2019_08_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.v2019_08_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(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(Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: datetime + :param previous_time_stamp: + :type previous_time_stamp: datetime + :param current_cpu_stats: + :type current_cpu_stats: + ~azure.mgmt.web.v2019_08_01.models.ContainerCpuStatistics + :param previous_cpu_stats: + :type previous_cpu_stats: + ~azure.mgmt.web.v2019_08_01.models.ContainerCpuStatistics + :param memory_stats: + :type memory_stats: + ~azure.mgmt.web.v2019_08_01.models.ContainerMemoryStatistics + :param name: + :type name: str + :param id: + :type id: str + :param eth0: + :type eth0: + ~azure.mgmt.web.v2019_08_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(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(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(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.v2019_08_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.v2019_08_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': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + '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 CorsSettings(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 CsmCopySlotEntity(Model): + """Copy deployment slot parameters. + + All required parameters must be populated in order to send to Azure. + + :param target_slot: Required. Destination deployment slot during copy + operation. + :type target_slot: str + :param site_config: Required. The site object which will be merged with + the source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2019_08_01.models.SiteConfig + """ + + _validation = { + 'target_slot': {'required': True}, + 'site_config': {'required': True}, + } + + _attribute_map = { + 'target_slot': {'key': 'targetSlot', 'type': 'str'}, + 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, + } + + def __init__(self, **kwargs): + super(CsmCopySlotEntity, self).__init__(**kwargs) + self.target_slot = kwargs.get('target_slot', None) + self.site_config = kwargs.get('site_config', None) + + +class CsmMoveResourceEnvelope(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 CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2019_08_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2019_08_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(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2019_08_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(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 CsmPublishingProfileOptions(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.v2019_08_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(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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.get('target_slot', None) + self.preserve_vnet = kwargs.get('preserve_vnet', None) + + +class CsmUsageQuota(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 + :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.v2019_08_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 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: true if hostname is + already verified; otherwise, 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.v2019_08_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.v2019_08_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_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_cname_records = kwargs.get('alternate_cname_records', None) + self.alternate_txt_records = kwargs.get('alternate_txt_records', None) + + +class DatabaseBackupSetting(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.v2019_08_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.get('database_type', None) + 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 DataSource(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.v2019_08_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(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(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.v2019_08_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(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.v2019_08_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 DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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.v2019_08_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(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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_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.deleted_site_kind = None + self.geo_region_name = 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 + :param end_time: End time. + :type end_time: 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 DeploymentLocations(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.v2019_08_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironment] + :param hosting_environment_deployment_infos: Available App Service + Environments with basic information. + :type hosting_environment_deployment_infos: + list[~azure.mgmt.web.v2019_08_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(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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.v2019_08_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.v2019_08_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2019_08_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': 'IssueType'}, + '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(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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.v2019_08_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2019_08_01.models.DiagnosticData] + """ + + _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]'}, + } + + def __init__(self, **kwargs): + super(DetectorResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.dataset = kwargs.get('dataset', 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 + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2019_08_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2019_08_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.v2019_08_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 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 DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2019_08_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2019_08_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 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 + :param end_time: End time of the period + :type end_time: 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.v2019_08_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2019_08_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2019_08_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2019_08_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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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(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 + :param end_time: End time of the period + :type end_time: 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.v2019_08_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(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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2019_08_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.v2019_08_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.v2019_08_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2019_08_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2019_08_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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.v2019_08_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + 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 DomainControlCenterSsoRequest(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 DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2019_08_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.v2019_08_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.v2019_08_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2019_08_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2019_08_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(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 + 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 + """ + + _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(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(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(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.v2019_08_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(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(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.v2019_08_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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2019_08_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 FileSystemApplicationLogsConfig(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2019_08_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, **kwargs): + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', "Off") + + +class FileSystemHttpLogsConfig(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 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 FunctionSecrets(ProxyOnlyResource): + """Function secrets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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: Secret key. + :type key: str + :param trigger_url: Trigger URL. + :type trigger_url: 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'}, + 'key': {'key': 'properties.key', 'type': 'str'}, + 'trigger_url': {'key': 'properties.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 GlobalCsmSkuDescription(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.v2019_08_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.v2019_08_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 HandlerMapping(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(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(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(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(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(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.v2019_08_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.v2019_08_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.v2019_08_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + 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.v2019_08_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.v2019_08_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2019_08_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2019_08_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + '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 HostNameSslState(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.v2019_08_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 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.v2019_08_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2019_08_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2019_08_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 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 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 InboundEnvironmentEndpoint(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 IpSecurityRestriction(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' + :type tag: str or ~azure.mgmt.web.v2019_08_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 x_forwarded_hosts: + :type x_forwarded_hosts: list[str] + :param x_forwarded_fors: 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. + :type x_forwarded_fors: 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': 'IpFilterTag'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'x_forwarded_hosts': {'key': 'xForwardedHosts', 'type': '[str]'}, + 'x_forwarded_fors': {'key': 'xForwardedFors', '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.x_forwarded_hosts = kwargs.get('x_forwarded_hosts', None) + self.x_forwarded_fors = kwargs.get('x_forwarded_fors', None) + + +class KeyInfo(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 KeyVaultReferenceCollection(ProxyOnlyResource): + """Web app key vault reference and status 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 key_to_reference_statuses: + :type key_to_reference_statuses: dict[str, + ~azure.mgmt.web.v2019_08_01.models.ApiKVReference] + """ + + _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_to_reference_statuses': {'key': 'properties.keyToReferenceStatuses', 'type': '{ApiKVReference}'}, + } + + def __init__(self, **kwargs): + super(KeyVaultReferenceCollection, self).__init__(**kwargs) + self.key_to_reference_statuses = kwargs.get('key_to_reference_statuses', None) + + +class KeyVaultReferenceResource(ProxyOnlyResource): + """Web app key vault reference and status 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 reference: + :type reference: str + :param status: Possible values include: 'Initialized', 'Resolved', + 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', + 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons' + :type status: str or ~azure.mgmt.web.v2019_08_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: Possible values include: 'None', 'SystemAssigned', + 'UserAssigned' + :type identity_type: str or + ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType + :param details: + :type details: str + :param source: Possible values include: 'KeyVault' + :type source: str or + ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceSource + :param location: Possible values include: 'ApplicationSetting' + :type location: str or + ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceLocation + """ + + _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'}, + 'reference': {'key': 'properties.reference', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'ResolveStatus'}, + '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': 'ManagedServiceIdentityType'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'ConfigReferenceSource'}, + 'location': {'key': 'properties.location', 'type': 'ConfigReferenceLocation'}, + } + + def __init__(self, **kwargs): + super(KeyVaultReferenceResource, 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.source = kwargs.get('source', None) + self.location = kwargs.get('location', None) + + +class KubeEnvironmentProfile(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 KubeEnvironmentResource(Resource): + """ARM resource for Kubernetes 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 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: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the Kubernetes + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Waiting', 'InitializationInProgress', 'ARMDeploymentInProgress', + 'ARMDeploymentFinished', 'InfrastructureSetupInProgress', + 'InfrastructureSetupComplete', 'ScheduledForDelete', 'DeletionInProgress', + 'UpgradeRequested', 'UpgradeFailed', 'InitializationFailed' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2019_08_01.models.K8SEProvisioningState + :param node_pools: Required. Description of node pools with VM sizes, + number of instances in each pool, and maximum instance counts for + autoscaling. + :type node_pools: list[~azure.mgmt.web.v2019_08_01.models.KubeNodePool] + :ivar subscription_id: Subscription of the Kubernetes Environment. + :vartype subscription_id: str + :ivar aks_cluster_resource_group: Resource group of the Kubernetes + Environment. + :vartype aks_cluster_resource_group: str + :ivar kubernetes_version: Kubernetes version of the AKS cluster + :vartype kubernetes_version: str + :ivar deployment_errors: Any errors that occurred during deployment or + deployment validation + :vartype deployment_errors: str + :param internal_load_balancer_enabled: Only visible within Vnet/Subnet + :type internal_load_balancer_enabled: bool + :param vnet_subnet_id: Vnet/Subnet of the Kube Nodes/Pods/Services + :type vnet_subnet_id: str + :param network_plugin: Use 'kubenet' (default) or 'azure' network + configuration + if VnetSubnetID is not specified (using default vnet/subnet), only + 'kubenet' is supported + See + https://docs.microsoft.com/en-us/azure/aks/concepts-network#azure-virtual-networks. + Possible values include: 'kubenet', 'azure' + :type network_plugin: str or + ~azure.mgmt.web.v2019_08_01.models.K8SENetworkPlugin + :param service_cidr: Address space to be used by services + (nodeport/clusterip/loadbalancer) + It must be within the vnet but not used by subnet + This is required if VnetSubnetID is specified + :type service_cidr: str + :param dns_service_ip: Kubernetes Dns Service IP within ServiceCidr + (commonly, .10 address) + This is required if VnetSubnetID is specified + :type dns_service_ip: str + :param docker_bridge_cidr: This lets AKS nodes communicate with the + underlying management platform. + This IP address must NOT be within the virtual network IP address range of + your cluster, + and shouldn't overlap with other address ranges in use on your network. + Default (by AKS) is 172.17.0.1/16. If your VNET overlapped with this, you + must specify others + :type docker_bridge_cidr: str + :param service_principal_client_id: Service Principal Client ID + :type service_principal_client_id: str + :param service_principal_client_secret: Service Principal Client Secret + :type service_principal_client_secret: str + :ivar static_ip: Static IP of the KubeEnvironment + :vartype static_ip: str + :param default_certificate_provision_start_time: Time when + DefaultCertificateProvisioning is started, used to + determine timeout for certificate provisioning + :type default_certificate_provision_start_time: str + :param log_analytics_workspace_id: + :type log_analytics_workspace_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'node_pools': {'required': True}, + 'subscription_id': {'readonly': True}, + 'aks_cluster_resource_group': {'readonly': True}, + 'kubernetes_version': {'readonly': True}, + 'deployment_errors': {'readonly': True}, + 'static_ip': {'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': 'K8SEProvisioningState'}, + 'node_pools': {'key': 'properties.nodePools', 'type': '[KubeNodePool]'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'aks_cluster_resource_group': {'key': 'properties.aksClusterResourceGroup', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, + 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'network_plugin': {'key': 'properties.networkPlugin', 'type': 'K8SENetworkPlugin'}, + 'service_cidr': {'key': 'properties.serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'properties.dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'properties.dockerBridgeCidr', 'type': 'str'}, + 'service_principal_client_id': {'key': 'properties.servicePrincipalClientId', 'type': 'str'}, + 'service_principal_client_secret': {'key': 'properties.servicePrincipalClientSecret', 'type': 'str'}, + 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, + 'default_certificate_provision_start_time': {'key': 'properties.defaultCertificateProvisionStartTime', 'type': 'str'}, + 'log_analytics_workspace_id': {'key': 'properties.logAnalyticsWorkspaceID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubeEnvironmentResource, self).__init__(**kwargs) + self.provisioning_state = None + self.node_pools = kwargs.get('node_pools', None) + self.subscription_id = None + self.aks_cluster_resource_group = None + self.kubernetes_version = None + self.deployment_errors = None + self.internal_load_balancer_enabled = kwargs.get('internal_load_balancer_enabled', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.network_plugin = kwargs.get('network_plugin', None) + self.service_cidr = kwargs.get('service_cidr', None) + self.dns_service_ip = kwargs.get('dns_service_ip', None) + self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', None) + self.service_principal_client_id = kwargs.get('service_principal_client_id', None) + self.service_principal_client_secret = kwargs.get('service_principal_client_secret', None) + self.static_ip = None + self.default_certificate_provision_start_time = kwargs.get('default_certificate_provision_start_time', None) + self.log_analytics_workspace_id = kwargs.get('log_analytics_workspace_id', None) + + +class KubeNodePool(Model): + """Node pool of a Kubernetes Environment. + + :param vm_size: VM size of the node pool instances. + :type vm_size: str + :param node_count: Number of instances in the node pool. + :type node_count: int + :param max_node_count: Maximum number of instances for autoscaling. + :type max_node_count: int + :param name: Name of the node pool. + :type name: str + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubeNodePool, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.node_count = kwargs.get('node_count', None) + self.max_node_count = kwargs.get('max_node_count', None) + self.name = kwargs.get('name', None) + + +class LocalizableString(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 LogSpecification(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(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: + 'None', 'SystemAssigned', 'UserAssigned' + :type type: str or + ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailability(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(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.v2019_08_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2019_08_01.models.MetricAvailability] + :param supported_time_grain_types: + :type supported_time_grain_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]'}, + } + + 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) + + +class MigrateMySqlRequest(ProxyOnlyResource): + """MySQL migration request. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2019_08_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + 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.v2019_08_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': 'OperationStatus'}, + '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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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.v2019_08_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(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2019_08_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': 'MSDeployLogEntryType'}, + '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.v2019_08_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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(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 NameValuePair(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 NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2019_08_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.description = kwargs.get('description', None) + self.order = kwargs.get('order', None) + self.remote_subnet = kwargs.get('remote_subnet', 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.v2019_08_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2019_08_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(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 Operation(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.v2019_08_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2019_08_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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(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.v2019_08_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 PerfMonResponse(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.v2019_08_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(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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(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 + :param end_time: End time of the period. + :type end_time: 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.v2019_08_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: 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: true if promotion code is + required; otherwise, 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.v2019_08_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': 'AppServicePlanRestrictions'}, + '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 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.v2019_08_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(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(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.v2019_08_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 PrivateEndpointConnectionResource(ProxyOnlyResource): + """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.v2019_08_01.models.ArmIdWrapper + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2019_08_01.models.PrivateLinkConnectionState + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionResource, 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) + + +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: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2019_08_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(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(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.v2019_08_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.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.properties = kwargs.get('properties', None) + + +class PrivateLinkResourceProperties(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(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.v2019_08_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.get('value', None) + + +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.v2019_08_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.v2019_08_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 + :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 + :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 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 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 + :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 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.v2019_08_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': 'PublicCertificateLocation'}, + '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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + \\nMinReroutePercentage or + MaxReroutePercentage. Site metrics are checked every N + minutes specified in ChangeIntervalInMinutes.\\nCustom + decision algorithm + can be provided in TiPCallback site extension which URL can be specified + in 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 + :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.v2019_08_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.v2019_08_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.v2019_08_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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 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.v2019_08_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.v2019_08_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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 Rendering(Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.v2019_08_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': 'RenderingType'}, + '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(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 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 ResourceMetricAvailability(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.v2019_08_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 ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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.v2019_08_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(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.v2019_08_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.get('name', None) + self.type = kwargs.get('type', None) + self.is_fqdn = kwargs.get('is_fqdn', None) + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2019_08_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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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.v2019_08_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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.v2019_08_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + '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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2019_08_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: + list[~azure.mgmt.web.v2019_08_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: Resource tags. + :type tags: dict[str, str] + :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.v2019_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2019_08_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.v2019_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2019_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2019_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2019_08_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: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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 + :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.v2019_08_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: true if the app is a default + container; otherwise, 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.v2019_08_01.models.SlotSwapStatus + :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.v2019_08_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 identity: + :type identity: ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + 'client_cert_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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.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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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.v2019_08_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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' + :type default_provider: str or + ~azure.mgmt.web.v2019_08_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_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 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_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]'}, + 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, + 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, + 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, + 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, + 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, + 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, + 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, + 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, + 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, + 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, + 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', '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.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_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.google_client_id = kwargs.get('google_client_id', None) + self.google_client_secret = kwargs.get('google_client_secret', None) + self.google_oauth_scopes = kwargs.get('google_oauth_scopes', None) + self.facebook_app_id = kwargs.get('facebook_app_id', None) + self.facebook_app_secret = kwargs.get('facebook_app_secret', None) + self.facebook_oauth_scopes = kwargs.get('facebook_oauth_scopes', None) + self.twitter_consumer_key = kwargs.get('twitter_consumer_key', None) + self.twitter_consumer_secret = kwargs.get('twitter_consumer_secret', 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_oauth_scopes = kwargs.get('microsoft_account_oauth_scopes', None) + + +class SiteCloneability(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.v2019_08_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2019_08_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + '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(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(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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2019_08_01.models.NameValuePair] + :param azure_storage_accounts: AzureStorageAccounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2019_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2019_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2019_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2019_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2019_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2019_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2019_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2019_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2019_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2019_08_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2019_08_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2019_08_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2019_08_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. Default value: True . + :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.v2019_08_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.v2019_08_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 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 + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'pre_warmed_instance_count': {'key': 'preWarmedInstanceCount', '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'}, + } + + 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.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.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.ftps_state = kwargs.get('ftps_state', None) + self.pre_warmed_instance_count = kwargs.get('pre_warmed_instance_count', 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) + + +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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2019_08_01.models.NameValuePair] + :param azure_storage_accounts: AzureStorageAccounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2019_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2019_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2019_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2019_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2019_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2019_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2019_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2019_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2019_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2019_08_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2019_08_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2019_08_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2019_08_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. Default value: True . + :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.v2019_08_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.v2019_08_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 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, + 'pre_warmed_instance_count': {'key': 'properties.preWarmedInstanceCount', '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'}, + } + + 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.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.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.ftps_state = kwargs.get('ftps_state', None) + self.pre_warmed_instance_count = kwargs.get('pre_warmed_instance_count', 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) + + +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 + :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 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.v2019_08_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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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': 'SiteExtensionType'}, + '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 SiteInstance(ProxyOnlyResource): + """Instance 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 site_instance_name: Name of instance. + :vartype site_instance_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'site_instance_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'}, + 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SiteInstance, self).__init__(**kwargs) + self.site_instance_name = None + + +class SiteLimits(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.v2019_08_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2019_08_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2019_08_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2019_08_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(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 + :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.v2019_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2019_08_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.v2019_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2019_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2019_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param client_cert_exclusion_paths: client certificate authentication + comma-separated exclusion paths + :type client_cert_exclusion_paths: str + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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 + :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.v2019_08_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: true if the app is a default + container; otherwise, 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.v2019_08_01.models.SlotSwapStatus + :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.v2019_08_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 identity: + :type identity: ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentity + """ + + _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'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(SitePatchResource, self).__init__(**kwargs) + 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) + self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.identity = kwargs.get('identity', 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(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.get('html', None) + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, + 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, + 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, + } + + 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.deployment_rollback_enabled = kwargs.get('deployment_rollback_enabled', None) + self.is_mercurial = kwargs.get('is_mercurial', None) + + +class SkuCapacity(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(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.v2019_08_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.v2019_08_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(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.v2019_08_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2019_08_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 SkuInfos(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.v2019_08_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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.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 SnapshotRecoverySource(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. + + 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 + :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.v2019_08_01.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': 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(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.v2019_08_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2019_08_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': 'SolutionType'}, + '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 + """ + + _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 StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2019_08_01.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool + :param is_preview: true if this stack is in Preview, + otherwise false. + :type is_preview: bool + :param is_deprecated: true if this stack has been deprecated, + otherwise false. + :type is_deprecated: bool + :param is_hidden: true if this stack should be hidden for new + customers on portal, otherwise 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'}, + '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.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(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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(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.v2019_08_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' + :type worker_size: str or + ~azure.mgmt.web.v2019_08_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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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 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: Resource tags. + :type tags: dict[str, 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 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.v2019_08_01.models.StaticSiteBuildProperties + :param sku: + :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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}'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(StaticSiteARMResource, self).__init__(**kwargs) + self.default_hostname = None + self.repository_url = kwargs.get('repository_url', None) + self.branch = kwargs.get('branch', None) + self.custom_domains = None + self.repository_token = kwargs.get('repository_token', None) + self.build_properties = kwargs.get('build_properties', None) + self.sku = kwargs.get('sku', 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 + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: 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.v2019_08_01.models.BuildStatus + """ + + _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}, + } + + _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'}, + } + + 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 + + +class StaticSiteBuildProperties(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: The path of the app artifacts after + building. + :type app_artifact_location: str + """ + + _attribute_map = { + 'app_location': {'key': 'appLocation', 'type': 'str'}, + 'api_location': {'key': 'apiLocation', 'type': 'str'}, + 'app_artifact_location': {'key': 'appArtifactLocation', '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) + + +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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_name': {'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'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StaticSiteCustomDomainOverviewARMResource, self).__init__(**kwargs) + self.domain_name = None + self.created_on = None + + +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.v2019_08_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 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 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.v2019_08_01.models.StaticSiteBuildProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + 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.custom_domains = None + self.repository_token = kwargs.get('repository_token', None) + self.build_properties = kwargs.get('build_properties', 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 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 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 + :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 StatusCodesBasedTrigger(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 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'}, + '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.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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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 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(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.get('agreement_key', None) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) + self.url = kwargs.get('url', 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 true, then the top level domain supports + domain privacy; otherwise, 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(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + 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 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.v2019_08_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 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.v2019_08_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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': 'TriggeredWebJobStatus'}, + '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.v2019_08_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.v2019_08_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': 'WebJobType'}, + '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 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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2019_08_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': 'ComputeModeOptions'}, + '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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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(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' + :type type: str or + ~azure.mgmt.web.v2019_08_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: 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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ValidateRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + 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) + + +class ValidateResponse(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.v2019_08_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(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(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2019_08_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(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(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(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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.get('id', None) + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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.v2019_08_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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'}, + } + + 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) + + +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.v2019_08_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 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.v2019_08_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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, **kwargs): + super(VnetValidationFailureDetails, self).__init__(**kwargs) + self.failed = kwargs.get('failed', None) + self.failed_tests = kwargs.get('failed_tests', 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(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.v2019_08_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.get('value', None) + 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.v2019_08_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': 'WebJobType'}, + '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 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.v2019_08_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 Diagnose and Solve Portal + :type console_url: str + :param containers: + :type containers: dict[str, + ~azure.mgmt.web.v2019_08_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': 'SiteRuntimeState'}, + 'status_url': {'key': 'properties.statusUrl', 'type': 'str'}, + 'detector_url': {'key': 'properties.detectorUrl', 'type': 'str'}, + 'console_url': {'key': 'properties.consoleUrl', '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.containers = kwargs.get('containers', None) + + +class WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.v2019_08_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 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.v2019_08_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] + :param sku: + :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(WorkerPoolResource, self).__init__(**kwargs) + 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 + self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py new file mode 100644 index 00000000000..7406bc78e43 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py @@ -0,0 +1,13656 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2019_08_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2019_08_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: + super(AbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.events = events + self.solutions = solutions + + +class Address(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: str=None, **kwargs) -> None: + 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(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: str=None, **kwargs) -> None: + 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.v2019_08_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: str=None, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: + 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 AnalysisData(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.v2019_08_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2019_08_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2019_08_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) + self.description = None + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class ApiKVReference(Model): + """Description of site key vault references. + + :param reference: + :type reference: str + :param status: Possible values include: 'Initialized', 'Resolved', + 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', + 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons' + :type status: str or ~azure.mgmt.web.v2019_08_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: Possible values include: 'None', 'SystemAssigned', + 'UserAssigned' + :type identity_type: str or + ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType + :param details: + :type details: str + :param source: Possible values include: 'KeyVault' + :type source: str or + ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceSource + :param location: Possible values include: 'ApplicationSetting' + :type location: str or + ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceLocation + """ + + _attribute_map = { + 'reference': {'key': 'reference', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ResolveStatus'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'secret_version': {'key': 'secretVersion', 'type': 'str'}, + 'identity_type': {'key': 'identityType', 'type': 'ManagedServiceIdentityType'}, + 'details': {'key': 'details', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'ConfigReferenceSource'}, + 'location': {'key': 'location', 'type': 'ConfigReferenceLocation'}, + } + + def __init__(self, *, reference: str=None, status=None, vault_name: str=None, secret_name: str=None, secret_version: str=None, identity_type=None, details: str=None, source=None, location=None, **kwargs) -> None: + super(ApiKVReference, self).__init__(**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.source = source + self.location = location + + +class ApiManagementConfig(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: str=None, **kwargs) -> None: + super(ApiManagementConfig, self).__init__(**kwargs) + self.id = id + + +class ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2019_08_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2019_08_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2019_08_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: + 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(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.v2019_08_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2019_08_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]'}, + } + + def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: + super(ApplicationStack, self).__init__(**kwargs) + self.name = name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + + +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 application_stack_resource_name: Application stack name. + :type application_stack_resource_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.v2019_08_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2019_08_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'}, + 'application_stack_resource_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]'}, + } + + def __init__(self, *, kind: str=None, application_stack_resource_name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: + super(ApplicationStackResource, self).__init__(kind=kind, **kwargs) + self.application_stack_resource_name = application_stack_resource_name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + + +class AppServiceCertificate(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.v2019_08_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2019_08_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2019_08_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2019_08_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.v2019_08_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2019_08_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, location: str, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2019_08_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2019_08_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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.v2019_08_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.v2019_08_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2019_08_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 + + +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.v2019_08_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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: 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.v2019_08_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2019_08_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2019_08_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) + self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2019_08_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' + :type internal_load_balancing_mode: str or + ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_environment_resource_name = app_service_environment_resource_name + self.app_service_environment_resource_location = app_service_environment_resource_location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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: Resource tags. + :type tags: dict[str, 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.v2019_08_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.v2019_08_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.KubeEnvironmentProfile + :param sku: + :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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 + self.sku = sku + + +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.v2019_08_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.v2019_08_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2019_08_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.v2019_08_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': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + } + + def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, **kwargs) -> None: + 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(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) -> None: + super(ArmIdWrapper, self).__init__(**kwargs) + self.id = None + + +class AutoHealActions(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.v2019_08_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2019_08_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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.v2019_08_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2019_08_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2019_08_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +class AzureBlobStorageApplicationLogsConfig(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.v2019_08_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + } + + def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: + super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + self.retention_in_days = retention_in_days + + +class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) + self.sas_url = sas_url + self.retention_in_days = retention_in_days + self.enabled = enabled + + +class AzureStorageInfoValue(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.v2019_08_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' + :vartype state: str or + ~azure.mgmt.web.v2019_08_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: + 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.v2019_08_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: str=None, properties=None, **kwargs) -> None: + super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class AzureTableStorageApplicationLogsConfig(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.v2019_08_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: + 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 backup_item_name: Name of this backup. + :vartype backup_item_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.v2019_08_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 + :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.v2019_08_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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: str=None, **kwargs) -> None: + super(BackupItem, self).__init__(kind=kind, **kwargs) + self.backup_id = None + self.storage_account_url = None + self.blob_name = None + self.backup_item_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 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. + + 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 + :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: Required. 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.v2019_08_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2019_08_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account_url': {'required': 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, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: + 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(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). Default value: 7 . + :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.v2019_08_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: + 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 + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: + 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 + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + 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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2019_08_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.v2019_08_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + } + + def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: + 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 + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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) -> None: + 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 + """ + + _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: + 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.v2019_08_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: 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': 'CertificateOrderActionType'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) + self.action_type = None + self.created_at = None + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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.v2019_08_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.v2019_08_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + } + + def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: + 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 + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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.v2019_08_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: str=None, properties=None, **kwargs) -> None: + super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class ConnStringInfo(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.v2019_08_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class ConnStringValueTypePair(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.v2019_08_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, value: str, type, **kwargs) -> None: + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = value + self.type = type + + +class Contact(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.v2019_08_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: + 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(Model): + """ContainerCpuStatistics. + + :param cpu_usage: + :type cpu_usage: ~azure.mgmt.web.v2019_08_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.v2019_08_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=None, system_cpu_usage: int=None, online_cpu_count: int=None, throttling_data=None, **kwargs) -> None: + 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(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: int=None, per_cpu_usage=None, kernel_mode_usage: int=None, user_mode_usage: int=None, **kwargs) -> None: + 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(Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: datetime + :param previous_time_stamp: + :type previous_time_stamp: datetime + :param current_cpu_stats: + :type current_cpu_stats: + ~azure.mgmt.web.v2019_08_01.models.ContainerCpuStatistics + :param previous_cpu_stats: + :type previous_cpu_stats: + ~azure.mgmt.web.v2019_08_01.models.ContainerCpuStatistics + :param memory_stats: + :type memory_stats: + ~azure.mgmt.web.v2019_08_01.models.ContainerMemoryStatistics + :param name: + :type name: str + :param id: + :type id: str + :param eth0: + :type eth0: + ~azure.mgmt.web.v2019_08_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=None, previous_time_stamp=None, current_cpu_stats=None, previous_cpu_stats=None, memory_stats=None, name: str=None, id: str=None, eth0=None, **kwargs) -> None: + 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(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: int=None, max_usage: int=None, limit: int=None, **kwargs) -> None: + super(ContainerMemoryStatistics, self).__init__(**kwargs) + self.usage = usage + self.max_usage = max_usage + self.limit = limit + + +class ContainerNetworkInterfaceStatistics(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: int=None, rx_packets: int=None, rx_errors: int=None, rx_dropped: int=None, tx_bytes: int=None, tx_packets: int=None, tx_errors: int=None, tx_dropped: int=None, **kwargs) -> None: + 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(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: int=None, throttled_periods: int=None, throttled_time: int=None, **kwargs) -> None: + 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.v2019_08_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.v2019_08_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': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.support_credentials = support_credentials + + +class CsmCopySlotEntity(Model): + """Copy deployment slot parameters. + + All required parameters must be populated in order to send to Azure. + + :param target_slot: Required. Destination deployment slot during copy + operation. + :type target_slot: str + :param site_config: Required. The site object which will be merged with + the source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2019_08_01.models.SiteConfig + """ + + _validation = { + 'target_slot': {'required': True}, + 'site_config': {'required': True}, + } + + _attribute_map = { + 'target_slot': {'key': 'targetSlot', 'type': 'str'}, + 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, + } + + def __init__(self, *, target_slot: str, site_config, **kwargs) -> None: + super(CsmCopySlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.site_config = site_config + + +class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: + super(CsmMoveResourceEnvelope, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2019_08_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2019_08_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2019_08_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(CsmOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class CsmPublishingProfileOptions(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.v2019_08_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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = format + self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints + + +class CsmSlotEntity(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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) -> None: + super(CsmSlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.preserve_vnet = preserve_vnet + + +class CsmUsageQuota(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 + :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.v2019_08_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + 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 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: true if hostname is + already verified; otherwise, 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.v2019_08_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.v2019_08_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, + 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: + 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_cname_records = alternate_cname_records + self.alternate_txt_records = alternate_txt_records + + +class DatabaseBackupSetting(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.v2019_08_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: + 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 DataSource(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.v2019_08_01.models.NameValuePair] + """ + + _attribute_map = { + 'instructions': {'key': 'instructions', 'type': '[str]'}, + 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, + } + + def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: + super(DataSource, self).__init__(**kwargs) + self.instructions = instructions + self.data_source_uri = data_source_uri + + +class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: + super(DataTableResponseColumn, self).__init__(**kwargs) + self.column_name = column_name + self.data_type = data_type + self.column_type = column_type + + +class DataTableResponseObject(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.v2019_08_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: str=None, columns=None, rows=None, **kwargs) -> None: + super(DataTableResponseObject, self).__init__(**kwargs) + self.table_name = table_name + self.columns = columns + self.rows = rows + + +class DefaultErrorResponse(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.v2019_08_01.models.DefaultErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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.v2019_08_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=None, **kwargs) -> None: + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(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) -> None: + 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: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: + 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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, + 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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.deleted_site_kind = None + self.geo_region_name = 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 + :param end_time: End time. + :type end_time: 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: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: + 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 DeploymentLocations(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.v2019_08_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironment] + :param hosting_environment_deployment_infos: Available App Service + Environments with basic information. + :type hosting_environment_deployment_infos: + list[~azure.mgmt.web.v2019_08_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: + super(DeploymentLocations, self).__init__(**kwargs) + self.locations = locations + self.hosting_environments = hosting_environments + self.hosting_environment_deployment_infos = hosting_environment_deployment_infos + + +class DetectorAbnormalTimePeriod(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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.v2019_08_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.v2019_08_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2019_08_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': 'IssueType'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(DetectorDefinition, self).__init__(kind=kind, **kwargs) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None + + +class DetectorInfo(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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.v2019_08_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2019_08_01.models.DiagnosticData] + """ + + _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]'}, + } + + def __init__(self, *, kind: str=None, metadata=None, dataset=None, **kwargs) -> None: + super(DetectorResponse, self).__init__(kind=kind, **kwargs) + self.metadata = metadata + self.dataset = dataset + + +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 + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2019_08_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2019_08_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.v2019_08_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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) + self.description = None + + +class DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2019_08_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2019_08_01.models.Rendering + """ + + _attribute_map = { + 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, + 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, + } + + def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: + super(DiagnosticData, self).__init__(**kwargs) + self.table = table + self.rendering_properties = rendering_properties + + +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 + :param end_time: End time of the period + :type end_time: 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.v2019_08_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2019_08_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2019_08_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2019_08_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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: + 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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: + 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(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 + :param end_time: End time of the period + :type end_time: 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.v2019_08_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2019_08_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.v2019_08_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.v2019_08_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2019_08_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2019_08_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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.v2019_08_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: + super(DomainAvailabilityCheckResult, self).__init__(**kwargs) + self.name = name + self.available = available + self.domain_type = domain_type + + +class DomainControlCenterSsoRequest(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) -> None: + 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: str=None, ownership_id: str=None, **kwargs) -> None: + super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) + self.ownership_id = ownership_id + + +class DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2019_08_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2019_08_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.v2019_08_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.v2019_08_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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.v2019_08_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2019_08_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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(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 + 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 + """ + + _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: + super(DomainPurchaseConsent, self).__init__(**kwargs) + self.agreement_keys = agreement_keys + self.agreed_by = agreed_by + self.agreed_at = agreed_at + + +class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: + super(DomainRecommendationSearchParameters, self).__init__(**kwargs) + self.keywords = keywords + self.max_domain_recommendations = max_domain_recommendations + + +class EnabledConfig(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: bool=None, **kwargs) -> None: + super(EnabledConfig, self).__init__(**kwargs) + self.enabled = enabled + + +class EndpointDependency(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.v2019_08_01.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(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: str=None, port: int=None, latency: float=None, is_accessible: bool=None, **kwargs) -> None: + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.latency = latency + self.is_accessible = is_accessible + + +class ErrorEntity(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.v2019_08_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: + 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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2019_08_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class FileSystemApplicationLogsConfig(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2019_08_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, *, level="Off", **kwargs) -> None: + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + + +class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + super(FileSystemHttpLogsConfig, self).__init__(**kwargs) + self.retention_in_mb = retention_in_mb + self.retention_in_days = retention_in_days + self.enabled = enabled + + +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: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: + 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 FunctionSecrets(ProxyOnlyResource): + """Function secrets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype 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: Secret key. + :type key: str + :param trigger_url: Trigger URL. + :type trigger_url: 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'}, + 'key': {'key': 'properties.key', 'type': 'str'}, + 'trigger_url': {'key': 'properties.trigger_url', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, key: str=None, trigger_url: str=None, **kwargs) -> None: + super(FunctionSecrets, self).__init__(kind=kind, **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: str=None, **kwargs) -> None: + super(GeoRegion, self).__init__(kind=kind, **kwargs) + self.description = None + self.display_name = None + self.org_domain = None + + +class GlobalCsmSkuDescription(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.v2019_08_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.v2019_08_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: + super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) + self.name = name + self.location = location + + +class HostingEnvironmentDiagnostics(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: str=None, diagnostics_output: str=None, **kwargs) -> None: + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = name + self.diagnostics_output = diagnostics_output + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: + super(HostKeys, self).__init__(**kwargs) + self.master_key = master_key + self.function_keys = function_keys + self.system_keys = system_keys + + +class HostName(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.v2019_08_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.v2019_08_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.v2019_08_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: + 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.v2019_08_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.v2019_08_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2019_08_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2019_08_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: + 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 HostNameSslState(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.v2019_08_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 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.v2019_08_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2019_08_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2019_08_01.models.AzureBlobStorageHttpLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, + } + + def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: + super(HttpLogsConfig, self).__init__(**kwargs) + self.file_system = file_system + self.azure_blob_storage = azure_blob_storage + + +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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, value: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.value = value + + +class InboundEnvironmentEndpoint(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: str=None, endpoints=None, ports=None, **kwargs) -> None: + super(InboundEnvironmentEndpoint, self).__init__(**kwargs) + self.description = description + self.endpoints = endpoints + self.ports = ports + + +class IpSecurityRestriction(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' + :type tag: str or ~azure.mgmt.web.v2019_08_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 x_forwarded_hosts: + :type x_forwarded_hosts: list[str] + :param x_forwarded_fors: 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. + :type x_forwarded_fors: 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': 'IpFilterTag'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'x_forwarded_hosts': {'key': 'xForwardedHosts', 'type': '[str]'}, + 'x_forwarded_fors': {'key': 'xForwardedFors', 'type': '[str]'}, + } + + def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, x_forwarded_hosts=None, x_forwarded_fors=None, **kwargs) -> None: + 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.x_forwarded_hosts = x_forwarded_hosts + self.x_forwarded_fors = x_forwarded_fors + + +class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: + super(KeyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class KeyVaultReferenceCollection(ProxyOnlyResource): + """Web app key vault reference and status 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 key_to_reference_statuses: + :type key_to_reference_statuses: dict[str, + ~azure.mgmt.web.v2019_08_01.models.ApiKVReference] + """ + + _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_to_reference_statuses': {'key': 'properties.keyToReferenceStatuses', 'type': '{ApiKVReference}'}, + } + + def __init__(self, *, kind: str=None, key_to_reference_statuses=None, **kwargs) -> None: + super(KeyVaultReferenceCollection, self).__init__(kind=kind, **kwargs) + self.key_to_reference_statuses = key_to_reference_statuses + + +class KeyVaultReferenceResource(ProxyOnlyResource): + """Web app key vault reference and status 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 reference: + :type reference: str + :param status: Possible values include: 'Initialized', 'Resolved', + 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', + 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons' + :type status: str or ~azure.mgmt.web.v2019_08_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: Possible values include: 'None', 'SystemAssigned', + 'UserAssigned' + :type identity_type: str or + ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType + :param details: + :type details: str + :param source: Possible values include: 'KeyVault' + :type source: str or + ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceSource + :param location: Possible values include: 'ApplicationSetting' + :type location: str or + ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceLocation + """ + + _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'}, + 'reference': {'key': 'properties.reference', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'ResolveStatus'}, + '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': 'ManagedServiceIdentityType'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'ConfigReferenceSource'}, + 'location': {'key': 'properties.location', 'type': 'ConfigReferenceLocation'}, + } + + def __init__(self, *, kind: str=None, reference: str=None, status=None, vault_name: str=None, secret_name: str=None, secret_version: str=None, identity_type=None, details: str=None, source=None, location=None, **kwargs) -> None: + super(KeyVaultReferenceResource, 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.source = source + self.location = location + + +class KubeEnvironmentProfile(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: str=None, **kwargs) -> None: + super(KubeEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class KubeEnvironmentResource(Resource): + """ARM resource for Kubernetes 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 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: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the Kubernetes + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Waiting', 'InitializationInProgress', 'ARMDeploymentInProgress', + 'ARMDeploymentFinished', 'InfrastructureSetupInProgress', + 'InfrastructureSetupComplete', 'ScheduledForDelete', 'DeletionInProgress', + 'UpgradeRequested', 'UpgradeFailed', 'InitializationFailed' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2019_08_01.models.K8SEProvisioningState + :param node_pools: Required. Description of node pools with VM sizes, + number of instances in each pool, and maximum instance counts for + autoscaling. + :type node_pools: list[~azure.mgmt.web.v2019_08_01.models.KubeNodePool] + :ivar subscription_id: Subscription of the Kubernetes Environment. + :vartype subscription_id: str + :ivar aks_cluster_resource_group: Resource group of the Kubernetes + Environment. + :vartype aks_cluster_resource_group: str + :ivar kubernetes_version: Kubernetes version of the AKS cluster + :vartype kubernetes_version: str + :ivar deployment_errors: Any errors that occurred during deployment or + deployment validation + :vartype deployment_errors: str + :param internal_load_balancer_enabled: Only visible within Vnet/Subnet + :type internal_load_balancer_enabled: bool + :param vnet_subnet_id: Vnet/Subnet of the Kube Nodes/Pods/Services + :type vnet_subnet_id: str + :param network_plugin: Use 'kubenet' (default) or 'azure' network + configuration + if VnetSubnetID is not specified (using default vnet/subnet), only + 'kubenet' is supported + See + https://docs.microsoft.com/en-us/azure/aks/concepts-network#azure-virtual-networks. + Possible values include: 'kubenet', 'azure' + :type network_plugin: str or + ~azure.mgmt.web.v2019_08_01.models.K8SENetworkPlugin + :param service_cidr: Address space to be used by services + (nodeport/clusterip/loadbalancer) + It must be within the vnet but not used by subnet + This is required if VnetSubnetID is specified + :type service_cidr: str + :param dns_service_ip: Kubernetes Dns Service IP within ServiceCidr + (commonly, .10 address) + This is required if VnetSubnetID is specified + :type dns_service_ip: str + :param docker_bridge_cidr: This lets AKS nodes communicate with the + underlying management platform. + This IP address must NOT be within the virtual network IP address range of + your cluster, + and shouldn't overlap with other address ranges in use on your network. + Default (by AKS) is 172.17.0.1/16. If your VNET overlapped with this, you + must specify others + :type docker_bridge_cidr: str + :param service_principal_client_id: Service Principal Client ID + :type service_principal_client_id: str + :param service_principal_client_secret: Service Principal Client Secret + :type service_principal_client_secret: str + :ivar static_ip: Static IP of the KubeEnvironment + :vartype static_ip: str + :param default_certificate_provision_start_time: Time when + DefaultCertificateProvisioning is started, used to + determine timeout for certificate provisioning + :type default_certificate_provision_start_time: str + :param log_analytics_workspace_id: + :type log_analytics_workspace_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'node_pools': {'required': True}, + 'subscription_id': {'readonly': True}, + 'aks_cluster_resource_group': {'readonly': True}, + 'kubernetes_version': {'readonly': True}, + 'deployment_errors': {'readonly': True}, + 'static_ip': {'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': 'K8SEProvisioningState'}, + 'node_pools': {'key': 'properties.nodePools', 'type': '[KubeNodePool]'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'aks_cluster_resource_group': {'key': 'properties.aksClusterResourceGroup', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, + 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'network_plugin': {'key': 'properties.networkPlugin', 'type': 'K8SENetworkPlugin'}, + 'service_cidr': {'key': 'properties.serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'properties.dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'properties.dockerBridgeCidr', 'type': 'str'}, + 'service_principal_client_id': {'key': 'properties.servicePrincipalClientId', 'type': 'str'}, + 'service_principal_client_secret': {'key': 'properties.servicePrincipalClientSecret', 'type': 'str'}, + 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, + 'default_certificate_provision_start_time': {'key': 'properties.defaultCertificateProvisionStartTime', 'type': 'str'}, + 'log_analytics_workspace_id': {'key': 'properties.logAnalyticsWorkspaceID', 'type': 'str'}, + } + + def __init__(self, *, location: str, node_pools, kind: str=None, tags=None, internal_load_balancer_enabled: bool=None, vnet_subnet_id: str=None, network_plugin=None, service_cidr: str=None, dns_service_ip: str=None, docker_bridge_cidr: str=None, service_principal_client_id: str=None, service_principal_client_secret: str=None, default_certificate_provision_start_time: str=None, log_analytics_workspace_id: str=None, **kwargs) -> None: + super(KubeEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.node_pools = node_pools + self.subscription_id = None + self.aks_cluster_resource_group = None + self.kubernetes_version = None + self.deployment_errors = None + self.internal_load_balancer_enabled = internal_load_balancer_enabled + self.vnet_subnet_id = vnet_subnet_id + self.network_plugin = network_plugin + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr + self.service_principal_client_id = service_principal_client_id + self.service_principal_client_secret = service_principal_client_secret + self.static_ip = None + self.default_certificate_provision_start_time = default_certificate_provision_start_time + self.log_analytics_workspace_id = log_analytics_workspace_id + + +class KubeNodePool(Model): + """Node pool of a Kubernetes Environment. + + :param vm_size: VM size of the node pool instances. + :type vm_size: str + :param node_count: Number of instances in the node pool. + :type node_count: int + :param max_node_count: Maximum number of instances for autoscaling. + :type max_node_count: int + :param name: Name of the node pool. + :type name: str + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, vm_size: str=None, node_count: int=None, max_node_count: int=None, name: str=None, **kwargs) -> None: + super(KubeNodePool, self).__init__(**kwargs) + self.vm_size = vm_size + self.node_count = node_count + self.max_node_count = max_node_count + self.name = name + + +class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class LogSpecification(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: str=None, display_name: str=None, blob_duration: str=None, log_filter_pattern: str=None, **kwargs) -> None: + 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(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: + 'None', 'SystemAssigned', 'UserAssigned' + :type type: str or + ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = user_assigned_identities + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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) -> None: + super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricSpecification(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.v2019_08_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2019_08_01.models.MetricAvailability] + :param supported_time_grain_types: + :type supported_time_grain_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]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, supported_time_grain_types=None, **kwargs) -> None: + 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 + + +class MigrateMySqlRequest(ProxyOnlyResource): + """MySQL migration request. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2019_08_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: + 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.v2019_08_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': 'OperationStatus'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: + 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.v2019_08_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: str=None, **kwargs) -> None: + super(MSDeployLog, self).__init__(kind=kind, **kwargs) + self.entries = None + + +class MSDeployLogEntry(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2019_08_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': 'MSDeployLogEntryType'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + 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.v2019_08_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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: str=None, **kwargs) -> None: + 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(Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2019_08_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = action + self.description = description + self.order = order + self.remote_subnet = remote_subnet + + +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.v2019_08_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2019_08_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: str=None, **kwargs) -> None: + 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(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: str=None, status: str=None, message: str=None, **kwargs) -> None: + super(NetworkTrace, self).__init__(**kwargs) + self.path = path + self.status = status + self.message = message + + +class Operation(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.v2019_08_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2019_08_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: + 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(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.v2019_08_01.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class PerfMonResponse(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.v2019_08_01.models.PerfMonSet + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'PerfMonSet'}, + } + + def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: + super(PerfMonResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.data = data + + +class PerfMonSample(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: + super(PerfMonSample, self).__init__(**kwargs) + self.time = time + self.instance_name = instance_name + self.value = value + + +class PerfMonSet(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 + :param end_time: End time of the period. + :type end_time: 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.v2019_08_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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: 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: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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: true if promotion code is + required; otherwise, 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.v2019_08_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': 'AppServicePlanRestrictions'}, + '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: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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 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: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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.v2019_08_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: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: + super(PrivateAccess, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.virtual_networks = virtual_networks + + +class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = name + self.key = key + + +class PrivateAccessVirtualNetwork(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.v2019_08_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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = name + self.key = key + self.resource_id = resource_id + self.subnets = subnets + + +class PrivateEndpointConnectionResource(ProxyOnlyResource): + """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.v2019_08_01.models.ArmIdWrapper + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2019_08_01.models.PrivateLinkConnectionState + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnectionResource, 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 + + +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: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2019_08_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: str=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, **kwargs) + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkConnectionState(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: str=None, description: str=None, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkResource(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.v2019_08_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, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.properties = properties + + +class PrivateLinkResourceProperties(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) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkResourcesWrapper(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.v2019_08_01.models.PrivateLinkResource] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + 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.v2019_08_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.v2019_08_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 + :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 + :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: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: + 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 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: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: + 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 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 + :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: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: + 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 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.v2019_08_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': 'PublicCertificateLocation'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: + super(PublicCertificate, self).__init__(kind=kind, **kwargs) + self.blob = blob + self.public_certificate_location = public_certificate_location + self.thumbprint = None + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + \\nMinReroutePercentage or + MaxReroutePercentage. Site metrics are checked every N + minutes specified in ChangeIntervalInMinutes.\\nCustom + decision algorithm + can be provided in TiPCallback site extension which URL can be specified + in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 + :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.v2019_08_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.v2019_08_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.v2019_08_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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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 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.v2019_08_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.v2019_08_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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: + 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 Rendering(Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.v2019_08_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': 'RenderingType'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: + 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: + super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) + self.category = category + self.signal_availability = signal_availability + + +class ResourceMetricAvailability(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) -> None: + 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.v2019_08_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: str=None, **kwargs) -> None: + 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 ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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.v2019_08_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: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(ResourceNameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class ResourceNameAvailabilityRequest(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.v2019_08_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, is_fqdn: bool=None, **kwargs) -> None: + super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.is_fqdn = is_fqdn + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2019_08_01.models.DataSource + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, + } + + def __init__(self, *, data_source=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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.v2019_08_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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.v2019_08_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + } + + def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: + 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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2019_08_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: + list[~azure.mgmt.web.v2019_08_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :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.v2019_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2019_08_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.v2019_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2019_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2019_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2019_08_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: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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 + :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.v2019_08_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: true if the app is a default + container; otherwise, 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.v2019_08_01.models.SlotSwapStatus + :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.v2019_08_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 identity: + :type identity: ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + 'client_cert_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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.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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.identity = identity + + +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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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.v2019_08_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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' + :type default_provider: str or + ~azure.mgmt.web.v2019_08_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_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 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_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]'}, + 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, + 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, + 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, + 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, + 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, + 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, + 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, + 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, + 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, + 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, + 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, google_client_id: str=None, google_client_secret: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_oauth_scopes=None, **kwargs) -> None: + super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_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_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.google_client_id = google_client_id + self.google_client_secret = google_client_secret + self.google_oauth_scopes = google_oauth_scopes + self.facebook_app_id = facebook_app_id + self.facebook_app_secret = facebook_app_secret + self.facebook_oauth_scopes = facebook_oauth_scopes + self.twitter_consumer_key = twitter_consumer_key + self.twitter_consumer_secret = twitter_consumer_secret + self.microsoft_account_client_id = microsoft_account_client_id + self.microsoft_account_client_secret = microsoft_account_client_secret + self.microsoft_account_oauth_scopes = microsoft_account_oauth_scopes + + +class SiteCloneability(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.v2019_08_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2019_08_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, + } + + def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: + 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(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: str=None, description: str=None, **kwargs) -> None: + super(SiteCloneabilityCriterion, self).__init__(**kwargs) + self.name = name + self.description = description + + +class SiteConfig(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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2019_08_01.models.NameValuePair] + :param azure_storage_accounts: AzureStorageAccounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2019_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2019_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2019_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2019_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2019_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2019_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2019_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2019_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2019_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2019_08_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2019_08_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2019_08_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2019_08_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. Default value: True . + :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.v2019_08_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.v2019_08_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 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 + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'pre_warmed_instance_count': {'key': 'preWarmedInstanceCount', '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'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, functions_runtime_scale_monitoring_enabled: bool=None, website_time_zone: str=None, **kwargs) -> None: + 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.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.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.ftps_state = ftps_state + self.pre_warmed_instance_count = pre_warmed_instance_count + 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 + + +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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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.v2019_08_01.models.NameValuePair] + :param azure_storage_accounts: AzureStorageAccounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2019_08_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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.v2019_08_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2019_08_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2019_08_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2019_08_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2019_08_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2019_08_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2019_08_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2019_08_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2019_08_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2019_08_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2019_08_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2019_08_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. Default value: True . + :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.v2019_08_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.v2019_08_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 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + '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'}, + 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, + 'pre_warmed_instance_count': {'key': 'properties.preWarmedInstanceCount', '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'}, + } + + def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, functions_runtime_scale_monitoring_enabled: bool=None, website_time_zone: str=None, **kwargs) -> None: + 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.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.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.ftps_state = ftps_state + self.pre_warmed_instance_count = pre_warmed_instance_count + 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 + + +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 + :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: str=None, **kwargs) -> None: + super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) + self.time = None + self.snapshot_id = 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.v2019_08_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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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': 'SiteExtensionType'}, + '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: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: + 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 SiteInstance(ProxyOnlyResource): + """Instance 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 site_instance_name: Name of instance. + :vartype site_instance_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'site_instance_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'}, + 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(SiteInstance, self).__init__(kind=kind, **kwargs) + self.site_instance_name = None + + +class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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.v2019_08_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2019_08_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2019_08_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2019_08_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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: + 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + 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 + :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.v2019_08_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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.v2019_08_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.v2019_08_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2019_08_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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.v2019_08_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is false. + :type client_cert_enabled: bool + :param client_cert_exclusion_paths: client certificate authentication + comma-separated exclusion paths + :type client_cert_exclusion_paths: str + :param host_names_disabled: true to disable the public + hostnames of the app; otherwise, false. + If true, the app is only accessible via API management + process. + :type host_names_disabled: bool + :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 + :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.v2019_08_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: true if the app is a default + container; otherwise, 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.v2019_08_01.models.SlotSwapStatus + :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.v2019_08_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 identity: + :type identity: ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentity + """ + + _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'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: + super(SitePatchResource, self).__init__(kind=kind, **kwargs) + 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_exclusion_paths = client_cert_exclusion_paths + self.host_names_disabled = host_names_disabled + 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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.identity = identity + + +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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: + 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(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) -> None: + super(SiteSeal, self).__init__(**kwargs) + self.html = html + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: + 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, + 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, + 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: + super(SiteSourceControl, self).__init__(kind=kind, **kwargs) + self.repo_url = repo_url + self.branch = branch + self.is_manual_integration = is_manual_integration + self.deployment_rollback_enabled = deployment_rollback_enabled + self.is_mercurial = is_mercurial + + +class SkuCapacity(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: int=None, maximum: int=None, elastic_maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + 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(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.v2019_08_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.v2019_08_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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(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.v2019_08_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2019_08_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: str=None, sku=None, capacity=None, **kwargs) -> None: + super(SkuInfo, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity + + +class SkuInfos(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.v2019_08_01.models.GlobalCsmSkuDescription] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, + } + + def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: + 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: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + 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: str=None, **kwargs) -> None: + super(Snapshot, self).__init__(kind=kind, **kwargs) + self.time = None + + +class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: + 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. + + 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 + :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.v2019_08_01.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': 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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: + 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(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.v2019_08_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2019_08_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': 'SolutionType'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: + 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 + """ + + _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: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: + 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 StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2019_08_01.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool + :param is_preview: true if this stack is in Preview, + otherwise false. + :type is_preview: bool + :param is_deprecated: true if this stack has been deprecated, + otherwise false. + :type is_deprecated: bool + :param is_hidden: true if this stack should be hidden for new + customers on portal, otherwise 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'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + } + + def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, is_preview: bool=None, is_deprecated: bool=None, is_hidden: bool=None, **kwargs) -> None: + 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.is_preview = is_preview + self.is_deprecated = is_deprecated + self.is_hidden = is_hidden + + +class StackMinorVersion(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: + 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(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.v2019_08_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' + :type worker_size: str or + ~azure.mgmt.web.v2019_08_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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: + 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 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: Resource tags. + :type tags: dict[str, 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 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.v2019_08_01.models.StaticSiteBuildProperties + :param sku: + :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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}'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, sku=None, **kwargs) -> None: + super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.default_hostname = None + self.repository_url = repository_url + self.branch = branch + self.custom_domains = None + self.repository_token = repository_token + self.build_properties = build_properties + self.sku = sku + + +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 + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: 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.v2019_08_01.models.BuildStatus + """ + + _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}, + } + + _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'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 + + +class StaticSiteBuildProperties(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: The path of the app artifacts after + building. + :type app_artifact_location: str + """ + + _attribute_map = { + 'app_location': {'key': 'appLocation', 'type': 'str'}, + 'api_location': {'key': 'apiLocation', 'type': 'str'}, + 'app_artifact_location': {'key': 'appArtifactLocation', 'type': 'str'}, + } + + def __init__(self, *, app_location: str=None, api_location: str=None, app_artifact_location: str=None, **kwargs) -> None: + super(StaticSiteBuildProperties, self).__init__(**kwargs) + self.app_location = app_location + self.api_location = api_location + self.app_artifact_location = app_artifact_location + + +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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_name': {'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'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(StaticSiteCustomDomainOverviewARMResource, self).__init__(kind=kind, **kwargs) + self.domain_name = None + self.created_on = None + + +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.v2019_08_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: str=None, **kwargs) -> None: + super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, **kwargs) + self.function_name = None + self.trigger_type = 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 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.v2019_08_01.models.StaticSiteBuildProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + def __init__(self, *, kind: str=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, **kwargs) -> None: + super(StaticSitePatchResource, self).__init__(kind=kind, **kwargs) + self.default_hostname = None + self.repository_url = repository_url + self.branch = branch + self.custom_domains = None + self.repository_token = repository_token + self.build_properties = build_properties + + +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: str=None, repository_token: str=None, should_update_repository: bool=None, **kwargs) -> None: + super(StaticSiteResetPropertiesARMResource, self).__init__(kind=kind, **kwargs) + self.repository_token = repository_token + self.should_update_repository = should_update_repository + + +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: str=None, roles: str=None, **kwargs) -> None: + super(StaticSiteUserARMResource, self).__init__(kind=kind, **kwargs) + self.provider = None + self.user_id = None + self.display_name = None + self.roles = roles + + +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: str=None, domain: str=None, provider: str=None, user_details: str=None, roles: str=None, num_hours_to_expiration: int=None, **kwargs) -> None: + 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 + :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: str=None, **kwargs) -> None: + super(StaticSiteUserInvitationResponseResource, self).__init__(kind=kind, **kwargs) + self.expires_on = None + self.invitation_url = None + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, properties=None, **kwargs) -> None: + super(StringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +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: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: + super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) + self.subnet_resource_id = subnet_resource_id + self.swift_supported = swift_supported + + +class TldLegalAgreement(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: str=None, **kwargs) -> None: + super(TldLegalAgreement, self).__init__(**kwargs) + self.agreement_key = agreement_key + self.title = title + self.content = content + self.url = url + + +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 true, then the top level domain supports + domain privacy; otherwise, 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: str=None, privacy: bool=None, **kwargs) -> None: + super(TopLevelDomain, self).__init__(kind=kind, **kwargs) + self.privacy = privacy + + +class TopLevelDomainAgreementOption(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + """ + + _attribute_map = { + 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, + 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, + } + + def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: + super(TopLevelDomainAgreementOption, self).__init__(**kwargs) + self.include_privacy = include_privacy + self.for_transfer = for_transfer + + +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.v2019_08_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: str=None, runs=None, **kwargs) -> None: + super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) + self.runs = runs + + +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.v2019_08_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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': 'TriggeredWebJobStatus'}, + '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: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: + 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.v2019_08_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.v2019_08_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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2019_08_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': 'ComputeModeOptions'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: + 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(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' + :type type: str or + ~azure.mgmt.web.v2019_08_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: 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 + """ + + _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'}, + } + + def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, container_registry_base_url: str=None, container_registry_username: str=None, container_registry_password: str=None, container_image_repository: str=None, container_image_tag: str=None, container_image_platform: str=None, **kwargs) -> None: + 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 + + +class ValidateResponse(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.v2019_08_01.models.ValidateResponseError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ValidateResponseError'}, + } + + def __init__(self, *, status: str=None, error=None, **kwargs) -> None: + super(ValidateResponse, self).__init__(**kwargs) + self.status = status + self.error = error + + +class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: + super(ValidateResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2019_08_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +class VirtualIPMapping(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: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, service_name: str=None, **kwargs) -> None: + 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(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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=None, subnet: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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.v2019_08_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: + 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 + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: + 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 + + +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.v2019_08_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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + 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 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.v2019_08_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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, *, kind: str=None, failed: bool=None, failed_tests=None, **kwargs) -> None: + super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) + self.failed = failed + self.failed_tests = failed_tests + + +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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: + super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) + self.test_name = test_name + self.details = details + + +class WebAppCollection(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.v2019_08_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, **kwargs) -> None: + super(WebAppCollection, 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.v2019_08_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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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.v2019_08_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 Diagnose and Solve Portal + :type console_url: str + :param containers: + :type containers: dict[str, + ~azure.mgmt.web.v2019_08_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': 'SiteRuntimeState'}, + 'status_url': {'key': 'properties.statusUrl', 'type': 'str'}, + 'detector_url': {'key': 'properties.detectorUrl', 'type': 'str'}, + 'console_url': {'key': 'properties.consoleUrl', 'type': 'str'}, + 'containers': {'key': 'properties.containers', 'type': '{ContainerInfo}'}, + } + + def __init__(self, *, kind: str=None, state=None, status_url: str=None, detector_url: str=None, console_url: str=None, containers=None, **kwargs) -> None: + 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.containers = containers + + +class WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.v2019_08_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 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.v2019_08_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] + :param sku: + :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: + super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) + 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 + self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py new file mode 100644 index 00000000000..dcd7204abe2 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py @@ -0,0 +1,794 @@ +# 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 msrest.paging import Paged + + +class AppServiceCertificateOrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) +class AppServiceCertificateResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) +class CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) +class DomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`Domain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Domain]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainPaged, self).__init__(*args, **kwargs) +class NameIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`NameIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(NameIdentifierPaged, self).__init__(*args, **kwargs) +class DomainOwnershipIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) +class TopLevelDomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`TopLevelDomain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} + } + + def __init__(self, *args, **kwargs): + + super(TopLevelDomainPaged, self).__init__(*args, **kwargs) +class TldLegalAgreementPaged(Paged): + """ + A paging container for iterating over a list of :class:`TldLegalAgreement ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} + } + + def __init__(self, *args, **kwargs): + + super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) +class CertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`Certificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Certificate]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificatePaged, self).__init__(*args, **kwargs) +class DeletedSitePaged(Paged): + """ + A paging container for iterating over a list of :class:`DeletedSite ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeletedSite]'} + } + + def __init__(self, *args, **kwargs): + + super(DeletedSitePaged, self).__init__(*args, **kwargs) +class DetectorResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorResponsePaged, self).__init__(*args, **kwargs) +class DiagnosticCategoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiagnosticCategory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} + } + + def __init__(self, *args, **kwargs): + + super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) +class AnalysisDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AnalysisDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) +class DetectorDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) +class ApplicationStackResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationStackResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationStackResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationStackResourcePaged, self).__init__(*args, **kwargs) +class RecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Recommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Recommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendationPaged, self).__init__(*args, **kwargs) +class SourceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlPaged, self).__init__(*args, **kwargs) +class BillingMeterPaged(Paged): + """ + A paging container for iterating over a list of :class:`BillingMeter ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BillingMeter]'} + } + + def __init__(self, *args, **kwargs): + + super(BillingMeterPaged, self).__init__(*args, **kwargs) +class GeoRegionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoRegion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoRegion]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoRegionPaged, self).__init__(*args, **kwargs) +class IdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`Identifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Identifier]'} + } + + def __init__(self, *args, **kwargs): + + super(IdentifierPaged, self).__init__(*args, **kwargs) +class PremierAddOnOfferPaged(Paged): + """ + A paging container for iterating over a list of :class:`PremierAddOnOffer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} + } + + def __init__(self, *args, **kwargs): + + super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) +class SitePaged(Paged): + """ + A paging container for iterating over a list of :class:`Site ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Site]'} + } + + def __init__(self, *args, **kwargs): + + super(SitePaged, self).__init__(*args, **kwargs) +class BackupItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupItem]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupItemPaged, self).__init__(*args, **kwargs) +class SiteConfigResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) +class SiteConfigurationSnapshotInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) +class ContinuousWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContinuousWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) +class DeploymentPaged(Paged): + """ + A paging container for iterating over a list of :class:`Deployment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Deployment]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentPaged, self).__init__(*args, **kwargs) +class FunctionEnvelopePaged(Paged): + """ + A paging container for iterating over a list of :class:`FunctionEnvelope ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} + } + + def __init__(self, *args, **kwargs): + + super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) +class HostNameBindingPaged(Paged): + """ + A paging container for iterating over a list of :class:`HostNameBinding ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} + } + + def __init__(self, *args, **kwargs): + + super(HostNameBindingPaged, self).__init__(*args, **kwargs) +class SiteInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteInstancePaged, self).__init__(*args, **kwargs) +class ProcessInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessInfoPaged, self).__init__(*args, **kwargs) +class ProcessModuleInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessModuleInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) +class ProcessThreadInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessThreadInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) +class PerfMonResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`PerfMonResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(PerfMonResponsePaged, self).__init__(*args, **kwargs) +class PublicCertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`PublicCertificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} + } + + def __init__(self, *args, **kwargs): + + super(PublicCertificatePaged, self).__init__(*args, **kwargs) +class SiteExtensionInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteExtensionInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) +class SlotDifferencePaged(Paged): + """ + A paging container for iterating over a list of :class:`SlotDifference ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SlotDifference]'} + } + + def __init__(self, *args, **kwargs): + + super(SlotDifferencePaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) +class TriggeredWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) +class TriggeredJobHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredJobHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) +class CsmUsageQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmUsageQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) +class WebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(WebJobPaged, self).__init__(*args, **kwargs) +class StaticSiteARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteUserARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteUserARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteUserARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteUserARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteBuildARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteBuildARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteBuildARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteFunctionOverviewARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteFunctionOverviewARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteFunctionOverviewARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteCustomDomainOverviewARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteCustomDomainOverviewARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteCustomDomainOverviewARMResourcePaged, self).__init__(*args, **kwargs) +class AppServiceEnvironmentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) +class StampCapacityPaged(Paged): + """ + A paging container for iterating over a list of :class:`StampCapacity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StampCapacity]'} + } + + def __init__(self, *args, **kwargs): + + super(StampCapacityPaged, self).__init__(*args, **kwargs) +class InboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class WorkerPoolResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkerPoolResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) +class ResourceMetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) +class SkuInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInfoPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class OutboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class AppServicePlanPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServicePlan ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServicePlanPaged, self).__init__(*args, **kwargs) +class StrPaged(Paged): + """ + A paging container for iterating over a list of str object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[str]'} + } + + def __init__(self, *args, **kwargs): + + super(StrPaged, self).__init__(*args, **kwargs) +class HybridConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`HybridConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HybridConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(HybridConnectionPaged, self).__init__(*args, **kwargs) +class ResourceHealthMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) +class KubeEnvironmentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`KubeEnvironmentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[KubeEnvironmentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(KubeEnvironmentResourcePaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..9db2853518a --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py @@ -0,0 +1,637 @@ +# 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 + + +class KeyVaultSecretStatus(str, Enum): + + 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 CertificateProductType(str, Enum): + + standard_domain_validated_ssl = "StandardDomainValidatedSsl" + standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class CertificateOrderStatus(str, Enum): + + pendingissuance = "Pendingissuance" + issued = "Issued" + revoked = "Revoked" + canceled = "Canceled" + denied = "Denied" + pendingrevocation = "Pendingrevocation" + pending_rekey = "PendingRekey" + unused = "Unused" + expired = "Expired" + not_submitted = "NotSubmitted" + + +class CertificateOrderActionType(str, Enum): + + 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 RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + none = "None" + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + + +class IpFilterTag(str, Enum): + + default = "Default" + xff_proxy = "XffProxy" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 AzureStorageType(str, Enum): + + azure_files = "AzureFiles" + azure_blob = "AzureBlob" + + +class AzureStorageState(str, Enum): + + ok = "Ok" + invalid_credentials = "InvalidCredentials" + invalid_share = "InvalidShare" + + +class ScmType(str, Enum): + + 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 ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class FtpsState(str, Enum): + + all_allowed = "AllAllowed" + ftps_only = "FtpsOnly" + disabled = "Disabled" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class ClientCertMode(str, Enum): + + required = "Required" + optional = "Optional" + + +class RedundancyMode(str, Enum): + + none = "None" + manual = "Manual" + failover = "Failover" + active_active = "ActiveActive" + geo_redundant = "GeoRedundant" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class DomainStatus(str, Enum): + + 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 AzureResourceType(str, Enum): + + website = "Website" + traffic_manager = "TrafficManager" + + +class CustomHostNameDnsRecordType(str, Enum): + + cname = "CName" + a = "A" + + +class HostNameType(str, Enum): + + verified = "Verified" + managed = "Managed" + + +class DnsType(str, Enum): + + azure_dns = "AzureDns" + default_domain_registrar_dns = "DefaultDomainRegistrarDns" + + +class DomainType(str, Enum): + + regular = "Regular" + soft_deleted = "SoftDeleted" + + +class HostingEnvironmentStatus(str, Enum): + + preparing = "Preparing" + ready = "Ready" + scaling = "Scaling" + deleting = "Deleting" + + +class InternalLoadBalancingMode(str, Enum): + + none = "None" + web = "Web" + publishing = "Publishing" + + +class ComputeModeOptions(str, Enum): + + shared = "Shared" + dedicated = "Dedicated" + dynamic = "Dynamic" + + +class WorkerSizeOptions(str, Enum): + + small = "Small" + medium = "Medium" + large = "Large" + d1 = "D1" + d2 = "D2" + d3 = "D3" + nested_small = "NestedSmall" + default = "Default" + + +class AccessControlEntryAction(str, Enum): + + permit = "Permit" + deny = "Deny" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" + + +class IssueType(str, Enum): + + 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 SolutionType(str, Enum): + + quick_solution = "QuickSolution" + deep_investigation = "DeepInvestigation" + best_practices = "BestPractices" + + +class RenderingType(str, Enum): + + no_graph = "NoGraph" + table = "Table" + time_series = "TimeSeries" + time_series_per_instance = "TimeSeriesPerInstance" + + +class ResourceScopeType(str, Enum): + + server_farm = "ServerFarm" + subscription = "Subscription" + web_site = "WebSite" + + +class NotificationLevel(str, Enum): + + critical = "Critical" + warning = "Warning" + information = "Information" + non_urgent_suggestion = "NonUrgentSuggestion" + + +class Channels(str, Enum): + + notification = "Notification" + api = "Api" + email = "Email" + webhook = "Webhook" + all = "All" + + +class AppServicePlanRestrictions(str, Enum): + + none = "None" + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class InAvailabilityReasonType(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class CheckNameResourceTypes(str, Enum): + + site = "Site" + slot = "Slot" + hosting_environment = "HostingEnvironment" + publishing_user = "PublishingUser" + microsoft_websites = "Microsoft.Web/sites" + microsoft_websitesslots = "Microsoft.Web/sites/slots" + microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" + microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" + + +class ValidateResourceTypes(str, Enum): + + server_farm = "ServerFarm" + site = "Site" + + +class ResolveStatus(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" + + +class ConfigReferenceSource(str, Enum): + + key_vault = "KeyVault" + + +class ConfigReferenceLocation(str, Enum): + + application_setting = "ApplicationSetting" + + +class LogLevel(str, Enum): + + off = "Off" + verbose = "Verbose" + information = "Information" + warning = "Warning" + error = "Error" + + +class BackupItemStatus(str, Enum): + + 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 DatabaseType(str, Enum): + + sql_azure = "SqlAzure" + my_sql = "MySql" + local_my_sql = "LocalMySql" + postgre_sql = "PostgreSql" + + +class FrequencyUnit(str, Enum): + + day = "Day" + hour = "Hour" + + +class ContinuousWebJobStatus(str, Enum): + + initializing = "Initializing" + starting = "Starting" + running = "Running" + pending_restart = "PendingRestart" + stopped = "Stopped" + + +class WebJobType(str, Enum): + + continuous = "Continuous" + triggered = "Triggered" + + +class PublishingProfileFormat(str, Enum): + + file_zilla3 = "FileZilla3" + web_deploy = "WebDeploy" + ftp = "Ftp" + + +class DnsVerificationTestResult(str, Enum): + + passed = "Passed" + failed = "Failed" + skipped = "Skipped" + + +class MSDeployLogEntryType(str, Enum): + + message = "Message" + warning = "Warning" + error = "Error" + + +class MSDeployProvisioningState(str, Enum): + + accepted = "accepted" + running = "running" + succeeded = "succeeded" + failed = "failed" + canceled = "canceled" + + +class MySqlMigrationType(str, Enum): + + local_to_remote = "LocalToRemote" + remote_to_local = "RemoteToLocal" + + +class PublicCertificateLocation(str, Enum): + + current_user_my = "CurrentUserMy" + local_machine_my = "LocalMachineMy" + unknown = "Unknown" + + +class BackupRestoreOperationType(str, Enum): + + default = "Default" + clone = "Clone" + relocation = "Relocation" + snapshot = "Snapshot" + cloud_fs = "CloudFS" + + +class UnauthenticatedClientAction(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + + +class BuiltInAuthenticationProvider(str, Enum): + + azure_active_directory = "AzureActiveDirectory" + facebook = "Facebook" + google = "Google" + microsoft_account = "MicrosoftAccount" + twitter = "Twitter" + + +class CloneAbilityResult(str, Enum): + + cloneable = "Cloneable" + partially_cloneable = "PartiallyCloneable" + not_cloneable = "NotCloneable" + + +class SiteExtensionType(str, Enum): + + gallery = "Gallery" + web_root = "WebRoot" + + +class TriggeredWebJobStatus(str, Enum): + + success = "Success" + failed = "Failed" + error = "Error" + + +class SiteRuntimeState(str, Enum): + + ready = "READY" + stopped = "STOPPED" + unknown = "UNKNOWN" + + +class BuildStatus(str, Enum): + + waiting_for_deployment = "WaitingForDeployment" + uploading = "Uploading" + deploying = "Deploying" + ready = "Ready" + failed = "Failed" + deleting = "Deleting" + detached = "Detached" + + +class TriggerTypes(str, Enum): + + http_trigger = "HttpTrigger" + unknown = "Unknown" + + +class K8SEProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + waiting = "Waiting" + initialization_in_progress = "InitializationInProgress" + arm_deployment_in_progress = "ARMDeploymentInProgress" + arm_deployment_finished = "ARMDeploymentFinished" + infrastructure_setup_in_progress = "InfrastructureSetupInProgress" + infrastructure_setup_complete = "InfrastructureSetupComplete" + scheduled_for_delete = "ScheduledForDelete" + deletion_in_progress = "DeletionInProgress" + upgrade_requested = "UpgradeRequested" + upgrade_failed = "UpgradeFailed" + initialization_failed = "InitializationFailed" + + +class K8SENetworkPlugin(str, Enum): + + kubenet = "kubenet" + azure = "azure" + + +class SkuName(str, Enum): + + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + dynamic = "Dynamic" + isolated = "Isolated" + premium_v2 = "PremiumV2" + elastic_premium = "ElasticPremium" + elastic_isolated = "ElasticIsolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py new file mode 100644 index 00000000000..499340c06fa --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py @@ -0,0 +1,48 @@ +# 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_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 ._provider_operations import ProviderOperations +from ._recommendations_operations import RecommendationsOperations +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 +from ._kube_environments_operations import KubeEnvironmentsOperations +from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin + +__all__ = [ + 'AppServiceCertificateOrdersOperations', + 'CertificateRegistrationProviderOperations', + 'DomainsOperations', + 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', + 'CertificatesOperations', + 'DeletedWebAppsOperations', + 'DiagnosticsOperations', + 'ProviderOperations', + 'RecommendationsOperations', + 'WebAppsOperations', + 'StaticSitesOperations', + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', + 'ResourceHealthMetadataOperations', + 'KubeEnvironmentsOperations', + 'WebSiteManagementClientOperationsMixin', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_certificate_orders_operations.py new file mode 100644 index 00000000000..a4be5eff7a0 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_certificate_orders_operations.py @@ -0,0 +1,1423 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceCertificateOrdersOperations(object): + """AppServiceCertificateOrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all certificate orders in a subscription. + + Description for List all certificate orders in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def validate_purchase_information( + self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate_purchase_information.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def get( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + + def _create_or_update_initial( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateOrder or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def delete( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.AppServiceCertificateOrderPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def list_certificates( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_certificates.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} + + def get_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + + def _create_or_update_certificate_initial( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.AppServiceCertificateResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def delete_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.AppServiceCertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def reissue( + self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.ReissueCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reissue.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} + + def renew( + self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.RenewCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} + + def resend_email( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.resend_email.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} + + def resend_request_emails( + self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): + """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: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.resend_request_emails.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} + + def retrieve_site_seal( + self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): + """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 light_theme: If 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSeal or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSeal or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) + + # Construct URL + url = self.retrieve_site_seal.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSeal', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} + + def verify_domain_ownership( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_domain_ownership.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} + + def retrieve_certificate_actions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2019_08_01.models.CertificateOrderAction] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_actions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateOrderAction]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} + + def retrieve_certificate_email_history( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.CertificateEmail] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_email_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateEmail]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_environments_operations.py new file mode 100644 index 00000000000..cc00719e9de --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_environments_operations.py @@ -0,0 +1,2858 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceEnvironmentsOperations(object): + """AppServiceEnvironmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all App Service Environments for a subscription. + + Description for Get all App Service Environments for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.AppServiceEnvironmentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceEnvironmentResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 true to force the deletion + even if the App Service Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.AppServiceEnvironmentPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def list_capacities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StampCapacity + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StampCapacityPaged[~azure.mgmt.web.v2019_08_01.models.StampCapacity] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_capacities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} + + def get_vip_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.AddressResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vip_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} + + + def _change_vnet_initial( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): + vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) + + # Construct URL + url = self.change_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def change_vnet( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 id: Resource id of the Virtual Network. + :type id: str + :param subnet: Subnet within the Virtual Network. + :type subnet: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._change_vnet_initial( + resource_group_name=resource_group_name, + name=name, + id=id, + subnet=subnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} + + def list_diagnostics( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2019_08_01.models.HostingEnvironmentDiagnostics] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_diagnostics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} + + def get_diagnostics_item( + self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostingEnvironmentDiagnostics or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.HostingEnvironmentDiagnostics or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostics_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} + + def get_inbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2019_08_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2019_08_01.models.InboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_inbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} + + def list_multi_role_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} + + def get_multi_role_pool( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + + def _create_or_update_multi_role_pool_initial( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def list_multi_role_pool_instance_metric_definitions( + self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} + + def list_multi_role_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} + + def list_multi_role_pool_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SkuInfoPaged[~azure.mgmt.web.v2019_08_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} + + def list_multi_role_usages( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2019_08_01.models.UsagePaged[~azure.mgmt.web.v2019_08_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} + + def list_operations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.Operation] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_operations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Operation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} + + def get_outbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OutboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2019_08_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2019_08_01.models.OutboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_outbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} + + def reboot( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reboot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} + + + def _resume_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.resume.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def resume( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} + + def list_app_service_plans( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServicePlanPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_app_service_plans.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} + + def list_web_apps( + self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} + + + def _suspend_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.suspend.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def suspend( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} + + def list_worker_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} + + def get_worker_pool( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + + def _create_or_update_worker_pool_initial( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def list_worker_pool_instance_metric_definitions( + self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} + + def list_web_worker_metric_definitions( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} + + def list_worker_pool_skus( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SkuInfoPaged[~azure.mgmt.web.v2019_08_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} + + def list_web_worker_usages( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2019_08_01.models.UsagePaged[~azure.mgmt.web.v2019_08_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_plans_operations.py new file mode 100644 index 00000000000..9e251b26889 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_plans_operations.py @@ -0,0 +1,1946 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServicePlansOperations(object): + """AppServicePlansOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, detailed=None, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans for a subscription. + + Description for Get all App Service plans for a subscription. + + :param detailed: Specify true to return all App Service + plan properties. The default is false, which returns a + subset of the properties. + Retrieval of all properties may increase the API latency. + :type detailed: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServicePlanPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + if detailed is not None: + query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AppServicePlanPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlan') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.AppServicePlan + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AppServicePlan or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.AppServicePlan]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.AppServicePlanPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def list_capabilities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.Capability] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_capabilities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Capability]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_web_apps_by_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of str + :rtype: ~azure.mgmt.web.v2019_08_01.models.StrPaged[str] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps_by_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} + + def get_hybrid_connection_plan_limit( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionLimits or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnectionLimits or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_plan_limit.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionLimits', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HybridConnection + :rtype: + ~azure.mgmt.web.v2019_08_01.models.HybridConnectionPaged[~azure.mgmt.web.v2019_08_01.models.HybridConnection] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} + + def restart_web_apps( + self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): + """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 true to perform a soft + restart, applies the configuration settings and restarts the apps if + necessary. The default is false, which always restarts + and reprovisions the apps + :type soft_restart: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} + + def list_web_apps( + self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} + + def get_server_farm_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_server_farm_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} + + def list_vnets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} + + def get_vnet_from_server_farm( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_from_server_farm.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_routes_for_vnet( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_routes_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} + + def get_route_for_vnet( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_route_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def create_or_update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def delete_vnet_route( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def reboot_worker( + self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reboot_worker.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificate_registration_provider_operations.py new file mode 100644 index 00000000000..7343d0e6393 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificate_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificateRegistrationProviderOperations(object): + """CertificateRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificates_operations.py new file mode 100644 index 00000000000..3f969cef555 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificates_operations.py @@ -0,0 +1,437 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all certificates for a subscription. + + Description for Get all certificates for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CertificatePaged[~azure.mgmt.web.v2019_08_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CertificatePaged[~azure.mgmt.web.v2019_08_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def create_or_update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.Certificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'Certificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.CertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_deleted_web_apps_operations.py new file mode 100644 index 00000000000..56e57117028 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_deleted_web_apps_operations.py @@ -0,0 +1,238 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DeletedWebAppsOperations(object): + """DeletedWebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all deleted apps for a subscription. + + Description for Get all deleted apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DeletedSitePaged[~azure.mgmt.web.v2019_08_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DeletedSitePaged[~azure.mgmt.web.v2019_08_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} + + def get_deleted_web_app_by_location( + self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeletedSite or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DeletedSite or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deleted_web_app_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeletedSite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_diagnostics_operations.py new file mode 100644 index 00000000000..bafb68e7b58 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_diagnostics_operations.py @@ -0,0 +1,1713 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DiagnosticsOperations(object): + """DiagnosticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_hosting_environment_detector_responses( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DetectorResponsePaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hosting_environment_detector_responses.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} + + def get_hosting_environment_detector_response( + self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hosting_environment_detector_response.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} + + def list_site_detector_responses( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DetectorResponsePaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} + + def get_site_detector_response( + self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} + + def list_site_diagnostic_categories( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} + + def get_site_diagnostic_category( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AnalysisDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.AnalysisDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AnalysisDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector( + self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector( + self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} + + def list_site_detector_responses_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DetectorResponsePaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} + + def get_site_detector_response_slot( + self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} + + def list_site_diagnostic_categories_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} + + def get_site_diagnostic_category_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AnalysisDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.AnalysisDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AnalysisDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector_slot( + self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector_slot( + self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domain_registration_provider_operations.py new file mode 100644 index 00000000000..0bc953a446e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domain_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DomainRegistrationProviderOperations(object): + """DomainRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py new file mode 100644 index 00000000000..d14df260f87 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py @@ -0,0 +1,1090 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DomainsOperations(object): + """DomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def check_availability( + self, name=None, custom_headers=None, raw=False, **operation_config): + """Check if a domain is available for registration. + + Description for Check if a domain is available for registration. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainAvailabilityCheckResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DomainAvailabilityCheckResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.check_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainAvailabilityCheckResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all domains in a subscription. + + Description for Get all domains in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DomainPaged[~azure.mgmt.web.v2019_08_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} + + def get_control_center_sso_request( + self, custom_headers=None, raw=False, **operation_config): + """Generate a single sign-on request for the domain management portal. + + Description for Generate a single sign-on request for the domain + management portal. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainControlCenterSsoRequest or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DomainControlCenterSsoRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_control_center_sso_request.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainControlCenterSsoRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} + + def list_recommendations( + self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): + """Get domain name recommendations based on keywords. + + Description for Get domain name recommendations based on keywords. + + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NameIdentifier + :rtype: + ~azure.mgmt.web.v2019_08_01.models.NameIdentifierPaged[~azure.mgmt.web.v2019_08_01.models.NameIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommendations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DomainPaged[~azure.mgmt.web.v2019_08_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} + + def get( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'Domain') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.Domain + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Domain]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def delete( + self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): + """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 true to delete + the domain immediately. The default is false which + deletes the domain after 24 hours. + :type force_hard_delete_domain: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.DomainPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'DomainPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def list_ownership_identifiers( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DomainOwnershipIdentifier + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_ownership_identifiers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} + + def get_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def create_or_update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """Creates an ownership identifier for a domain or updates identifier + details for an existing identifer. + + Description for Creates an ownership identifier for a domain or updates + identifier details for an existing identifer. + + :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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.create_or_update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def delete_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """Creates an ownership identifier for a domain or updates identifier + details for an existing identifer. + + Description for Creates an ownership identifier for a domain or updates + identifier details for an existing identifer. + + :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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def renew( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py new file mode 100644 index 00000000000..84b4d1e0efa --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py @@ -0,0 +1,508 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class KubeEnvironmentsOperations(object): + """KubeEnvironmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Get all Kubernetes Environments for a subscription. + + Description for Get all Kubernetes Environments for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of KubeEnvironmentResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResourcePaged[~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.KubeEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all the Kubernetes Environments in a resource group. + + Description for Get all the Kubernetes Environments in a resource + group. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of KubeEnvironmentResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResourcePaged[~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.KubeEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the properties of a Kubernetes Environment. + + Description for Get the properties of a Kubernetes 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 Kubernetes Environment. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KubeEnvironmentResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KubeEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + + + def _create_initial( + self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('KubeEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('KubeEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a Kubernetes Environment. + + Description for Create a Kubernetes 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 Kubernetes Environment. + :type name: str + :param kube_environment_envelope: Configuration details of the + Kubernetes Environment. + :type kube_environment_envelope: + ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns KubeEnvironmentResource + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + name=name, + kube_environment_envelope=kube_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('KubeEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + + + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a Kubernetes Environment. + + Description for Delete a Kubernetes 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 Kubernetes Environment. + :type name: str + :param force_delete: Specify true to force the deletion + even if the Kubernetes Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + + def update( + self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, **operation_config): + """Updates a Kubernetes Environment. + + Description for Updates a Kubernetes 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 Kubernetes Environment. + :type name: str + :param kube_environment_envelope: Configuration details of the + Kubernetes Environment. + :type kube_environment_envelope: + ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KubeEnvironmentResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KubeEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_provider_operations.py new file mode 100644 index 00000000000..5d65128919a --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_provider_operations.py @@ -0,0 +1,246 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProviderOperations(object): + """ProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def get_available_stacks( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their + versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStackResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2019_08_01.models.ApplicationStackResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks.metadata['url'] + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} + + def get_available_stacks_on_prem( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their + versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStackResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2019_08_01.models.ApplicationStackResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks_on_prem.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_recommendations_operations.py new file mode 100644 index 00000000000..cc1718ea088 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_recommendations_operations.py @@ -0,0 +1,1070 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RecommendationsOperations(object): + """RecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """List all recommendations for a subscription. + + Description for List all recommendations for a subscription. + + :param featured: Specify true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} + + def reset_all_filters( + self, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for a subscription. + + Description for Reset all recommendation opt-out settings for a + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} + + def disable_recommendation_for_subscription( + self, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} + + def list_history_for_hosting_environment( + self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} + + def list_recommended_rules_for_hosting_environment( + self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 hosting_environment_name: Name of the app. + :type hosting_environment_name: str + :param featured: Specify true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} + + def disable_all_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_all_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} + + def reset_all_filters_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} + + def get_rule_details_by_hosting_environment( + self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} + + def disable_recommendation_for_hosting_environment( + self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_hosting_environment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} + + def list_history_for_web_app( + self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} + + def list_recommended_rules_for_web_app( + self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} + + def disable_all_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_all_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} + + def reset_all_filters_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} + + def get_rule_details_by_web_app( + self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} + + def disable_recommendation_for_site( + self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_site.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_resource_health_metadata_operations.py new file mode 100644 index 00000000000..50613aefaa9 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_resource_health_metadata_operations.py @@ -0,0 +1,468 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceHealthMetadataOperations(object): + """ResourceHealthMetadataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the subscription. + + Description for List all ResourceHealthMetadata for all sites in the + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} + + def get_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} + + def list_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} + + def get_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_static_sites_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_static_sites_operations.py new file mode 100644 index 00000000000..a57504878d0 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_static_sites_operations.py @@ -0,0 +1,1820 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class StaticSitesOperations(object): + """StaticSitesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all Static Sites for a subscription. + + Description for Get all Static Sites for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteARMResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} + + def get_static_sites_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteARMResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_static_sites_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} + + def get_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def create_or_update_static_site( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.StaticSiteARMResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def delete_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def update_static_site( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.StaticSitePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def list_static_site_users( + self, resource_group_name, name, authprovider, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteUserARMResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteUserARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteUserARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_users.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteUserARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} + + def delete_static_site_user( + self, resource_group_name, name, authprovider, userid, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} + + def update_static_site_user( + self, resource_group_name, name, authprovider, userid, kind=None, roles=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param roles: The roles for the static site user, in free-form string + format + :type roles: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteUserARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + static_site_user_envelope = models.StaticSiteUserARMResource(kind=kind, roles=roles) + + # Construct URL + url = self.update_static_site_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} + + def get_static_site_builds( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteBuildARMResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteBuildARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteBuildARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_static_site_builds.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteBuildARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} + + def get_static_site_build( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteBuildARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteBuildARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteBuildARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} + + def delete_static_site_build( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} + + def create_or_update_static_site_build_function_app_settings( + self, resource_group_name, name, pr_id, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings'} + + def list_static_site_build_functions( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteFunctionOverviewARMResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_build_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} + + def list_static_site_build_function_app_settings( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 + :param pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_build_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} + + def create_or_update_static_site_function_app_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.create_or_update_static_site_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} + + def create_user_roles_invitation_link( + self, resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.StaticSiteUserInvitationRequestResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserInvitationResponseResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteUserInvitationResponseResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_user_roles_invitation_link.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} + + def list_static_site_custom_domains( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteCustomDomainOverviewARMResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteCustomDomainOverviewARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteCustomDomainOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_custom_domains.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteCustomDomainOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} + + def create_or_update_static_site_custom_domain( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteCustomDomainOverviewARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteCustomDomainOverviewARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + def delete_static_site_custom_domain( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + def validate_custom_domain_can_be_added_to_static_site( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate_custom_domain_can_be_added_to_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} + + def detach_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.detach_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} + + def list_static_site_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteFunctionOverviewARMResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} + + def list_static_site_function_app_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} + + def list_static_site_secrets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} + + def reset_static_site_api_key( + self, resource_group_name, name, reset_properties_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.StaticSiteResetPropertiesARMResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_static_site_api_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_top_level_domains_operations.py new file mode 100644 index 00000000000..7d49b049304 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_top_level_domains_operations.py @@ -0,0 +1,251 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TopLevelDomainsOperations(object): + """TopLevelDomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all top-level domains supported for registration. + + Description for Get all top-level domains supported for registration. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TopLevelDomain + :rtype: + ~azure.mgmt.web.v2019_08_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2019_08_01.models.TopLevelDomain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} + + def get( + self, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TopLevelDomain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.TopLevelDomain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TopLevelDomain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} + + def list_agreements( + self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): + """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 include_privacy: If true, then the list of + agreements will include agreements for domain privacy as well; + otherwise, false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TldLegalAgreement + :rtype: + ~azure.mgmt.web.v2019_08_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2019_08_01.models.TldLegalAgreement] + :raises: + :class:`DefaultErrorResponseException` + """ + agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_agreements.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py new file mode 100644 index 00000000000..02fa667f828 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py @@ -0,0 +1,26990 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WebAppsOperations(object): + """WebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all apps for a subscription. + + Description for Get all apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} + + def list_by_resource_group( + self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + if include_slots is not None: + query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.Site + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def delete( + self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SitePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def analyze_custom_hostname( + self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} + + def apply_slot_config_to_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_config_to_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} + + def backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} + + def list_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2019_08_01.models.BackupItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} + + def get_backup_status( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def delete_backup( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def list_backup_status_secrets( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} + + + def _restore_initial( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} + + def list_configurations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} + + def update_application_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} + + def list_application_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} + + def update_auth_settings( + self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteAuthSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} + + def get_auth_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} + + def update_azure_storage_accounts( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} + + def list_azure_storage_accounts( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} + + def update_backup_configuration( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def delete_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def get_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} + + def get_app_settings_key_vault_references( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyVaultReferenceCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyVaultReferenceCollection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_app_settings_key_vault_references.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyVaultReferenceCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} + + def get_app_setting_key_vault_reference( + self, resource_group_name, name, app_setting_key, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyVaultReferenceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyVaultReferenceResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_app_setting_key_vault_reference.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyVaultReferenceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} + + def update_connection_strings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2019_08_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} + + def list_connection_strings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_diagnostic_logs_config( + self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteLogsConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_metadata( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} + + def list_metadata( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} + + + def _list_publishing_credentials_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} + + def update_site_push_settings( + self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PushSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} + + def list_site_push_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} + + def list_slot_configuration_names( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def update_slot_configuration_names( + self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SlotConfigNamesResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def get_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def create_or_update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def list_configuration_snapshot_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} + + def get_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.recover_site_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} + + def get_container_logs_zip( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} + + def list_continuous_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2019_08_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} + + def get_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DeploymentPaged[~azure.mgmt.web.v2019_08_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} + + def get_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def create_deployment( + self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def delete_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def list_deployment_log( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} + + def discover_backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} + + def list_domain_ownership_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2019_08_01.models.IdentifierPaged[~azure.mgmt.web.v2019_08_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_initial( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + def get_ms_deploy_log( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} + + def list_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} + + def get_functions_admin_token( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} + + def get_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + + def _create_function_initial( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_function( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def delete_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def create_or_update_function_secret( + self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def delete_function_secret( + self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} + + def list_function_secrets( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} + + def list_host_keys( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} + + def list_sync_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} + + def sync_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} + + def create_or_update_host_secret( + self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def delete_host_secret( + self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2019_08_01.models.HostNameBindingPaged[~azure.mgmt.web.v2019_08_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} + + def get_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding( + self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.HostNameBinding + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def delete_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} + + def list_relay_service_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} + + def get_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def delete_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def list_instance_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteInstance + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SiteInstancePaged[~azure.mgmt.web.v2019_08_01.models.SiteInstance] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} + + def get_instance_info( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebSiteInstanceStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.WebSiteInstanceStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebSiteInstanceStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} + + def get_instance_ms_deploy_status( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + + def _create_instance_ms_deploy_operation_initial( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} + + def list_instance_processes( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} + + def get_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} + + def list_instance_process_modules( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module( + self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} + + def list_instance_process_threads( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} + + def is_cloneable( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} + + def list_site_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2019_08_01.models.BackupItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} + + def list_sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} + + + def _migrate_storage_initial( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_storage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_storage( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.StorageMigrationOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StorageMigrationResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.StorageMigrationResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.StorageMigrationResponse]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} + + + def _migrate_my_sql_initial( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_my_sql.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_my_sql( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.MigrateMySqlRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Operation or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Operation] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Operation]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} + + def get_migrate_my_sql_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} + + def get_swift_virtual_network_connection( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_swift_virtual_network.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def list_network_features( + self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): + """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. This can either be "summary" or + "detailed". + :type view: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_network_features.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} + + def get_network_trace_operation( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} + + def stop_web_site_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} + + def get_network_traces( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} + + def get_network_trace_operation_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} + + def get_network_traces_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.generate_new_site_publishing_password.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} + + def list_perf_mon_counters( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2019_08_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2019_08_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} + + def get_site_php_error_log_flag( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} + + def list_premier_add_ons( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} + + def get_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PremierAddOn + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PremierAddOnPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def get_private_access( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def put_private_access_vnet( + self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PrivateAccess + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def list_processes( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} + + def get_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def delete_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def get_process_dump( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} + + def list_process_modules( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} + + def get_process_module( + self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} + + def list_public_certificates( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2019_08_01.models.PublicCertificatePaged[~azure.mgmt.web.v2019_08_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} + + def get_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate( + self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PublicCertificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets( + self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """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 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.v2019_08_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the + DisasterRecover endpoint if true + :type include_disaster_recovery_endpoints: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} + + def reset_production_slot_config( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_production_slot_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} + + def restart( + self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} + + + def _restore_from_backup_blob_initial( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob( + self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_backup_blob_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.DeletedAppRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_deleted_app_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} + + + def _restore_snapshot_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.SnapshotRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_snapshot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} + + def list_site_extensions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} + + def get_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_initial( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def delete_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _copy_production_slot_initial( + self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, **operation_config): + copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) + + # Construct URL + url = self.copy_production_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def copy_production_slot( + self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): + """Copies a deployment slot to another deployment slot of an app. + + Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. + :type target_slot: str + :param site_config: The site object which will be merged with the + source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2019_08_01.models.SiteConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._copy_production_slot_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + site_config=site_config, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} + + def list_slots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} + + def get_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + + def _create_or_update_slot_initial( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.Site + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def delete_slot( + self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """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 true if the App Service plan + will be empty after app deletion and you want to delete the empty App + Service plan. By default, the empty App Service plan is not deleted. + :type delete_empty_server_farm: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SitePatchResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def analyze_custom_hostname_slot( + self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} + + def apply_slot_configuration_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} + + def backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} + + def list_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2019_08_01.models.BackupItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} + + def get_backup_status_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def delete_backup_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def list_backup_status_secrets_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.BackupRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} + + + def _restore_slot_initial( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} + + def list_configurations_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} + + def update_application_settings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} + + def list_application_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} + + def update_auth_settings_slot( + self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteAuthSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} + + def get_auth_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} + + def update_azure_storage_accounts_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} + + def list_azure_storage_accounts_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} + + def update_backup_configuration_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def delete_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def get_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} + + def update_connection_strings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2019_08_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} + + def list_connection_strings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_diagnostic_logs_config_slot( + self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteLogsConfig + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_metadata_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} + + def list_metadata_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} + + + def _list_publishing_credentials_slot_initial( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} + + def update_site_push_settings_slot( + self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PushSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} + + def list_site_push_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} + + def get_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def create_or_update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def list_configuration_snapshot_info_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} + + def get_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.recover_site_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} + + def get_container_logs_zip_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} + + def list_continuous_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2019_08_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} + + def get_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2019_08_01.models.DeploymentPaged[~azure.mgmt.web.v2019_08_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} + + def get_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def create_deployment_slot( + self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def delete_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def list_deployment_log_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} + + def discover_backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} + + def list_domain_ownership_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2019_08_01.models.IdentifierPaged[~azure.mgmt.web.v2019_08_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation_slot( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + def get_ms_deploy_log_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} + + def list_instance_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} + + def get_functions_admin_token_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} + + def get_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + + def _create_instance_function_slot_initial( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_function_slot( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def delete_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def create_or_update_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} + + def list_function_secrets_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} + + def list_host_keys_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} + + def list_sync_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} + + def sync_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} + + def create_or_update_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2019_08_01.models.HostNameBindingPaged[~azure.mgmt.web.v2019_08_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} + + def get_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding_slot( + self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.HostNameBinding + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def delete_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def get_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} + + def list_relay_service_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} + + def get_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def delete_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def list_instance_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteInstance + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SiteInstancePaged[~azure.mgmt.web.v2019_08_01.models.SiteInstance] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} + + def get_instance_info_slot( + self, resource_group_name, name, instance_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebSiteInstanceStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.WebSiteInstanceStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebSiteInstanceStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} + + def get_instance_ms_deploy_status_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + + def _create_instance_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation_slot( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_processes_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} + + def get_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_process_modules_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def list_instance_process_threads_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} + + def is_cloneable_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} + + def list_site_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2019_08_01.models.BackupItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} + + def list_sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} + + def get_migrate_my_sql_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} + + def get_swift_virtual_network_connection_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_swift_virtual_network_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def list_network_features_slot( + self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): + """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. This can either be "summary" or + "detailed". + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_network_features_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} + + def get_network_trace_operation_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} + + def stop_web_site_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} + + def get_network_traces_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} + + def get_network_trace_operation_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def get_network_traces_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.generate_new_site_publishing_password_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} + + def list_perf_mon_counters_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2019_08_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2019_08_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} + + def get_site_php_error_log_flag_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} + + def list_premier_add_ons_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} + + def get_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PremierAddOn + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PremierAddOnPatchResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def get_private_access_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def put_private_access_vnet_slot( + self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PrivateAccess + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def get_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """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: + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnectionResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.PrivateEndpointConnectionResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _approve_or_reject_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) + + # Construct URL + url = self.approve_or_reject_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + if response.status_code == 202: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def approve_or_reject_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2019_08_01.models.PrivateLinkConnectionState + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PrivateEndpointConnectionResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.PrivateEndpointConnectionResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.PrivateEndpointConnectionResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + kind=kind, + private_link_service_connection_state=private_link_service_connection_state, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + if response.status_code == 202: + deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get_private_link_resources( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateLinkResourcesWrapper + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_link_resources.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} + + def list_processes_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} + + def get_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def delete_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def get_process_dump_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} + + def list_process_modules_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} + + def get_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} + + def list_public_certificates_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2019_08_01.models.PublicCertificatePaged[~azure.mgmt.web.v2019_08_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} + + def get_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate_slot( + self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.PublicCertificate + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets_slot( + self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """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 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.v2019_08_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the + DisasterRecover endpoint if true + :type include_disaster_recovery_endpoints: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} + + def reset_slot_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} + + def restart_slot( + self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} + + + def _restore_from_backup_blob_slot_initial( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_backup_blob_slot_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.DeletedAppRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_deleted_app_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} + + + def _restore_snapshot_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.SnapshotRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_snapshot_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} + + def list_site_extensions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} + + def get_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_slot_initial( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def delete_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _copy_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, **operation_config): + copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) + + # Construct URL + url = self.copy_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def copy_slot_slot( + self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): + """Copies a deployment slot to another deployment slot of an app. + + Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. + :type target_slot: str + :param site_config: The site object which will be merged with the + source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2019_08_01.models.SiteConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._copy_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + site_config=site_config, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + copy_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} + + def list_slot_differences_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SlotDifferencePaged[~azure.mgmt.web.v2019_08_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} + + + def _swap_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._swap_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} + + def list_snapshots_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SnapshotPaged[~azure.mgmt.web.v2019_08_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} + + def list_snapshots_from_dr_secondary_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SnapshotPaged[~azure.mgmt.web.v2019_08_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} + + def get_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + + def _create_or_update_source_control_slot_initial( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def delete_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def start_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} + + + def _start_network_trace_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} + + def stop_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} + + def stop_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} + + def sync_repository_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_repository_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} + + def sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} + + def list_triggered_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2019_08_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} + + def get_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def run_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.run_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} + + def list_usages_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} + + def list_vnet_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} + + def get_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2019_08_01.models.WebJobPaged[~azure.mgmt.web.v2019_08_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} + + def get_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} + + def list_slot_differences_from_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SlotDifferencePaged[~azure.mgmt.web.v2019_08_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_from_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} + + + def _swap_slot_with_production_initial( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_with_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_with_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} + + def list_snapshots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SnapshotPaged[~azure.mgmt.web.v2019_08_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} + + def list_snapshots_from_dr_secondary( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SnapshotPaged[~azure.mgmt.web.v2019_08_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} + + def get_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + + def _create_or_update_source_control_initial( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): + """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.v2019_08_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def delete_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def start( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} + + + def _start_network_trace_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} + + def stop( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} + + def stop_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} + + def sync_repository( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_repository.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} + + def sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} + + def list_triggered_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2019_08_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} + + def get_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history( + self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} + + def run_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.run_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} + + def list_vnet_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} + + def get_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2019_08_01.models.WebJobPaged[~azure.mgmt.web.v2019_08_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} + + def get_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_site_management_client_operations.py new file mode 100644 index 00000000000..236763bb809 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_site_management_client_operations.py @@ -0,0 +1,1061 @@ +# 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 msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from .. import models +import uuid + + +class WebSiteManagementClientOperationsMixin(object): + + def get_publishing_user( + self, custom_headers=None, raw=False, **operation_config): + """Gets publishing user. + + Description for Gets publishing user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def update_publishing_user( + self, user_details, custom_headers=None, raw=False, **operation_config): + """Updates publishing user. + + Description for Updates publishing user. + + :param user_details: Details of publishing user + :type user_details: ~azure.mgmt.web.v2019_08_01.models.User + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(user_details, 'User') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def list_source_controls( + self, custom_headers=None, raw=False, **operation_config): + """Gets the source controls available for Azure websites. + + Description for Gets the source controls available for Azure websites. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.web.v2019_08_01.models.SourceControlPaged[~azure.mgmt.web.v2019_08_01.models.SourceControl] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_source_controls.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} + + def get_source_control( + self, source_control_type, custom_headers=None, raw=False, **operation_config): + """Gets source control token. + + Description for Gets source control token. + + :param source_control_type: Type of source control + :type source_control_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def update_source_control( + self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.SourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request_message, 'SourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def list_billing_meters( + self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BillingMeter + :rtype: + ~azure.mgmt.web.v2019_08_01.models.BillingMeterPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeter] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_billing_meters.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} + + def check_name_availability( + self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): + """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. 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.v2019_08_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceNameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) + + # Construct URL + url = self.check_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceNameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} + + def get_subscription_deployment_locations( + self, custom_headers=None, raw=False, **operation_config): + """Gets list of available geo regions plus ministamps. + + Description for Gets list of available geo regions plus ministamps. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentLocations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_subscription_deployment_locations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeploymentLocations', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} + + def list_geo_regions( + self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values + include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', + 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + :type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName + :param linux_workers_enabled: Specify true if you want to + filter to only regions that support Linux workers. + :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify true if you want to + filter to only regions that support Xenon workers. + :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify true if you + want to filter to only regions that support Linux Consumption Workers. + :type linux_dynamic_workers_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GeoRegion + :rtype: + ~azure.mgmt.web.v2019_08_01.models.GeoRegionPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegion] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_geo_regions.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} + + def list_site_identifiers_assigned_to_host_name( + self, name=None, custom_headers=None, raw=False, **operation_config): + """List all apps that are assigned to a hostname. + + Description for List all apps that are assigned to a hostname. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2019_08_01.models.IdentifierPaged[~azure.mgmt.web.v2019_08_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} + + def list_premier_add_on_offers( + self, custom_headers=None, raw=False, **operation_config): + """List all premier add-on offers. + + Description for List all premier add-on offers. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PremierAddOnOffer + :rtype: + ~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOffer] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_premier_add_on_offers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} + + def list_skus( + self, custom_headers=None, raw=False, **operation_config): + """List all SKUs. + + Description for List all SKUs. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SkuInfos or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SkuInfos', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} + + def verify_hosting_environment_vnet( + self, parameters, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.VnetParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetValidationFailureDetails or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_hosting_environment_vnet.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VnetParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetValidationFailureDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} + + def move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} + + def validate( + self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): + """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.v2019_08_01.models.ValidateRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_request, 'ValidateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} + + def validate_move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.validate_move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/version.py @@ -0,0 +1,13 @@ +# 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/version.py new file mode 100644 index 00000000000..5a57ed8b565 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/version.py @@ -0,0 +1,13 @@ +# 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.44.0" + diff --git a/src/appservice-kube/azext_appservice_kube/vsts_cd_provider.py b/src/appservice-kube/azext_appservice_kube/vsts_cd_provider.py new file mode 100644 index 00000000000..430bf56bea4 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vsts_cd_provider.py @@ -0,0 +1,60 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from __future__ import print_function +from sys import stderr +from vsts_cd_manager.continuous_delivery_manager import ContinuousDeliveryManager +from azure.cli.core._profile import Profile + + +class VstsContinuousDeliveryProvider(object): + def __init__(self): + self._progress_last_message = '' + + def setup_continuous_delivery(self, cli_ctx, + resource_group_name, name, repo_url, branch, git_token, + slot, cd_app_type_details, cd_project_url, cd_create_account, location, + test, private_repo_username, private_repo_password, webapp_list): + """ + This method sets up CD for an Azure Web App thru Team Services + """ + + # Gather information about the Azure connection + profile = Profile(cli_ctx=cli_ctx) + subscription = profile.get_subscription() + user = profile.get_current_account_user() + cred, _, _ = profile.get_login_credentials(subscription_id=None) + + cd_manager = ContinuousDeliveryManager(self._update_progress) + + # Generate an Azure token with the VSTS resource app id + auth_token = profile.get_access_token_for_resource(user, None, cd_manager.get_vsts_app_id()) + + cd_manager.set_repository_info(repo_url, branch, git_token, private_repo_username, private_repo_password) + cd_manager.set_azure_web_info(resource_group_name, name, cred, subscription['id'], + subscription['name'], subscription['tenantId'], location) + vsts_cd_status = cd_manager.setup_continuous_delivery(slot, cd_app_type_details, cd_project_url, + cd_create_account, auth_token, test, webapp_list) + return vsts_cd_status + + def remove_continuous_delivery(self): # pylint: disable=no-self-use + """ + To be Implemented + """ + # TODO: this would be called by appservice web source-control delete + + def _update_progress(self, current, total, status): + if total: + percent_done = current * 100 / total + message = '{: >3.0f}% complete: {}'.format(percent_done, status) + # Erase the previous message + # (backspace to beginning, space over the text and backspace again) + msg_len = len(self._progress_last_message) + print('\b' * msg_len + ' ' * msg_len + '\b' * msg_len, end='', file=stderr) + print(message, end='', file=stderr) + self._progress_last_message = message + stderr.flush() + if current == total: + print('', file=stderr) diff --git a/src/appservice-kube/setup.cfg b/src/appservice-kube/setup.cfg new file mode 100644 index 00000000000..3c6e79cf31d --- /dev/null +++ b/src/appservice-kube/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py new file mode 100644 index 00000000000..b6745f59942 --- /dev/null +++ b/src/appservice-kube/setup.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from codecs import open +from setuptools import setup, find_packages +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + +# TODO: Confirm this is the right version number you want and it matches your +# HISTORY.rst entry. +VERSION = '0.1.0' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', +] + +# TODO: Add any additional SDK dependencies here +DEPENDENCIES = [ + 'azure-cli-core' +] + +with open('README.rst', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='appservice-kube', + version=VERSION, + description='Microsoft Azure Command-Line Tools App Service on Kubernetes Extension', + # TODO: Update author and email, if applicable + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + # TODO: consider pointing directly to your source code instead of the generic repo + url='https://github.com/Azure/azure-cli-extensions', + long_description=README + '\n\n' + HISTORY, + license='MIT', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, + package_data={'azext_appservice_kube': ['azext_metadata.json']}, +) diff --git a/src/index.json b/src/index.json index 55f8ff59e9e..00ad8fdf22f 100644 --- a/src/index.json +++ b/src/index.json @@ -3495,6 +3495,464 @@ "sha256Digest": "779f996ffab9fd76438d8938216fcbeb6f9aecad3a23bd2097731182607e4d7a" } ], + "appservice-kube": [ + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.0-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.0-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.0" + }, + "sha256Digest": "a124af484f98d77e9f8bdb0b8944ab7bf9fec63b8ff94cddc3c2d20386116cda" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.1-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.1-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.1" + }, + "sha256Digest": "6e9184d7bc608aad51136528038c95a79dc8d4839c89716679a167fbf3d56784" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.2-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.2-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.2" + }, + "sha256Digest": "4d9fad5a646a414337cd261b2efd4eafd9c03923b8992312b9a32cab295e91e9" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.3-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.3-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.3" + }, + "sha256Digest": "10fc3945a4c805617ee0e0de56112f35a50f769128e9d4829071682aa8db56a1" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.4-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.4-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.4" + }, + "sha256Digest": "743ab9c3aef88ccba22d5f61aa56cb6ed68feb885433d6c8f2b39c7f2e2d5d34" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.5-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.5-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.5" + }, + "sha256Digest": "4ce71979442759a7d3cfabdaafe4962556f0ab9130dee887f2938d888c5ee322" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.6-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.6-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.6" + }, + "sha256Digest": "2adaa4b4552cd8d32869969000ac07d12ee108a50c358c3081e76a2500a5aeec" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.7-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.7-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.7" + }, + "sha256Digest": "9070e0f440582c26148f4307b7752235c3f5034fe4fe56f82d13723c918afee6" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.8-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.8-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.8" + }, + "sha256Digest": "9530c1347525a91b62311a443e3df4d80f00e2cdb1d40e6326cbd90cf500cfea" + } + ], "azure-batch-cli-extensions": [ { "downloadUrl": "https://github.com/Azure/azure-batch-cli-extensions/releases/download/azure-batch-cli-extensions-2.5.3/azure_batch_cli_extensions-2.5.3-py2.py3-none-any.whl", From aa0795f754f69c0c6dff9eec268ff453bc931eef Mon Sep 17 00:00:00 2001 From: Satish Ranjan Date: Fri, 15 May 2020 19:51:47 -0700 Subject: [PATCH 002/125] Retrieving function triggers from the function image --- .../azext_appservice_kube/getfunctionsjson.sh | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/appservice-kube/azext_appservice_kube/getfunctionsjson.sh diff --git a/src/appservice-kube/azext_appservice_kube/getfunctionsjson.sh b/src/appservice-kube/azext_appservice_kube/getfunctionsjson.sh new file mode 100644 index 00000000000..096da220520 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/getfunctionsjson.sh @@ -0,0 +1,29 @@ +#! /bin/sh +if [ -z "$AzureWebJobsScriptRoot" ]; then + cd /home/site/wwwroot +else + cd "$AzureWebJobsScriptRoot" +fi + +echo '{' +echo '"hostJson":' +if [ -f "host.json" ]; then + cat host.json +else + echo '{ }' +fi + +echo ',' + +echo '"functionsJson": {' + +for d in */; do + d=$(echo $d | tr -d '/') + if [ -f "${d}/function.json" ]; then + echo "\"${d}\": " + cat "${d}/function.json" + echo ',' + fi +done +echo '}' +echo '}' \ No newline at end of file From ff3b68fa21a14ead7b2206d52e695ad1b9d6f24f Mon Sep 17 00:00:00 2001 From: Satish Ranjan Date: Fri, 15 May 2020 19:52:28 -0700 Subject: [PATCH 003/125] Retrieving function triggers from the function image --- .../azext_appservice_kube/custom.py | 122 +++++++++++++++++- 1 file changed, 121 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 538b54be815..fa01362b283 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -43,6 +43,12 @@ from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory from .vsts_cd_provider import VstsContinuousDeliveryProvider +import subprocess +from subprocess import PIPE +import tempfile +import shutil +import os + logger = get_logger(__name__) @@ -472,7 +478,6 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, functionapp_def.kind = 'kubeapp,functionapp,linux' functionapp_def.reserved = True site_config.app_settings.append(NameValuePair(name='WEBSITES_PORT', value='80')) - site_config.app_settings.append(NameValuePair(name='FUNCTIONS_EXTENSION_VERSION', value='~2')) site_config.app_settings.append(NameValuePair(name='MACHINEKEY_DecryptionKey', value=str(hexlify(urandom(32)).decode()).upper())) if deployment_container_image_name: @@ -481,6 +486,8 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, value=deployment_container_image_name)) site_config.app_settings.append(NameValuePair(name='FUNCTION_APP_EDIT_MODE', value='readOnly')) site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) + function_triggers_json = retrieve_update_function_triggers(deployment_container_image_name, site_config, docker_registry_server_user, docker_registry_server_password) + site_config.app_settings.append(NameValuePair(name='K8SE_FUNCTIONS_TRIGGERS', value=function_triggers_json)) else: site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', value='true')) site_config.linux_fx_version = _get_linux_fx_kube_functionapp(runtime, runtime_version) @@ -1338,3 +1345,116 @@ def _load_stacks(self): r['setter'] = (_StackRuntimeHelper.update_site_appsettings if 'node' in r['displayName'] else _StackRuntimeHelper.update_site_config) self._stacks = result + + +class DockerHelper: + def docker_login(self, registryName, userName, password): + command = ["docker", "login", registryName, "-u", userName, "-p", password] + popen = self.run_command(command) + error = popen.stderr.read().decode("utf-8") + if error != "" and not error.startswith("WARNING!"): + error = error.replace("\n", "") + raise CLIError("An error occurred logging to image registry :" + registryName +", error:\n" + error) + + def pull_container_image(self, containerImage): + command = ["docker", "pull", containerImage] + popen = self.run_command(command) + error = popen.stderr.read().decode("utf-8") + if error != "": + error = error.replace("\n", "") + raise CLIError("An error occurred pulling image :" + containerImage +", error:\n" + error) + else: + logger.info("Pulled image " + containerImage) + + def run_container(self, containerImage, entryPoint=None): + command = ["docker", "run", "-d"] + if entryPoint is not None: + command = ["docker", "run", "--rm", "-d", "-it", "--entrypoint", entryPoint] + command.append(containerImage) + popen = self.run_command(command) + error = popen.stderr.read().decode("utf-8") + if error != "": + error = error.replace("\n", "") + raise CLIError("An error occurred trying to run container image:" + containerImage +", error:\n" + error) + else: + cont_id = popen.stdout.readline().decode("utf-8") + cont_id = cont_id.replace("\n", "") + logger.info(('The new container id: %s' % (cont_id))) + return cont_id + + def exec_container(self, containerId, args): + command = ["docker", "exec", "-t", containerId] + if not args: + command = ["docker", "exec", "-t", containerId, "/bin/sh"] + else: + command.extend(args) + popen = self.run_command(command) + error = popen.stderr.read().decode("utf-8") + if error != "": + error = error.replace("\n", "") + raise CLIError("An error occurred executing container :" + containerId +", error:\n" + error) + else: + result = popen.stdout.read().decode("utf-8") + return result + + def copy_file_folder_to_container(self, containerid, source, destination): + command = ["docker", "cp", source, containerid + ":" + destination] + popen = self.run_command(command) + error = popen.stderr.read().decode("utf-8") + if error != "": + error = error.replace("\n", "") + raise CLIError("An error occurred copying get function json shell script file %s to container :" + containerid +", error:\n" + error % (source)) + + def remove_container(self, containerName): + command = ["docker", "rm", "-f", containerName] + popen = self.run_command(command) + error = popen.stderr.read().decode("utf-8") + if error != "": + error = error.replace("\n", "") + raise CLIError("An error occurred removing image :" + containerName +", error:\n" + error) + logger.info(('The container %s has been removed' % (containerName))) + + def remove_image(self, imageName): + command = ["docker", "image", "rm", "-f", imageName] + popen = self.run_command(command) + error = popen.stderr.read().decode("utf-8") + if error != "": + error = error.replace("\n", "") + raise CLIError("An error occurred removing image :" + imageName +", error:\n" + error) + logger.info("The image %s has been successfully removed" % (imageName)) + + def run_command(self, command): + debugcommand = " - {0}".format(" ".join(command)) + logger.info("Executing docker command => " + debugcommand) + openedProcess = subprocess.Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE) + openedProcess.wait(500) + return openedProcess + + +def retrieve_update_function_triggers(container_image_name, + site_config, + docker_registry_user_name=None, + docker_registry_password=None): + image_registry_url = parse_docker_image_name(container_image_name) + dockerHelper = DockerHelper() + if docker_registry_user_name is not None and docker_registry_password is not None: + dockerHelper.docker_login(image_registry_url, docker_registry_user_name, docker_registry_password) + + dockerHelper.pull_container_image(container_image_name) + container_id = dockerHelper.run_container(container_image_name, "/bin/sh") + + #copy the getfunctionsjson.sh in the function image container + dir_path = os.path.dirname(os.path.realpath(__file__)) + get_function_sh_script_file_path = os.path.join(dir_path, "getfunctionsjson.sh") + dockerHelper.copy_file_folder_to_container(container_id, get_function_sh_script_file_path, '/getfunctionsjson.sh') + + dockerHelper.exec_container(container_id, ["chmod", "+x", "/getfunctionsjson.sh"]) + functionJson = dockerHelper.exec_container(container_id, ["/getfunctionsjson.sh"]) + functionJson = functionJson.replace("\r", "").replace("\n", "").replace(" ", "").replace(",}}", "}}") + dockerHelper.remove_container(container_id) + dockerHelper.remove_image(container_image_name) + try: + json.loads(functionJson) + except ValueError as e: + raise CLIError("No function in the image: " + container_image_name + ",error: " + e) + return functionJson From ca0276d035f546c65c1b8919d818b3fba68af88d Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Thu, 14 May 2020 21:46:12 -0700 Subject: [PATCH 004/125] Fix appservice kube list by subscription --- src/appservice-kube/azext_appservice_kube/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index fa01362b283..f36a5fc0b2f 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -112,8 +112,8 @@ def create_kube_environment(cmd, def list_kube_environments(client, resource_group_name=None): if resource_group_name is None: - return client.kube_environments.list_by_subscription() - return client.kube_environments.list_by_resource_group(resource_group_name) + return client.list_by_subscription() + return client.list_by_resource_group(resource_group_name) def update_kube_environment(cmd, From 31c796b63af1233c01814bc80586b2b46b1fcf5a Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Fri, 15 May 2020 11:10:49 -0700 Subject: [PATCH 005/125] Fix transient error when loading arguments --- src/appservice-kube/azext_appservice_kube/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/__init__.py b/src/appservice-kube/azext_appservice_kube/__init__.py index 3e25dbacf42..90bb64a558d 100644 --- a/src/appservice-kube/azext_appservice_kube/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/__init__.py @@ -29,7 +29,11 @@ def load_command_table(self, args): return self.command_table def load_arguments(self, command): - super(AppserviceCommandsLoader, self).load_arguments(command) + from sys import version_info + if version_info[0] < 3: + super(AppserviceCommandsLoader, self).load_arguments(command) + else: + super().load_arguments(command) from azext_appservice_kube._params import load_arguments load_arguments(self, command) From 9a9a90f3920b8077fd0aabc4cf0aa5def2115989 Mon Sep 17 00:00:00 2001 From: Sanchit Mehta Date: Mon, 11 May 2020 17:03:00 +0000 Subject: [PATCH 006/125] Added az webapp up support --- .../_appservice_utils.py | 22 + .../azext_appservice_kube/_constants.py | 14 + .../azext_appservice_kube/_create_util.py | 404 ++++++++++++++++++ .../azext_appservice_kube/_help.py | 28 ++ .../azext_appservice_kube/_params.py | 15 +- .../azext_appservice_kube/commands.py | 1 + .../azext_appservice_kube/custom.py | 283 +++++++++++- 7 files changed, 762 insertions(+), 5 deletions(-) create mode 100644 src/appservice-kube/azext_appservice_kube/_appservice_utils.py create mode 100644 src/appservice-kube/azext_appservice_kube/_create_util.py diff --git a/src/appservice-kube/azext_appservice_kube/_appservice_utils.py b/src/appservice-kube/azext_appservice_kube/_appservice_utils.py new file mode 100644 index 00000000000..de5ade1fe70 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_appservice_utils.py @@ -0,0 +1,22 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from ._client_factory import web_client_factory + + +def _generic_site_operation(cli_ctx, resource_group_name, name, operation_name, slot=None, + extra_parameter=None, client=None): + client = client or web_client_factory(cli_ctx) + operation = getattr(client.web_apps, + operation_name if slot is None else operation_name + '_slot') + if slot is None: + return (operation(resource_group_name, name) + if extra_parameter is None else operation(resource_group_name, + name, extra_parameter)) + + return (operation(resource_group_name, name, slot) + if extra_parameter is None else operation(resource_group_name, + name, extra_parameter, slot)) + diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py index 1077b0aed4b..a4830a59a25 100644 --- a/src/appservice-kube/azext_appservice_kube/_constants.py +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -12,7 +12,21 @@ WINDOWS_RUNTIMES = ['dotnet', 'node', 'java', 'powershell'] NODE_VERSION_DEFAULT = "10.14" +NETCORE_VERSION_DEFAULT = "2.2" +DOTNET_VERSION_DEFAULT = "4.7" +PYTHON_VERSION_DEFAULT = "3.7" +NETCORE_RUNTIME_NAME = "dotnetcore" +DOTNET_RUNTIME_NAME = "aspnet" +NODE_RUNTIME_NAME = "node" +PYTHON_RUNTIME_NAME = "python" +OS_DEFAULT = "Windows" +STATIC_RUNTIME_NAME = "static" # not an official supported runtime but used for CLI logic +NODE_VERSIONS = ['4.4', '4.5', '6.2', '6.6', '6.9', '6.11', '8.0', '8.1', '8.9', '8.11', '10.1', '10.10', '10.14'] +PYTHON_VERSIONS = ['3.7', '3.6', '2.7'] +NETCORE_VERSIONS = ['1.0', '1.1', '2.1', '2.2'] +DOTNET_VERSIONS = ['3.5', '4.7'] +LINUX_SKU_DEFAULT = "P1V2" FUNCTIONS_VERSIONS = ['2', '3'] # functions version : default node version diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py new file mode 100644 index 00000000000..f81b6f211fc --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -0,0 +1,404 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import zipfile +from os import path +from knack.util import CLIError +from knack.log import get_logger +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.mgmt.web.models import SkuDescription + +from ._constants import (NETCORE_VERSION_DEFAULT, NETCORE_VERSIONS, NODE_VERSION_DEFAULT, + NODE_VERSIONS, NETCORE_RUNTIME_NAME, NODE_RUNTIME_NAME, DOTNET_RUNTIME_NAME, + DOTNET_VERSION_DEFAULT, DOTNET_VERSIONS, STATIC_RUNTIME_NAME, + PYTHON_RUNTIME_NAME, PYTHON_VERSION_DEFAULT, LINUX_SKU_DEFAULT, OS_DEFAULT) + +logger = get_logger(__name__) + + +def _resource_client_factory(cli_ctx, **_): + from azure.cli.core.profiles import ResourceType + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) + + +def web_client_factory(cli_ctx, **_): + from azure.mgmt.web import WebSiteManagementClient + return get_mgmt_service_client(cli_ctx, WebSiteManagementClient) + +def get_runtime_version_details(file_path, lang_name, is_kube = False): + version_detected = None + version_to_create = None + if lang_name.lower() == NETCORE_RUNTIME_NAME: + # method returns list in DESC, pick the first + version_detected = parse_netcore_version(file_path)[0] + version_to_create = detect_netcore_version_tocreate(version_detected) + elif lang_name.lower() == DOTNET_RUNTIME_NAME: + # method returns list in DESC, pick the first + version_detected = parse_dotnet_version(file_path) + version_to_create = detect_dotnet_version_tocreate(version_detected) + if is_kube: + raise CLIError("Dotnet runtime is not supported for Kube Environments") + elif lang_name.lower() == NODE_RUNTIME_NAME: + if file_path == '': + version_detected = "-" + version_to_create = NODE_VERSION_DEFAULT + else: + version_detected = parse_node_version(file_path)[0] + version_to_create = detect_node_version_tocreate(version_detected) + elif lang_name.lower() == PYTHON_RUNTIME_NAME: + version_detected = "-" + version_to_create = PYTHON_VERSION_DEFAULT + elif lang_name.lower() == STATIC_RUNTIME_NAME: + version_detected = "-" + version_to_create = "-" + return {'detected': version_detected, 'to_create': version_to_create} + +def zip_contents_from_dir(dirPath, lang, is_kube = None): + relroot = os.path.abspath(os.path.join(dirPath, os.pardir)) + + path_and_file = os.path.splitdrive(dirPath)[1] + file_val = os.path.split(path_and_file)[1] + zip_file_path = relroot + os.path.sep + file_val + ".zip" + abs_src = os.path.abspath(dirPath) + with zipfile.ZipFile("{}".format(zip_file_path), "w", zipfile.ZIP_DEFLATED) as zf: + for dirname, subdirs, files in os.walk(dirPath): + # skip node_modules folder for Node apps, + # since zip_deployment will perform the build operation + # TODO: Add .deployment support in Kube BuildSVC and remove this check + if not is_kube: + if lang.lower() == NODE_RUNTIME_NAME: + subdirs[:] = [d for d in subdirs if 'node_modules' not in d] + elif lang.lower() == NETCORE_RUNTIME_NAME: + subdirs[:] = [d for d in subdirs if d not in ['obj', 'bin']] + elif lang.lower() == PYTHON_RUNTIME_NAME: + subdirs[:] = [d for d in subdirs if 'env' not in d] # Ignores dir that contain env + for filename in files: + absname = os.path.abspath(os.path.join(dirname, filename)) + arcname = absname[len(abs_src) + 1:] + zf.write(absname, arcname) + return zip_file_path + +def create_resource_group(cmd, rg_name, location): + from azure.cli.core.profiles import ResourceType, get_sdk + rcf = _resource_client_factory(cmd.cli_ctx) + resource_group = get_sdk(cmd.cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, 'ResourceGroup', mod='models') + rg_params = resource_group(location=location) + return rcf.resource_groups.create_or_update(rg_name, rg_params) + + +def _check_resource_group_exists(cmd, rg_name): + rcf = _resource_client_factory(cmd.cli_ctx) + return rcf.resource_groups.check_existence(rg_name) + + +def _check_resource_group_supports_os(cmd, rg_name, is_linux): + # get all appservice plans from RG + client = web_client_factory(cmd.cli_ctx) + plans = list(client.app_service_plans.list_by_resource_group(rg_name)) + for item in plans: + # for Linux if an app with reserved==False exists, ASP doesn't support Linux + if is_linux and not item.reserved: + return False + if not is_linux and item.reserved: + return False + return True + + +def get_num_apps_in_asp(cmd, rg_name, asp_name): + client = web_client_factory(cmd.cli_ctx) + return len(list(client.app_service_plans.list_web_apps(rg_name, asp_name))) + + +# pylint:disable=unexpected-keyword-arg +def get_lang_from_content(src_path, html=False): + # NODE: package.json should exist in the application root dir + # NETCORE & DOTNET: *.csproj should exist in the application dir + # NETCORE: netcoreapp2.0 + # DOTNET: v4.5.2 + runtime_details_dict = dict.fromkeys(['language', 'file_loc', 'default_sku']) + package_json_file = os.path.join(src_path, 'package.json') + package_python_file = os.path.join(src_path, 'requirements.txt') + static_html_file = "" + package_netcore_file = "" + runtime_details_dict['language'] = '' + runtime_details_dict['file_loc'] = '' + runtime_details_dict['default_sku'] = 'F1' + import fnmatch + for _dirpath, _dirnames, files in os.walk(src_path): + for file in files: + if html and (fnmatch.fnmatch(file, "*.html") or fnmatch.fnmatch(file, "*.htm") or + fnmatch.fnmatch(file, "*shtml.")): + static_html_file = os.path.join(src_path, file) + break + elif fnmatch.fnmatch(file, "*.csproj"): + package_netcore_file = os.path.join(src_path, file) + break + + if html: + if static_html_file: + runtime_details_dict['language'] = STATIC_RUNTIME_NAME + runtime_details_dict['file_loc'] = static_html_file + runtime_details_dict['default_sku'] = 'F1' + else: + raise CLIError("The html flag was passed, but could not find HTML files, " + "see 'https://go.microsoft.com/fwlink/?linkid=2109470' for more information") + elif os.path.isfile(package_python_file): + runtime_details_dict['language'] = PYTHON_RUNTIME_NAME + runtime_details_dict['file_loc'] = package_python_file + runtime_details_dict['default_sku'] = LINUX_SKU_DEFAULT + elif os.path.isfile(package_json_file) or os.path.isfile('server.js') or os.path.isfile('index.js'): + runtime_details_dict['language'] = NODE_RUNTIME_NAME + runtime_details_dict['file_loc'] = package_json_file if os.path.isfile(package_json_file) else '' + runtime_details_dict['default_sku'] = LINUX_SKU_DEFAULT + elif package_netcore_file: + runtime_lang = detect_dotnet_lang(package_netcore_file) + runtime_details_dict['language'] = runtime_lang + runtime_details_dict['file_loc'] = package_netcore_file + runtime_details_dict['default_sku'] = 'F1' + else: # TODO: Update the doc when the detection logic gets updated + raise CLIError("Could not auto-detect the runtime stack of your app, " + "see 'https://go.microsoft.com/fwlink/?linkid=2109470' for more information") + return runtime_details_dict + + +def detect_dotnet_lang(csproj_path): + import xml.etree.ElementTree as ET + import re + parsed_file = ET.parse(csproj_path) + root = parsed_file.getroot() + version_lang = '' + for target_ver in root.iter('TargetFramework'): + version_lang = re.sub(r'([^a-zA-Z\s]+?)', '', target_ver.text) + if 'netcore' in version_lang.lower(): + return NETCORE_RUNTIME_NAME + return DOTNET_RUNTIME_NAME + + +def parse_dotnet_version(file_path): + version_detected = ['4.7'] + try: + from xml.dom import minidom + import re + xmldoc = minidom.parse(file_path) + framework_ver = xmldoc.getElementsByTagName('TargetFrameworkVersion') + target_ver = framework_ver[0].firstChild.data + non_decimal = re.compile(r'[^\d.]+') + # reduce the version to '5.7.4' from '5.7' + if target_ver is not None: + # remove the string from the beginning of the version value + c = non_decimal.sub('', target_ver) + version_detected = c[:3] + except: # pylint: disable=bare-except + version_detected = version_detected[0] + return version_detected + + +def parse_netcore_version(file_path): + import xml.etree.ElementTree as ET + import re + version_detected = ['0.0'] + parsed_file = ET.parse(file_path) + root = parsed_file.getroot() + for target_ver in root.iter('TargetFramework'): + version_detected = re.findall(r"\d+\.\d+", target_ver.text) + # incase of multiple versions detected, return list in descending order + version_detected = sorted(version_detected, key=float, reverse=True) + return version_detected + + +def parse_node_version(file_path): + # from node experts the node value in package.json can be found here "engines": { "node": ">=10.6.0"} + import json + import re + version_detected = [] + with open(file_path) as data_file: + data = json.load(data_file) + for key, value in data.items(): + if key == 'engines' and 'node' in value: + value_detected = value['node'] + non_decimal = re.compile(r'[^\d.]+') + # remove the string ~ or > that sometimes exists in version value + c = non_decimal.sub('', value_detected) + # reduce the version to '6.0' from '6.0.0' + if '.' in c: # handle version set as 4 instead of 4.0 + num_array = c.split('.') + num = num_array[0] + "." + num_array[1] + else: + num = c + ".0" + version_detected.append(num) + return version_detected or ['0.0'] + + +def detect_netcore_version_tocreate(detected_ver): + if detected_ver in NETCORE_VERSIONS: + return detected_ver + return NETCORE_VERSION_DEFAULT + + +def detect_dotnet_version_tocreate(detected_ver): + min_ver = DOTNET_VERSIONS[0] + if detected_ver in DOTNET_VERSIONS: + return detected_ver + if detected_ver < min_ver: + return min_ver + return DOTNET_VERSION_DEFAULT + + +def detect_node_version_tocreate(detected_ver): + if detected_ver in NODE_VERSIONS: + return detected_ver + # get major version & get the closest version from supported list + major_ver = int(detected_ver.split('.')[0]) + node_ver = NODE_VERSION_DEFAULT + if major_ver < 4: + node_ver = NODE_VERSION_DEFAULT + elif major_ver >= 4 and major_ver < 6: + node_ver = '4.5' + elif major_ver >= 6 and major_ver < 8: + node_ver = '6.9' + elif major_ver >= 8 and major_ver < 10: + node_ver = NODE_VERSION_DEFAULT + elif major_ver >= 10: + node_ver = '10.14' + return node_ver + + +def find_key_in_json(json_data, key): + for k, v in json_data.items(): + if key in k: + yield v + elif isinstance(v, dict): + for id_val in find_key_in_json(v, key): + yield id_val + + +def set_location(cmd, sku, location): + client = web_client_factory(cmd.cli_ctx) + if location is None: + locs = client.list_geo_regions(sku, True) + available_locs = [] + for loc in locs: + available_locs.append(loc.name) + loc = available_locs[0] + else: + loc = location + return loc.replace(" ", "").lower() + + +# check if the RG value to use already exists and follows the OS requirements or new RG to be created +def should_create_new_rg(cmd, rg_name, is_linux): + if (_check_resource_group_exists(cmd, rg_name) and + _check_resource_group_supports_os(cmd, rg_name, is_linux)): + return False + return True + + +def does_app_already_exist(cmd, name): + """ This is used by az webapp up to verify if a site needs to be created or should just be deployed""" + client = web_client_factory(cmd.cli_ctx) + site_availability = client.check_name_availability(name, 'Microsoft.Web/sites') + # check availability returns true to name_available == site does not exist + return site_availability.name_available + + +def get_app_details(cmd, name): + client = web_client_factory(cmd.cli_ctx) + data = (list(filter(lambda x: name.lower() in x.name.lower(), client.web_apps.list()))) + _num_items = len(data) + if _num_items > 0: + return data[0] + return None + + +def get_rg_to_use(cmd, user, loc, os_name, rg_name=None): + default_rg = "{}_rg_{}_{}".format(user, os_name, loc.replace(" ", "").lower()) + # check if RG exists & can be used + if rg_name is not None and _check_resource_group_exists(cmd, rg_name): + if _check_resource_group_supports_os(cmd, rg_name, os_name.lower() == 'linux'): + return rg_name + raise CLIError("The ResourceGroup '{}' cannot be used with the os '{}'. Use a different RG".format(rg_name, + os_name)) + if rg_name is None: + rg_name = default_rg + return rg_name + + +def get_profile_username(): + from azure.cli.core._profile import Profile + user = Profile().get_current_account_user() + user = user.split('@', 1)[0] + if len(user.split('#', 1)) > 1: # on cloudShell user is in format live.com#user@domain.com + user = user.split('#', 1)[1] + return user + + +def get_sku_to_use(src_dir, html=False, sku=None): + if sku is None: + lang_details = get_lang_from_content(src_dir, html) + return lang_details.get("default_sku") + logger.info("Found sku argument, skipping use default sku") + return sku + + +def set_language(src_dir, html=False): + lang_details = get_lang_from_content(src_dir, html) + return lang_details.get('language') + + +def detect_os_form_src(src_dir, html=False): + lang_details = get_lang_from_content(src_dir, html) + language = lang_details.get('language') + return "Linux" if language is not None and language.lower() == NODE_RUNTIME_NAME \ + or language.lower() == PYTHON_RUNTIME_NAME else OS_DEFAULT + + +def get_plan_to_use(cmd, user, os_name, loc, sku, create_rg, resource_group_name, plan=None): + _default_asp = "{}_asp_{}_{}_0".format(user, os_name, loc) + if plan is None: # --plan not provided by user + # get the plan name to use + return _determine_if_default_plan_to_use(cmd, _default_asp, resource_group_name, loc, sku, create_rg) + return plan + +def get_kube_plan_to_use(cmd, kube_environment, loc, sku, create_rg, resource_group_name, plan=None): + _default_asp = "{}_asp_{}_{}_0".format(kube_environment, sku, resource_group_name) + if plan is None: # --plan not provided by user + # get the plan name to use + return _determine_if_default_plan_to_use(cmd, _default_asp, resource_group_name, loc, sku, create_rg) + return plan + +# if plan name not provided we need to get a plan name based on the OS, location & SKU +def _determine_if_default_plan_to_use(cmd, plan_name, resource_group_name, loc, sku, create_rg): + client = web_client_factory(cmd.cli_ctx) + if create_rg: # if new RG needs to be created use the default name + return plan_name + # get all ASPs in the RG & filter to the ones that contain the plan_name + _asp_generic = plan_name[:-len(plan_name.split("_")[4])] + _asp_list = (list(filter(lambda x: _asp_generic in x.name, + client.app_service_plans.list_by_resource_group(resource_group_name)))) + _num_asp = len(_asp_list) + if _num_asp: + # check if we have at least one app that can be used with the combination of loc, sku & os + selected_asp = next((a for a in _asp_list if isinstance(a.sku, SkuDescription) and + a.sku.name.lower() == sku.lower() and + (a.location.replace(" ", "").lower() == loc.lower())), None) + if selected_asp is not None: + return selected_asp.name + # from the sorted data pick the last one & check if a new ASP needs to be created + # based on SKU or not + data_sorted = sorted(_asp_list, key=lambda x: x.name) + _plan_info = data_sorted[_num_asp - 1] + _asp_num = int(_plan_info.name.split('_')[4]) + 1 # default asp created by CLI can be of type plan_num + return '{}_{}'.format(_asp_generic, _asp_num) + return plan_name + + +def should_create_new_app(cmd, rg_name, app_name): # this is currently referenced by an extension command + client = web_client_factory(cmd.cli_ctx) + for item in list(client.web_apps.list_by_resource_group(rg_name)): + if item.name.lower() == app_name.lower(): + return False + return True + diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index 5ecca9f6d64..63e9f9e0d9b 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -105,3 +105,31 @@ az appservice kube wait -g MyResourceGroup -n MyKubeEnvironment \\ --created --interval 60 """ + +helps['webapp up'] = """ +type: command +short-summary: > + Create a webapp and deploy code from a local workspace to the app. The command is required to run from the folder + where the code is present. Current support includes Node, Python, .NET Core and ASP.NET. Node, + Python apps are created as Linux apps. .Net Core, ASP.NET, and static HTML apps are created as Windows apps. + Append the html flag to deploy as a static HTML app. +examples: + - name: View the details of the app that will be created, without actually running the operation + text: > + az webapp up -n MyUniqueAppName --dryrun + - name: Create a web app with the default configuration, by running the command from the folder where the code to deployed exists. + text: > + az webapp up -n MyUniqueAppName -l locationName + - name: Create a web app in a specific region, by running the command from the folder where the code to deployed exists. + text: > + az webapp up -n MyUniqueAppName -l locationName + - name: Deploy new code to an app that was originally created using the same command + text: > + az webapp up -n MyUniqueAppName -l locationName + - name: Create a web app and enable log streaming after the deployment operation is complete. This will enable the default configuration required to enable log streaming. + text: > + az webapp up -n MyUniqueAppName --logs + - name: Create a web app and deploy as a static HTML app. + text: > + az webapp up -n MyUniqueAppName --html +""" diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 03967dd1854..56fbf2da025 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -65,6 +65,19 @@ def load_arguments(self, _): c.ignore('language') c.ignore('using_webapp_up') + with self.argument_context('webapp up') as c: + c.argument('name', arg_type=webapp_name_arg_type) + c.argument('plan', options_list=['--plan', '-p'], configured_default='appserviceplan', + completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), + help="name of the appserviceplan associated with the webapp") + c.argument('sku', arg_type=sku_arg_type) + c.argument('dryrun', help="show summary of the create and deploy operation instead of executing it", default=False, action='store_true') + c.argument('location', arg_type=get_location_type(self.cli_ctx)) + c.argument('launch_browser', help="Launch the created app using the default browser", default=False, action='store_true', options_list=['--launch-browser', '-b']) + c.argument('logs', help="Configure default logging required to enable viewing log stream immediately after launching the webapp", default=False, action='store_true') + c.argument('html', help="Ignore app detection and deploy as an html app", default=False, action='store_true') + c.argument('kube_environment', help="Name of the kube environment, if app is to be deployed to a k8 cluster", options_list=['--kube-environment', '-ke']) + with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) @@ -174,5 +187,5 @@ def load_arguments(self, _): with self.argument_context('appservice kube show') as c: c.argument('name', arg_type=name_arg_type, help='Name of the Kubernetes Environment.') - with self.argument_context('appservice kube wait') as c: + with self.argument_context('appservice kube waite') as c: c.argument('name', arg_type=name_arg_type, help='Name of the Kubernetes Environment.') diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 5aab5716505..d837babd73c 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -73,6 +73,7 @@ def load_command_table(self, _): g.custom_command('create', 'create_webapp', exception_handler=ex_handler_factory()) g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output, validator=validate_app_or_slot_exists_in_rg) + g.custom_command('up', 'webapp_up', exception_handler=ex_handler_factory()) with self.command_group('functionapp') as g: g.custom_command('create', 'create_function', exception_handler=ex_handler_factory()) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index f36a5fc0b2f..db90647a471 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -27,6 +27,8 @@ from azure.mgmt.storage import StorageManagementClient from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient +from azure.cli.core.util import get_az_user_agent + from msrestazure.tools import is_valid_resource_id, parse_resource_id from six.moves.urllib.request import urlopen @@ -39,7 +41,10 @@ from ._utils import (_normalize_sku, get_sku_name, validate_subnet_id, _generic_site_operation, _get_location_from_resource_group) - +from ._create_util import (zip_contents_from_dir, get_runtime_version_details, create_resource_group, get_app_details, + should_create_new_rg, set_location, does_app_already_exist, get_profile_username, + get_plan_to_use,get_kube_plan_to_use, get_lang_from_content, get_rg_to_use, get_sku_to_use, + detect_os_form_src) from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory from .vsts_cd_provider import VstsContinuousDeliveryProvider @@ -342,6 +347,180 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi return webapp +def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku=None, dryrun=False, logs=False, # pylint: disable=too-many-statements, + launch_browser=False, html=False, kube_environment=None, kube_environment_rg=None, kube_sku=KUBE_DEFAULT_SKU): + import os + is_kube = False + KubeEnvironmentProfile = cmd.get_models('KubeEnvironmentProfile') + if kube_environment is not None: + if resource_group_name is None: + raise CLIError("Must provide a resource group where Kube Environment '{}' exists".format(kube_id)) + is_kube = True + kube_id = _resolve_kube_environment_id(cmd.cli_ctx, kube_environment, resource_group_name) + kube_def = KubeEnvironmentProfile(id=kube_id) + kind = KUBE_ASP_KIND + parsed_id = parse_resource_id(kube_id) + kube_name = parsed_id.get("name") + kube_rg = parsed_id.get("resource_group") + if kube_name is not None and kube_rg is not None: + kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) + if kube_env is not None and kube_env.location is not None: + location = kube_env.location.replace(" ", "") + else: + raise CLIError("Kube Environment '{}' not found in subscription.".format(kube_id)) + #AppServicePlan = cmd.get_models('AppServicePlan') + src_dir = os.getcwd() + _src_path_escaped = "{}".format(src_dir.replace(os.sep, os.sep + os.sep)) + client = web_client_factory(cmd.cli_ctx) + user = get_profile_username() + _create_new_rg = False + _create_new_app = does_app_already_exist(cmd, name) + os_name = detect_os_form_src(src_dir, html) + lang_details = get_lang_from_content(src_dir, html) + language = lang_details.get('language') + # detect the version + data = get_runtime_version_details(lang_details.get('file_loc'), language, is_kube) + version_used_create = data.get('to_create') + detected_version = data.get('detected') + runtime_version = "{}|{}".format(language, version_used_create) if \ + version_used_create != "-" else version_used_create + site_config = None + if not _create_new_app: # App exists + # Get the ASP & RG info, if the ASP & RG parameters are provided we use those else we need to find those + logger.warning("Webapp %s already exists. The command will deploy contents to the existing app.", name) + app_details = get_app_details(cmd, name) + if app_details is None: + raise CLIError("Unable to retrieve details of the existing app {}. Please check that the app is a part of " + "the current subscription".format(name)) + current_rg = app_details.resource_group + if resource_group_name is not None and (resource_group_name.lower() != current_rg.lower()): + raise CLIError("The webapp {} exists in ResourceGroup {} and does not match the value entered {}. Please " + "re-run command with the correct parameters.". format(name, current_rg, resource_group_name)) + rg_name = resource_group_name or current_rg + if location is None: + loc = app_details.location.replace(" ", "").lower() + else: + loc = location.replace(" ", "").lower() + plan_details = parse_resource_id(app_details.server_farm_id) + current_plan = plan_details['name'] + if plan is not None and current_plan.lower() != plan.lower(): + raise CLIError("The plan name entered {} does not match the plan name that the webapp is hosted in {}." + "Please check if you have configured defaults for plan name and re-run command." + .format(plan, current_plan)) + plan = plan or plan_details['name'] + plan_info = client.app_service_plans.get(rg_name, plan) + sku = plan_info.sku.name if isinstance(plan_info, AppServicePlan) else 'Free' + current_os = 'Linux' if plan_info.reserved else 'Windows' + # Raise error if current OS of the app is different from the current one + if current_os.lower() != os_name.lower(): + raise CLIError("The webapp {} is a {} app. The code detected at '{}' will default to " + "'{}'. " + "Please create a new app to continue this operation.".format(name, current_os, src_dir, os)) + _is_linux = plan_info.reserved + # for an existing app check if the runtime version needs to be updated + # Get site config to check the runtime version + site_config = client.web_apps.get_configuration(rg_name, name) + else: # need to create new app, check if we need to use default RG or use user entered values + logger.warning("webapp %s doesn't exist", name) + sku = "" + if is_kube: + sku = kube_sku + loc = location + rg_name = kube_rg + _create_new_rg = False + _is_linux = False + plan = get_kube_plan_to_use(cmd, kube_environment, loc, sku, rg_name, _create_new_rg, plan) + sku_name = kube_sku + else: + sku = get_sku_to_use(src_dir, html, sku) + loc = set_location(cmd, sku, location) + rg_name = get_rg_to_use(cmd, user, loc, os_name, resource_group_name) + _is_linux = os_name.lower() == 'linux' + _create_new_rg = should_create_new_rg(cmd, rg_name, _is_linux) + sku_name = get_sku_name(sku) + plan = get_plan_to_use(cmd, user, os_name, loc, sku_name, rg_name, _create_new_rg, plan) + dry_run_str = r""" { + "name" : "%s", + "appserviceplan" : "%s", + "resourcegroup" : "%s", + "sku": "%s", + "os": "%s", + "location" : "%s", + "src_path" : "%s", + "runtime_version_detected": "%s", + "runtime_version": "%s" + } + """ % (name, plan, rg_name, sku_name, os_name, loc, _src_path_escaped, detected_version, + runtime_version) + create_json = json.loads(dry_run_str) + + if dryrun: + logger.warning("Web app will be created with the below configuration,re-run command " + "without the --dryrun flag to create & deploy a new app") + return create_json + if _create_new_rg: + logger.warning("Creating Resource group '%s' ...", rg_name) + create_resource_group(cmd, rg_name, location) + logger.warning("Resource group creation complete") + # create ASP + logger.warning("Creating AppServicePlan '%s' ...", plan) + if is_kube: + logger.warning("Creating AppServicePlan '%s' with 1 instance count on kube cluster '%s' ...", plan, kube_environment) + else: + logger.warning("Creating AppServicePlan '%s' ...", plan) + # we will always call the ASP create or update API so that in case of re-deployment, if the SKU or plan setting are + # updated we update those + create_app_service_plan(cmd, rg_name, plan, _is_linux, hyper_v=False, per_site_scaling=False, sku=sku, + number_of_workers=1 if _is_linux else None, location=location, kube_environment=kube_environment) + logger.warning("Successfully AppServicePlan '%s' ...", plan) + if _create_new_app: + logger.warning("Creating webapp '%s' ...", name) + create_webapp(cmd, rg_name, name, plan, runtime_version if _is_linux or is_kube else None, + using_webapp_up=True, language=language) + if not is_kube: + _configure_default_logging(cmd, rg_name, name) + else: + logger.warning("Successfully App '%s' on Kube Cluster '%s'...", plan, kube_environment) + else: # for existing app if we might need to update the stack runtime settings + if os_name.lower() == 'linux' and site_config.linux_fx_version != runtime_version: + logger.warning('Updating runtime version from %s to %s', + site_config.linux_fx_version, runtime_version) + update_site_configs(cmd, rg_name, name, linux_fx_version=runtime_version) + elif os_name.lower() == 'windows' and site_config.windows_fx_version != runtime_version: + logger.warning('Updating runtime version from %s to %s', + site_config.windows_fx_version, runtime_version) + update_site_configs(cmd, rg_name, name, windows_fx_version=runtime_version) + create_json['runtime_version'] = runtime_version + # Zip contents & Deploy + logger.warning("Creating zip with contents of dir %s ...", src_dir) + # zip contents & deploy + zip_file_path = zip_contents_from_dir(src_dir, language, is_kube) + enable_zip_deploy(cmd, rg_name, name, zip_file_path) + # Remove the file after deployment, handling exception if user removed the file manually + try: + os.remove(zip_file_path) + except OSError: + pass + + if launch_browser: + logger.warning("Launching app using default browser") + view_in_browser(cmd, rg_name, name, None, logs) + else: + _url = _get_url(cmd, rg_name, name) + logger.warning("You can launch the app at %s", _url) + create_json.update({'URL': _url}) + if logs: + if not is_kube: + _configure_default_logging(cmd, rg_name, name) + return get_streaming_log(cmd, rg_name, name) + if not is_kube: + with ConfiguredDefaultSetter(cmd.cli_ctx.config, True): + cmd.cli_ctx.config.set_value('defaults', 'group', rg_name) + cmd.cli_ctx.config.set_value('defaults', 'sku', sku) + cmd.cli_ctx.config.set_value('defaults', 'appserviceplan', plan) + cmd.cli_ctx.config.set_value('defaults', 'location', loc) + cmd.cli_ctx.config.set_value('defaults', 'web', name) + return create_json def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): webapp = app_instance @@ -407,12 +586,12 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, is_linux = plan_info.reserved functionapp_def.server_farm_id = plan functionapp_def.location = location - is_kube = False if plan_info.kind.upper() == KUBE_ASP_KIND: is_kube = True if is_kube: + functionapp_def.server_farm_id = plan_info.id if min_worker_count is not None: site_config.number_of_workers = min_worker_count @@ -476,7 +655,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, site_config.linux_fx_version = _get_linux_fx_functionapp(functions_version, runtime, runtime_version) elif is_kube: functionapp_def.kind = 'kubeapp,functionapp,linux' - functionapp_def.reserved = True + functionapp_def.reserved = False site_config.app_settings.append(NameValuePair(name='WEBSITES_PORT', value='80')) site_config.app_settings.append(NameValuePair(name='MACHINEKEY_DecryptionKey', value=str(hexlify(urandom(32)).decode()).upper())) @@ -1233,7 +1412,6 @@ def _build_app_settings_output(app_settings, slot_cfg_names): 'value': app_settings[p], 'slotSetting': p in slot_cfg_names} for p in _mask_creds_related_appsettings(app_settings)] - def _rename_server_farm_props(webapp): # Should be renamed in SDK in a future release setattr(webapp, 'app_service_plan_id', webapp.server_farm_id) @@ -1241,12 +1419,109 @@ def _rename_server_farm_props(webapp): return webapp +def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=None): + logger.warning("Getting scm site credentials for zip deployment") + user_name, password = _get_site_credential(cmd.cli_ctx, resource_group_name, name, slot) + + try: + scm_url = _get_scm_url(cmd, resource_group_name, name, slot) + except ValueError: + raise CLIError('Failed to fetch scm url for function app') + + zip_url = scm_url + '/api/zipdeploy?isAsync=true' + deployment_status_url = scm_url + '/api/deployments/latest' + + import urllib3 + authorization = urllib3.util.make_headers(basic_auth='{0}:{1}'.format(user_name, password)) + headers = authorization + headers['Content-Type'] = 'application/octet-stream' + headers['Cache-Control'] = 'no-cache' + headers['User-Agent'] = get_az_user_agent() + print(headers['User-Agent']) + import requests + import os + from azure.cli.core.util import should_disable_connection_verify + # Read file content + with open(os.path.realpath(os.path.expanduser(src)), 'rb') as fs: + zip_content = fs.read() + logger.warning("Starting zip deployment. This operation can take a while to complete ...") + res = requests.post(zip_url, data=zip_content, headers=headers, verify=not should_disable_connection_verify()) + logger.warning("Deployment endpoint responded with status code %d", res.status_code) + + # check if there's an ongoing process + if res.status_code == 409: + raise CLIError("There may be an ongoing deployment or your app setting has WEBSITE_RUN_FROM_PACKAGE. " + "Please track your deployment in {} and ensure the WEBSITE_RUN_FROM_PACKAGE app setting " + "is removed.".format(deployment_status_url)) + + # check the status of async deployment + response = _check_zip_deployment_status(cmd, resource_group_name, name, deployment_status_url, + authorization, timeout) + return response + + +def _get_scm_url(cmd, resource_group_name, name, slot=None): + from azure.mgmt.web.models import HostType + webapp = show_webapp(cmd, resource_group_name, name, slot=slot) + for host in webapp.host_name_ssl_states or []: + if host.host_type == HostType.repository: + return "https://{}".format(host.name) + + +def _get_site_credential(cli_ctx, resource_group_name, name, slot=None): + creds = _generic_site_operation(cli_ctx, resource_group_name, name, 'list_publishing_credentials', slot) + creds = creds.result() + return (creds.publishing_user_name, creds.publishing_password) + + +def _check_zip_deployment_status(cmd, rg_name, name, deployment_status_url, authorization, timeout=None): + import requests + from azure.cli.core.util import should_disable_connection_verify + total_trials = (int(timeout) // 2) if timeout else 450 + num_trials = 0 + while num_trials < total_trials: + time.sleep(2) + response = requests.get(deployment_status_url, headers=authorization, + verify=not should_disable_connection_verify()) + try: + res_dict = response.json() + except json.decoder.JSONDecodeError: + logger.warning("Deployment status endpoint %s returns malformed data. Retrying...", deployment_status_url) + res_dict = {} + finally: + num_trials = num_trials + 1 + + if res_dict.get('status', 0) == 3: + _configure_default_logging(cmd, rg_name, name) + raise CLIError("""Zip deployment failed. {}. Please run the command az webapp log tail + -n {} -g {}""".format(res_dict, name, rg_name)) + if res_dict.get('status', 0) == 4: + break + if 'progress' in res_dict: + logger.info(res_dict['progress']) # show only in debug mode, customers seem to find this confusing + # if the deployment is taking longer than expected + if res_dict.get('status', 0) != 4: + _configure_default_logging(cmd, rg_name, name) + raise CLIError("""Timeout reached by the command, however, the deployment operation + is still on-going. Navigate to your scm site to check the deployment status""") + return res_dict + + def _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot=None): profiles = list_publish_profiles(cmd, resource_group_name, name, slot) url = next(p['publishUrl'] for p in profiles if p['publishMethod'] == 'FTP') setattr(webapp, 'ftpPublishingUrl', url) return webapp +def _get_url(cmd, resource_group_name, name, slot=None): + SslState = cmd.get_models('SslState') + site = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) + if not site: + raise CLIError("'{}' app doesn't exist".format(name)) + url = site.enabled_host_names[0] # picks the custom domain URL incase a domain is assigned + ssl_host = next((h for h in site.host_name_ssl_states + if h.ssl_state != SslState.disabled), None) + return ('https' if ssl_host else 'http') + '://' + url # help class handles runtime stack in format like 'node|6.1', 'php|5.5' class _StackRuntimeHelper(object): From b7fb86447385bb8240c9c2df90badb47568486b6 Mon Sep 17 00:00:00 2001 From: Sanchit Mehta Date: Tue, 26 May 2020 14:58:40 +0000 Subject: [PATCH 007/125] Handled code review comments --- .../azext_appservice_kube/_client_factory.py | 4 ++ .../azext_appservice_kube/_create_util.py | 16 ++------ .../azext_appservice_kube/_params.py | 4 +- .../azext_appservice_kube/custom.py | 38 +++++++++++-------- 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_client_factory.py b/src/appservice-kube/azext_appservice_kube/_client_factory.py index c6ebf729914..de3479d00c8 100644 --- a/src/appservice-kube/azext_appservice_kube/_client_factory.py +++ b/src/appservice-kube/azext_appservice_kube/_client_factory.py @@ -38,6 +38,10 @@ def _polish_bad_errors(ex): def web_client_factory(cli_ctx, **_): return get_mgmt_service_client(cli_ctx, CUSTOM_MGMT_APPSERVICE) +def resource_client_factory(cli_ctx, **_): + from azure.cli.core.profiles import ResourceType + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) + def cf_kube_environments(cli_ctx, *_): return web_client_factory(cli_ctx).kube_environments diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py index f81b6f211fc..8f7e457f236 100644 --- a/src/appservice-kube/azext_appservice_kube/_create_util.py +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -15,19 +15,9 @@ NODE_VERSIONS, NETCORE_RUNTIME_NAME, NODE_RUNTIME_NAME, DOTNET_RUNTIME_NAME, DOTNET_VERSION_DEFAULT, DOTNET_VERSIONS, STATIC_RUNTIME_NAME, PYTHON_RUNTIME_NAME, PYTHON_VERSION_DEFAULT, LINUX_SKU_DEFAULT, OS_DEFAULT) - +from ._client_factory import web_client_factory, resource_client_factory logger = get_logger(__name__) - -def _resource_client_factory(cli_ctx, **_): - from azure.cli.core.profiles import ResourceType - return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) - - -def web_client_factory(cli_ctx, **_): - from azure.mgmt.web import WebSiteManagementClient - return get_mgmt_service_client(cli_ctx, WebSiteManagementClient) - def get_runtime_version_details(file_path, lang_name, is_kube = False): version_detected = None version_to_create = None @@ -83,14 +73,14 @@ def zip_contents_from_dir(dirPath, lang, is_kube = None): def create_resource_group(cmd, rg_name, location): from azure.cli.core.profiles import ResourceType, get_sdk - rcf = _resource_client_factory(cmd.cli_ctx) + rcf = resource_client_factory(cmd.cli_ctx) resource_group = get_sdk(cmd.cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, 'ResourceGroup', mod='models') rg_params = resource_group(location=location) return rcf.resource_groups.create_or_update(rg_name, rg_params) def _check_resource_group_exists(cmd, rg_name): - rcf = _resource_client_factory(cmd.cli_ctx) + rcf = resource_client_factory(cmd.cli_ctx) return rcf.resource_groups.check_existence(rg_name) diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 56fbf2da025..c5a3f05ef08 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -76,7 +76,7 @@ def load_arguments(self, _): c.argument('launch_browser', help="Launch the created app using the default browser", default=False, action='store_true', options_list=['--launch-browser', '-b']) c.argument('logs', help="Configure default logging required to enable viewing log stream immediately after launching the webapp", default=False, action='store_true') c.argument('html', help="Ignore app detection and deploy as an html app", default=False, action='store_true') - c.argument('kube_environment', help="Name of the kube environment, if app is to be deployed to a k8 cluster", options_list=['--kube-environment', '-ke']) + c.argument('environment', help="Name of the kube environment, if app is to be deployed to a k8 cluster", options_list=['--environment', '-e']) with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) @@ -187,5 +187,5 @@ def load_arguments(self, _): with self.argument_context('appservice kube show') as c: c.argument('name', arg_type=name_arg_type, help='Name of the Kubernetes Environment.') - with self.argument_context('appservice kube waite') as c: + with self.argument_context('appservice kube wait') as c: c.argument('name', arg_type=name_arg_type, help='Name of the Kubernetes Environment.') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index db90647a471..48a8554fea0 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -348,17 +348,17 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi return webapp def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku=None, dryrun=False, logs=False, # pylint: disable=too-many-statements, - launch_browser=False, html=False, kube_environment=None, kube_environment_rg=None, kube_sku=KUBE_DEFAULT_SKU): + launch_browser=False, html=False, environment=None): import os is_kube = False + kube_sku=KUBE_DEFAULT_SKU KubeEnvironmentProfile = cmd.get_models('KubeEnvironmentProfile') - if kube_environment is not None: + if environment is not None: if resource_group_name is None: - raise CLIError("Must provide a resource group where Kube Environment '{}' exists".format(kube_id)) + raise CLIError("Must provide a resource group where Kube Environment '{}' exists".format(kube_environment)) + kube_id = _resolve_kube_environment_id(cmd.cli_ctx, environment, resource_group_name) is_kube = True - kube_id = _resolve_kube_environment_id(cmd.cli_ctx, kube_environment, resource_group_name) kube_def = KubeEnvironmentProfile(id=kube_id) - kind = KUBE_ASP_KIND parsed_id = parse_resource_id(kube_id) kube_name = parsed_id.get("name") kube_rg = parsed_id.get("resource_group") @@ -368,7 +368,7 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku location = kube_env.location.replace(" ", "") else: raise CLIError("Kube Environment '{}' not found in subscription.".format(kube_id)) - #AppServicePlan = cmd.get_models('AppServicePlan') + AppServicePlan = cmd.get_models('AppServicePlan') src_dir = os.getcwd() _src_path_escaped = "{}".format(src_dir.replace(os.sep, os.sep + os.sep)) client = web_client_factory(cmd.cli_ctx) @@ -429,7 +429,7 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku rg_name = kube_rg _create_new_rg = False _is_linux = False - plan = get_kube_plan_to_use(cmd, kube_environment, loc, sku, rg_name, _create_new_rg, plan) + plan = get_kube_plan_to_use(cmd, environment, loc, sku, rg_name, _create_new_rg, plan) sku_name = kube_sku else: sku = get_sku_to_use(src_dir, html, sku) @@ -465,13 +465,13 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku # create ASP logger.warning("Creating AppServicePlan '%s' ...", plan) if is_kube: - logger.warning("Creating AppServicePlan '%s' with 1 instance count on kube cluster '%s' ...", plan, kube_environment) + logger.warning("Creating AppServicePlan '%s' with 1 instance count on kube cluster '%s' ...", plan, environment) else: logger.warning("Creating AppServicePlan '%s' ...", plan) # we will always call the ASP create or update API so that in case of re-deployment, if the SKU or plan setting are # updated we update those create_app_service_plan(cmd, rg_name, plan, _is_linux, hyper_v=False, per_site_scaling=False, sku=sku, - number_of_workers=1 if _is_linux else None, location=location, kube_environment=kube_environment) + number_of_workers=1 if _is_linux else None, location=location, kube_environment=environment) logger.warning("Successfully AppServicePlan '%s' ...", plan) if _create_new_app: logger.warning("Creating webapp '%s' ...", name) @@ -480,7 +480,7 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku if not is_kube: _configure_default_logging(cmd, rg_name, name) else: - logger.warning("Successfully App '%s' on Kube Cluster '%s'...", plan, kube_environment) + logger.warning("Successfully App '%s' on Kube Cluster '%s'...", plan, environment) else: # for existing app if we might need to update the stack runtime settings if os_name.lower() == 'linux' and site_config.linux_fx_version != runtime_version: logger.warning('Updating runtime version from %s to %s', @@ -495,7 +495,7 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku logger.warning("Creating zip with contents of dir %s ...", src_dir) # zip contents & deploy zip_file_path = zip_contents_from_dir(src_dir, language, is_kube) - enable_zip_deploy(cmd, rg_name, name, zip_file_path) + enable_zip_deploy(cmd, rg_name, name, zip_file_path, is_kube=is_kube) # Remove the file after deployment, handling exception if user removed the file manually try: os.remove(zip_file_path) @@ -512,7 +512,7 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku if logs: if not is_kube: _configure_default_logging(cmd, rg_name, name) - return get_streaming_log(cmd, rg_name, name) + return get_streaming_log(cmd, rg_name, name) if not is_kube: with ConfiguredDefaultSetter(cmd.cli_ctx.config, True): cmd.cli_ctx.config.set_value('defaults', 'group', rg_name) @@ -1419,10 +1419,12 @@ def _rename_server_farm_props(webapp): return webapp -def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=None): +def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=None, is_kube=False): logger.warning("Getting scm site credentials for zip deployment") user_name, password = _get_site_credential(cmd.cli_ctx, resource_group_name, name, slot) - + # Wait for a few seconds for envoy changes to propogate, for a kube app + if is_kube: + time.sleep(7) try: scm_url = _get_scm_url(cmd, resource_group_name, name, slot) except ValueError: @@ -1437,7 +1439,6 @@ def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=No headers['Content-Type'] = 'application/octet-stream' headers['Cache-Control'] = 'no-cache' headers['User-Agent'] = get_az_user_agent() - print(headers['User-Agent']) import requests import os from azure.cli.core.util import should_disable_connection_verify @@ -1448,12 +1449,19 @@ def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=No res = requests.post(zip_url, data=zip_content, headers=headers, verify=not should_disable_connection_verify()) logger.warning("Deployment endpoint responded with status code %d", res.status_code) + if is_kube and res.status_code != 202 and res.status_code != 409: + logger.warning('Something went wrong. It may take a few seconds for a new deployment to reflect on kube cluster. Retrying deployment...') + time.sleep(10) # retry in a moment + res = requests.post(zip_url, data=zip_content, headers=headers, verify=not should_disable_connection_verify()) + logger.warning("Deployment endpoint responded with status code %d", res.status_code) + # check if there's an ongoing process if res.status_code == 409: raise CLIError("There may be an ongoing deployment or your app setting has WEBSITE_RUN_FROM_PACKAGE. " "Please track your deployment in {} and ensure the WEBSITE_RUN_FROM_PACKAGE app setting " "is removed.".format(deployment_status_url)) + # check the status of async deployment response = _check_zip_deployment_status(cmd, resource_group_name, name, deployment_status_url, authorization, timeout) From 7b62957cdbf7abf47b189ff255e285cfba9d65af Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Wed, 27 May 2020 13:40:08 -0700 Subject: [PATCH 008/125] bump up version to 0.1.1 --- src/appservice-kube/HISTORY.rst | 3 +++ src/appservice-kube/setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 8c34bccfff8..75f4166af0c 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,9 @@ Release History =============== +0.1.1 +* Add az webapp up support + 0.1.0 ++++++ * Initial release. \ No newline at end of file diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index b6745f59942..4bc2825a683 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.0' +VERSION = '0.1.1' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From bb3a2a22dfc64336a6a935970fdc29283fd5daf8 Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Thu, 11 Jun 2020 14:38:54 -0700 Subject: [PATCH 009/125] Use custom sdk code for app service plan command sdk --- src/appservice-kube/azext_appservice_kube/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index d837babd73c..dfbc085bb4f 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -51,7 +51,7 @@ def load_command_table(self, _): ) appservice_plan_sdk = CliCommandType( - operations_tmpl='azure.mgmt.web.operations#AppServicePlansOperations.{}', + operations_tmpl='azext_appservice_kube.vendored_sdks.azure_mgmt_web.operations#AppServicePlansOperations.{}', client_factory=cf_plans ) From faebbf040823cbbc3d18f19fc8ccf15b2721aba5 Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Thu, 11 Jun 2020 14:46:52 -0700 Subject: [PATCH 010/125] Version 0.1.2 --- src/appservice-kube/HISTORY.rst | 5 +++++ src/appservice-kube/setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 75f4166af0c..d755520de3b 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,7 +3,12 @@ Release History =============== +0.1.2 +++++++ +* Retrieve function triggers for kube function apps + 0.1.1 +++++++ * Add az webapp up support 0.1.0 diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 4bc2825a683..5cb2165f4b7 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.1' +VERSION = '0.1.2' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From c3c0fd5f30f7e81b3aa57d29fc4b15b52a4e66ec Mon Sep 17 00:00:00 2001 From: Satish Ranjan Date: Fri, 26 Jun 2020 17:42:13 -0700 Subject: [PATCH 011/125] Private registry image support and fixig windows to unix line feed char issue to retrive triggers from a function app --- .../azext_appservice_kube/custom.py | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 48a8554fea0..5ec43a23caa 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -135,6 +135,7 @@ def update_kube_environment(cmd, def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, app_service_environment=None, kube_environment=None, sku='B1', kube_sku=KUBE_DEFAULT_SKU, number_of_workers=None, location=None, tags=None, no_wait=False): + debugpy.breakpoint() HostingEnvironmentProfile, SkuDescription, AppServicePlan, KubeEnvironmentProfile = cmd.get_models( 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan', 'KubeEnvironmentProfile') sku = _normalize_sku(sku) @@ -268,6 +269,10 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi if max_worker_count is not None: site_config.app_settings.append(NameValuePair(name='K8SE_APP_MAX_INSTANCE_COUNT', value=max_worker_count)) + if deployment_container_image_name: + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) helper = _StackRuntimeHelper(cmd, client, linux=(is_linux or is_kube)) if is_linux or is_kube: @@ -628,7 +633,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, '--functions-version. Dotnet version will be %s for this function app.', FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION[functions_version][runtime]) - con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) + con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) if is_linux: functionapp_def.kind = 'functionapp,linux' @@ -667,6 +672,9 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) function_triggers_json = retrieve_update_function_triggers(deployment_container_image_name, site_config, docker_registry_server_user, docker_registry_server_password) site_config.app_settings.append(NameValuePair(name='K8SE_FUNCTIONS_TRIGGERS', value=function_triggers_json)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) else: site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', value='true')) site_config.linux_fx_version = _get_linux_fx_kube_functionapp(runtime, runtime_version) @@ -1724,20 +1732,32 @@ def retrieve_update_function_triggers(container_image_name, dockerHelper.docker_login(image_registry_url, docker_registry_user_name, docker_registry_password) dockerHelper.pull_container_image(container_image_name) - container_id = dockerHelper.run_container(container_image_name, "/bin/sh") + container_id = dockerHelper.run_container(container_image_name, "/bin/sh") #copy the getfunctionsjson.sh in the function image container dir_path = os.path.dirname(os.path.realpath(__file__)) - get_function_sh_script_file_path = os.path.join(dir_path, "getfunctionsjson.sh") - dockerHelper.copy_file_folder_to_container(container_id, get_function_sh_script_file_path, '/getfunctionsjson.sh') - - dockerHelper.exec_container(container_id, ["chmod", "+x", "/getfunctionsjson.sh"]) - functionJson = dockerHelper.exec_container(container_id, ["/getfunctionsjson.sh"]) - functionJson = functionJson.replace("\r", "").replace("\n", "").replace(" ", "").replace(",}}", "}}") - dockerHelper.remove_container(container_id) - dockerHelper.remove_image(container_image_name) + get_function_sh_script_file_path = os.path.join(dir_path, "getfunctionsjson.sh") try: + tmp_dir = tempfile.mkdtemp() + temp_filename = "getfunctionsjson.sh" + temp_file_path = os.path.join(tmp_dir, temp_filename) + + with open(get_function_sh_script_file_path, 'rb') as open_file: + content = open_file.read() + content = content.replace(b'\r\n', b'\n') + + with open(temp_file_path, 'wb') as open_file: + open_file.write(content) + + dockerHelper.copy_file_folder_to_container(container_id, temp_file_path, '/getfunctionsjson.sh') + dockerHelper.exec_container(container_id, ["chmod", "+x", "/getfunctionsjson.sh"]) + functionJson = dockerHelper.exec_container(container_id, ["/getfunctionsjson.sh"]) + functionJson = functionJson.replace("\r", "").replace("\n", "").replace(" ", "").replace(",}}", "}}") json.loads(functionJson) except ValueError as e: - raise CLIError("No function in the image: " + container_image_name + ",error: " + e) + raise CLIError('No function in the image: ' + container_image_name + ' ,functionjson: ' + functionJson + ' ,error: ' + e.__doc__) + finally: + shutil.rmtree(tmp_dir) + dockerHelper.remove_container(container_id) + dockerHelper.remove_image(container_image_name) return functionJson From 2e2ecb4fe14bd3076b74879922a1031cc43ea0bc Mon Sep 17 00:00:00 2001 From: Satish Ranjan Date: Tue, 30 Jun 2020 10:52:48 -0700 Subject: [PATCH 012/125] Removing debugpy.breaspoint() line --- src/appservice-kube/azext_appservice_kube/custom.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 5ec43a23caa..e79a0047a2d 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -134,8 +134,7 @@ def update_kube_environment(cmd, def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, app_service_environment=None, kube_environment=None, sku='B1', kube_sku=KUBE_DEFAULT_SKU, - number_of_workers=None, location=None, tags=None, no_wait=False): - debugpy.breakpoint() + number_of_workers=None, location=None, tags=None, no_wait=False): HostingEnvironmentProfile, SkuDescription, AppServicePlan, KubeEnvironmentProfile = cmd.get_models( 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan', 'KubeEnvironmentProfile') sku = _normalize_sku(sku) @@ -633,7 +632,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, '--functions-version. Dotnet version will be %s for this function app.', FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION[functions_version][runtime]) - con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) + con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) if is_linux: functionapp_def.kind = 'functionapp,linux' From 9a1f4326d1b04b5f8b1b86ddca0adfbcab2a53cd Mon Sep 17 00:00:00 2001 From: SatishRanjan Date: Tue, 7 Jul 2020 10:56:33 -0700 Subject: [PATCH 013/125] Update custom.py Removing trailing white spaces --- src/appservice-kube/azext_appservice_kube/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index e79a0047a2d..4d36a109c40 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -134,7 +134,7 @@ def update_kube_environment(cmd, def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, app_service_environment=None, kube_environment=None, sku='B1', kube_sku=KUBE_DEFAULT_SKU, - number_of_workers=None, location=None, tags=None, no_wait=False): + number_of_workers=None, location=None, tags=None, no_wait=False): HostingEnvironmentProfile, SkuDescription, AppServicePlan, KubeEnvironmentProfile = cmd.get_models( 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan', 'KubeEnvironmentProfile') sku = _normalize_sku(sku) From 60a3e9b5b524c307cfb12c6ff2c18a9888b07046 Mon Sep 17 00:00:00 2001 From: SatishRanjan Date: Tue, 7 Jul 2020 10:57:35 -0700 Subject: [PATCH 014/125] Update custom.py Removing trailing white spaces --- src/appservice-kube/azext_appservice_kube/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 4d36a109c40..5287ba64691 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -632,7 +632,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, '--functions-version. Dotnet version will be %s for this function app.', FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION[functions_version][runtime]) - con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) + con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) if is_linux: functionapp_def.kind = 'functionapp,linux' From 694cf050cc07767e4166417fc3e4793cbea86b11 Mon Sep 17 00:00:00 2001 From: Satish Ranjan Date: Wed, 22 Jul 2020 17:15:59 -0700 Subject: [PATCH 015/125] fixing the condition when the image is from the public registry with no user name and password supplied --- src/appservice-kube/azext_appservice_kube/custom.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 5287ba64691..8213021108f 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -270,8 +270,9 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi if deployment_container_image_name: site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) + if docker_registry_server_user is not None and docker_registry_server_password is not None: + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) helper = _StackRuntimeHelper(cmd, client, linux=(is_linux or is_kube)) if is_linux or is_kube: @@ -672,8 +673,9 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, function_triggers_json = retrieve_update_function_triggers(deployment_container_image_name, site_config, docker_registry_server_user, docker_registry_server_password) site_config.app_settings.append(NameValuePair(name='K8SE_FUNCTIONS_TRIGGERS', value=function_triggers_json)) site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) + if docker_registry_server_user is not None and docker_registry_server_password is not None: + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) else: site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', value='true')) site_config.linux_fx_version = _get_linux_fx_kube_functionapp(runtime, runtime_version) From 1d3f93cc01d282004b71ad6626be7659fab084fd Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Thu, 17 Sep 2020 18:38:59 -0700 Subject: [PATCH 016/125] Update sdk, add BYO AKS cluster to kube create command --- .../azext_appservice_kube/_help.py | 3 + .../azext_appservice_kube/_params.py | 4 +- .../azext_appservice_kube/_utils.py | 18 ++ .../azext_appservice_kube/custom.py | 24 ++- .../v2019_08_01/models/__init__.py | 20 ++- .../v2019_08_01/models/_models.py | 156 ++++++++++++----- .../v2019_08_01/models/_models_py3.py | 158 +++++++++++++----- .../v2019_08_01/models/_paged_models.py | 8 +- .../_web_site_management_client_enums.py | 12 ++ .../_kube_environments_operations.py | 142 ++++++++++++---- 10 files changed, 421 insertions(+), 124 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index 63e9f9e0d9b..328ddeb9c7c 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -50,6 +50,9 @@ type: command short-summary: Create a Kubernetes Environment. examples: + - name: Create Kubernetes Environment on existing AKS cluster in the same resource group. + text: | + az appservice kube create -n MyKubeEnvironment -g MyResourceGroup --aks MyAks --static-ip 0.0.0.0 - name: Create Kubernetes Environment with default values. text: | az appservice kube create -n MyKubeEnvironment -g MyResourceGroup \\ diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index c5a3f05ef08..d692adc4dbc 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -167,10 +167,12 @@ def load_arguments(self, _): use `az network vnet [subnet] create`') c.argument('vnet_name', help='Name of the vnet. Mandatory if only subnet name is specified.') c.argument('dns_service_ip', help='Kubernetes Dns Service IP within service_cidr (commonly, .10 address). This is required if a vnet subnet is specified.') - c.argument('service_cidr', help='Address space to be used by services (nodeport/clusterip/loadbalancer). It must be within the vnet but not used by subnet. This is required if a vnet subnet is specified') + c.argument('service_cidr', help='Address space to be used by services (nodeport/clusterip/loadbalancer). It must be within the vnet but not used by subnet. This is required if a vnet subnet is specified.') c.argument('docker_bridge_cidr', help='This lets the cluster nodes communicate with the underlying management platform. This IP address must NOT be within the virtual network IP address range of your cluster, and shouldn\'t overlap with other address ranges in use on your network. Default (by AKS) is 172.17.0.1/16. If your VNET overlapped with this, you must specify others.') c.argument('workspace_id', help='Log analytics workspace ID') c.argument('tags', arg_type=tags_type) + c.argument('aks', help='AKS name or resource ID') + c.argument('static_ip', help='Static IP Address. This is required if an AKS resource ID is specified.') with self.argument_context('appservice kube update') as c: c.argument('kube_name', arg_type=name_arg_type, help='Name of the kubernetes environment.') diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index 7c5967eacf8..6300eb7a48d 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -60,6 +60,24 @@ def validate_subnet_id(cli_ctx, subnet, vnet_name, resource_group_name): raise CLIError('Usage error: --subnet ID | --subnet NAME --vnet-name NAME') +def validate_aks_id(cli_ctx, aks, resource_group_name): + from msrestazure.tools import is_valid_resource_id + aks_is_id = is_valid_resource_id(aks) + + if aks_is_id: + return aks + if aks and not aks_is_id: + from msrestazure.tools import resource_id + from azure.cli.core.commands.client_factory import get_subscription_id + return resource_id( + subscription=get_subscription_id(cli_ctx), + resource_group=resource_group_name, + namespace='Microsoft.ContainerService', + type='managedClusters', + name=aks) + raise CLIError('Usage error: --aks') + + def _generic_site_operation(cli_ctx, resource_group_name, name, operation_name, slot=None, extra_parameter=None, client=None): client = client or web_client_factory(cli_ctx) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 8213021108f..944b7ee36c1 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -40,7 +40,7 @@ CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) from ._utils import (_normalize_sku, get_sku_name, validate_subnet_id, _generic_site_operation, - _get_location_from_resource_group) + _get_location_from_resource_group, validate_aks_id) from ._create_util import (zip_contents_from_dir, get_runtime_version_details, create_resource_group, get_app_details, should_create_new_rg, set_location, does_app_already_exist, get_profile_username, get_plan_to_use,get_kube_plan_to_use, get_lang_from_content, get_rg_to_use, get_sku_to_use, @@ -63,8 +63,10 @@ def create_kube_environment(cmd, client, kube_name, resource_group_name, - client_id, - client_secret, + aks=None, + static_ip=None, + client_id=None, + client_secret=None, node_count=3, max_count=3, location=None, @@ -81,7 +83,7 @@ def create_kube_environment(cmd, tags=None, no_wait=False): - KubeEnvironmentResource, KubeNodePool = cmd.get_models('KubeEnvironmentResource', 'KubeNodePool') + KubeEnvironment, KubeNodePool = cmd.get_models('KubeEnvironment', 'KubeNodePool') location = location or _get_location_from_resource_group(cmd.cli_ctx, resource_group_name) if subnet is not None: @@ -89,6 +91,14 @@ def create_kube_environment(cmd, else: subnet_id = None + if aks is not None: + aks_id = validate_aks_id(cmd.cli_ctx, aks, resource_group_name) + else: + aks_id = None + + if aks_id and not static_ip: + raise CLIError('Usage error: --static-ip must be specified when using --aks') + # TODO: add some verifications # TODO: support creating service principal automatically @@ -98,7 +108,7 @@ def create_kube_environment(cmd, max_node_count=max_count, name=nodepool_name) - kube_def = KubeEnvironmentResource( + kube_def = KubeEnvironment( location=location, tags=tags, node_pools=[node_pool_def], @@ -110,7 +120,9 @@ def create_kube_environment(cmd, docker_bridge_cidr=docker_bridge_cidr, service_principal_client_id=client_id, service_principal_client_secret=client_secret, - log_analytics_workspace_id=workspace_id) + log_analytics_workspace_id=workspace_id, + aks_resource_id=aks_id, + static_ip=static_ip) return sdk_no_wait(no_wait, client.create, resource_group_name, kube_name, kube_def) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py index 5ddd6c68d24..6ef71ee1d34 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py @@ -31,6 +31,7 @@ from ._models_py3 import AppServiceEnvironmentResource from ._models_py3 import AppServicePlan from ._models_py3 import AppServicePlanPatchResource + from ._models_py3 import ArcConfiguration from ._models_py3 import ArmIdWrapper from ._models_py3 import AutoHealActions from ._models_py3 import AutoHealCustomAction @@ -109,6 +110,7 @@ from ._models_py3 import Experiments from ._models_py3 import FileSystemApplicationLogsConfig from ._models_py3 import FileSystemHttpLogsConfig + from ._models_py3 import FrontEndConfiguration from ._models_py3 import FunctionEnvelope from ._models_py3 import FunctionSecrets from ._models_py3 import GeoRegion @@ -131,8 +133,8 @@ from ._models_py3 import KeyInfo from ._models_py3 import KeyVaultReferenceCollection from ._models_py3 import KeyVaultReferenceResource + from ._models_py3 import KubeEnvironment from ._models_py3 import KubeEnvironmentProfile - from ._models_py3 import KubeEnvironmentResource from ._models_py3 import KubeNodePool from ._models_py3 import LocalizableString from ._models_py3 import LogSpecification @@ -287,6 +289,7 @@ from ._models import AppServiceEnvironmentResource from ._models import AppServicePlan from ._models import AppServicePlanPatchResource + from ._models import ArcConfiguration from ._models import ArmIdWrapper from ._models import AutoHealActions from ._models import AutoHealCustomAction @@ -365,6 +368,7 @@ from ._models import Experiments from ._models import FileSystemApplicationLogsConfig from ._models import FileSystemHttpLogsConfig + from ._models import FrontEndConfiguration from ._models import FunctionEnvelope from ._models import FunctionSecrets from ._models import GeoRegion @@ -387,8 +391,8 @@ from ._models import KeyInfo from ._models import KeyVaultReferenceCollection from ._models import KeyVaultReferenceResource + from ._models import KubeEnvironment from ._models import KubeEnvironmentProfile - from ._models import KubeEnvironmentResource from ._models import KubeNodePool from ._models import LocalizableString from ._models import LogSpecification @@ -546,7 +550,7 @@ from ._paged_models import HybridConnectionPaged from ._paged_models import IdentifierPaged from ._paged_models import InboundEnvironmentEndpointPaged -from ._paged_models import KubeEnvironmentResourcePaged +from ._paged_models import KubeEnvironmentPaged from ._paged_models import NameIdentifierPaged from ._paged_models import OutboundEnvironmentEndpointPaged from ._paged_models import PerfMonResponsePaged @@ -652,6 +656,8 @@ SiteRuntimeState, BuildStatus, TriggerTypes, + StorageType, + FrontEndServiceType, K8SEProvisioningState, K8SENetworkPlugin, SkuName, @@ -679,6 +685,7 @@ 'AppServiceEnvironmentResource', 'AppServicePlan', 'AppServicePlanPatchResource', + 'ArcConfiguration', 'ArmIdWrapper', 'AutoHealActions', 'AutoHealCustomAction', @@ -757,6 +764,7 @@ 'Experiments', 'FileSystemApplicationLogsConfig', 'FileSystemHttpLogsConfig', + 'FrontEndConfiguration', 'FunctionEnvelope', 'FunctionSecrets', 'GeoRegion', @@ -779,8 +787,8 @@ 'KeyInfo', 'KeyVaultReferenceCollection', 'KeyVaultReferenceResource', + 'KubeEnvironment', 'KubeEnvironmentProfile', - 'KubeEnvironmentResource', 'KubeNodePool', 'LocalizableString', 'LogSpecification', @@ -972,7 +980,7 @@ 'StrPaged', 'HybridConnectionPaged', 'ResourceHealthMetadataPaged', - 'KubeEnvironmentResourcePaged', + 'KubeEnvironmentPaged', 'KeyVaultSecretStatus', 'CertificateProductType', 'ProvisioningState', @@ -1043,6 +1051,8 @@ 'SiteRuntimeState', 'BuildStatus', 'TriggerTypes', + 'StorageType', + 'FrontEndServiceType', 'K8SEProvisioningState', 'K8SENetworkPlugin', 'SkuName', diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py index d8853cd12a0..39ddf118050 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py @@ -1991,6 +1991,49 @@ def __init__(self, **kwargs): self.kube_environment_profile = kwargs.get('kube_environment_profile', None) +class ArcConfiguration(Model): + """ArcConfiguration. + + :param artifacts_storage_type: Possible values include: 'LocalNode', + 'NetworkFileSystem' + :type artifacts_storage_type: str or + ~azure.mgmt.web.v2019_08_01.models.StorageType + :param artifact_storage_class_name: + :type artifact_storage_class_name: str + :param artifact_storage_mount_path: + :type artifact_storage_mount_path: str + :param artifact_storage_node_name: + :type artifact_storage_node_name: str + :param front_end_service_configuration: + :type front_end_service_configuration: + ~azure.mgmt.web.v2019_08_01.models.FrontEndConfiguration + :param kube_config: + :type kube_config: str + :param aks_engine_resource_group: + :type aks_engine_resource_group: str + """ + + _attribute_map = { + 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, + 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, + 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, + 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, + 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, + 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, + 'aks_engine_resource_group': {'key': 'aksEngineResourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArcConfiguration, self).__init__(**kwargs) + self.artifacts_storage_type = kwargs.get('artifacts_storage_type', None) + self.artifact_storage_class_name = kwargs.get('artifact_storage_class_name', None) + self.artifact_storage_mount_path = kwargs.get('artifact_storage_mount_path', None) + self.artifact_storage_node_name = kwargs.get('artifact_storage_node_name', None) + self.front_end_service_configuration = kwargs.get('front_end_service_configuration', None) + self.kube_config = kwargs.get('kube_config', None) + self.aks_engine_resource_group = kwargs.get('aks_engine_resource_group', None) + + class ArmIdWrapper(Model): """A wrapper for an ARM resource id. @@ -5435,6 +5478,22 @@ def __init__(self, **kwargs): self.enabled = kwargs.get('enabled', None) +class FrontEndConfiguration(Model): + """FrontEndConfiguration. + + :param kind: Possible values include: 'NodePort', 'LoadBalancer' + :type kind: str or ~azure.mgmt.web.v2019_08_01.models.FrontEndServiceType + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, + } + + def __init__(self, **kwargs): + super(FrontEndConfiguration, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + class FunctionEnvelope(ProxyOnlyResource): """Function information. @@ -6388,40 +6447,8 @@ def __init__(self, **kwargs): self.location = kwargs.get('location', None) -class KubeEnvironmentProfile(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 KubeEnvironmentResource(Resource): - """ARM resource for Kubernetes Environment. +class KubeEnvironment(Resource): + """A Kubernetes cluster specialized for web workloads by Azure App Service. Variables are only populated by the server, and will be ignored when sending a request. @@ -6496,14 +6523,26 @@ class KubeEnvironmentResource(Resource): :type service_principal_client_id: str :param service_principal_client_secret: Service Principal Client Secret :type service_principal_client_secret: str - :ivar static_ip: Static IP of the KubeEnvironment - :vartype static_ip: str + :param static_ip: Static IP of the KubeEnvironment + :type static_ip: str :param default_certificate_provision_start_time: Time when DefaultCertificateProvisioning is started, used to determine timeout for certificate provisioning :type default_certificate_provision_start_time: str :param log_analytics_workspace_id: :type log_analytics_workspace_id: str + :param compute_platform: + :type compute_platform: str + :param namespace: + :type namespace: str + :param arc_configuration: Cluster configuration which determines the ARC + cluster + components types. Eg: Choosing between BuildService kind, + FrontEnd Service ArtifactsStorageType etc. + :type arc_configuration: + ~azure.mgmt.web.v2019_08_01.models.ArcConfiguration + :param aks_resource_id: + :type aks_resource_id: str """ _validation = { @@ -6517,7 +6556,6 @@ class KubeEnvironmentResource(Resource): 'aks_cluster_resource_group': {'readonly': True}, 'kubernetes_version': {'readonly': True}, 'deployment_errors': {'readonly': True}, - 'static_ip': {'readonly': True}, } _attribute_map = { @@ -6544,10 +6582,14 @@ class KubeEnvironmentResource(Resource): 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, 'default_certificate_provision_start_time': {'key': 'properties.defaultCertificateProvisionStartTime', 'type': 'str'}, 'log_analytics_workspace_id': {'key': 'properties.logAnalyticsWorkspaceID', 'type': 'str'}, + 'compute_platform': {'key': 'properties.computePlatform', 'type': 'str'}, + 'namespace': {'key': 'properties.namespace', 'type': 'str'}, + 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, + 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, } def __init__(self, **kwargs): - super(KubeEnvironmentResource, self).__init__(**kwargs) + super(KubeEnvironment, self).__init__(**kwargs) self.provisioning_state = None self.node_pools = kwargs.get('node_pools', None) self.subscription_id = None @@ -6562,9 +6604,45 @@ def __init__(self, **kwargs): self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', None) self.service_principal_client_id = kwargs.get('service_principal_client_id', None) self.service_principal_client_secret = kwargs.get('service_principal_client_secret', None) - self.static_ip = None + self.static_ip = kwargs.get('static_ip', None) self.default_certificate_provision_start_time = kwargs.get('default_certificate_provision_start_time', None) self.log_analytics_workspace_id = kwargs.get('log_analytics_workspace_id', None) + self.compute_platform = kwargs.get('compute_platform', None) + self.namespace = kwargs.get('namespace', None) + self.arc_configuration = kwargs.get('arc_configuration', None) + self.aks_resource_id = kwargs.get('aks_resource_id', None) + + +class KubeEnvironmentProfile(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 KubeNodePool(Model): diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py index 7406bc78e43..67540b7fbec 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py @@ -1991,6 +1991,49 @@ def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_enviro self.kube_environment_profile = kube_environment_profile +class ArcConfiguration(Model): + """ArcConfiguration. + + :param artifacts_storage_type: Possible values include: 'LocalNode', + 'NetworkFileSystem' + :type artifacts_storage_type: str or + ~azure.mgmt.web.v2019_08_01.models.StorageType + :param artifact_storage_class_name: + :type artifact_storage_class_name: str + :param artifact_storage_mount_path: + :type artifact_storage_mount_path: str + :param artifact_storage_node_name: + :type artifact_storage_node_name: str + :param front_end_service_configuration: + :type front_end_service_configuration: + ~azure.mgmt.web.v2019_08_01.models.FrontEndConfiguration + :param kube_config: + :type kube_config: str + :param aks_engine_resource_group: + :type aks_engine_resource_group: str + """ + + _attribute_map = { + 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, + 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, + 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, + 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, + 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, + 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, + 'aks_engine_resource_group': {'key': 'aksEngineResourceGroup', 'type': 'str'}, + } + + def __init__(self, *, artifacts_storage_type=None, artifact_storage_class_name: str=None, artifact_storage_mount_path: str=None, artifact_storage_node_name: str=None, front_end_service_configuration=None, kube_config: str=None, aks_engine_resource_group: str=None, **kwargs) -> None: + super(ArcConfiguration, self).__init__(**kwargs) + self.artifacts_storage_type = artifacts_storage_type + self.artifact_storage_class_name = artifact_storage_class_name + self.artifact_storage_mount_path = artifact_storage_mount_path + self.artifact_storage_node_name = artifact_storage_node_name + self.front_end_service_configuration = front_end_service_configuration + self.kube_config = kube_config + self.aks_engine_resource_group = aks_engine_resource_group + + class ArmIdWrapper(Model): """A wrapper for an ARM resource id. @@ -5435,6 +5478,22 @@ def __init__(self, *, retention_in_mb: int=None, retention_in_days: int=None, en self.enabled = enabled +class FrontEndConfiguration(Model): + """FrontEndConfiguration. + + :param kind: Possible values include: 'NodePort', 'LoadBalancer' + :type kind: str or ~azure.mgmt.web.v2019_08_01.models.FrontEndServiceType + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(FrontEndConfiguration, self).__init__(**kwargs) + self.kind = kind + + class FunctionEnvelope(ProxyOnlyResource): """Function information. @@ -6388,40 +6447,8 @@ def __init__(self, *, kind: str=None, reference: str=None, status=None, vault_na self.location = location -class KubeEnvironmentProfile(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: str=None, **kwargs) -> None: - super(KubeEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class KubeEnvironmentResource(Resource): - """ARM resource for Kubernetes Environment. +class KubeEnvironment(Resource): + """A Kubernetes cluster specialized for web workloads by Azure App Service. Variables are only populated by the server, and will be ignored when sending a request. @@ -6496,14 +6523,26 @@ class KubeEnvironmentResource(Resource): :type service_principal_client_id: str :param service_principal_client_secret: Service Principal Client Secret :type service_principal_client_secret: str - :ivar static_ip: Static IP of the KubeEnvironment - :vartype static_ip: str + :param static_ip: Static IP of the KubeEnvironment + :type static_ip: str :param default_certificate_provision_start_time: Time when DefaultCertificateProvisioning is started, used to determine timeout for certificate provisioning :type default_certificate_provision_start_time: str :param log_analytics_workspace_id: :type log_analytics_workspace_id: str + :param compute_platform: + :type compute_platform: str + :param namespace: + :type namespace: str + :param arc_configuration: Cluster configuration which determines the ARC + cluster + components types. Eg: Choosing between BuildService kind, + FrontEnd Service ArtifactsStorageType etc. + :type arc_configuration: + ~azure.mgmt.web.v2019_08_01.models.ArcConfiguration + :param aks_resource_id: + :type aks_resource_id: str """ _validation = { @@ -6517,7 +6556,6 @@ class KubeEnvironmentResource(Resource): 'aks_cluster_resource_group': {'readonly': True}, 'kubernetes_version': {'readonly': True}, 'deployment_errors': {'readonly': True}, - 'static_ip': {'readonly': True}, } _attribute_map = { @@ -6544,10 +6582,14 @@ class KubeEnvironmentResource(Resource): 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, 'default_certificate_provision_start_time': {'key': 'properties.defaultCertificateProvisionStartTime', 'type': 'str'}, 'log_analytics_workspace_id': {'key': 'properties.logAnalyticsWorkspaceID', 'type': 'str'}, + 'compute_platform': {'key': 'properties.computePlatform', 'type': 'str'}, + 'namespace': {'key': 'properties.namespace', 'type': 'str'}, + 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, + 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, } - def __init__(self, *, location: str, node_pools, kind: str=None, tags=None, internal_load_balancer_enabled: bool=None, vnet_subnet_id: str=None, network_plugin=None, service_cidr: str=None, dns_service_ip: str=None, docker_bridge_cidr: str=None, service_principal_client_id: str=None, service_principal_client_secret: str=None, default_certificate_provision_start_time: str=None, log_analytics_workspace_id: str=None, **kwargs) -> None: - super(KubeEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + def __init__(self, *, location: str, node_pools, kind: str=None, tags=None, internal_load_balancer_enabled: bool=None, vnet_subnet_id: str=None, network_plugin=None, service_cidr: str=None, dns_service_ip: str=None, docker_bridge_cidr: str=None, service_principal_client_id: str=None, service_principal_client_secret: str=None, static_ip: str=None, default_certificate_provision_start_time: str=None, log_analytics_workspace_id: str=None, compute_platform: str=None, namespace: str=None, arc_configuration=None, aks_resource_id: str=None, **kwargs) -> None: + super(KubeEnvironment, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.provisioning_state = None self.node_pools = node_pools self.subscription_id = None @@ -6562,9 +6604,45 @@ def __init__(self, *, location: str, node_pools, kind: str=None, tags=None, inte self.docker_bridge_cidr = docker_bridge_cidr self.service_principal_client_id = service_principal_client_id self.service_principal_client_secret = service_principal_client_secret - self.static_ip = None + self.static_ip = static_ip self.default_certificate_provision_start_time = default_certificate_provision_start_time self.log_analytics_workspace_id = log_analytics_workspace_id + self.compute_platform = compute_platform + self.namespace = namespace + self.arc_configuration = arc_configuration + self.aks_resource_id = aks_resource_id + + +class KubeEnvironmentProfile(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: str=None, **kwargs) -> None: + super(KubeEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None class KubeNodePool(Model): diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py index dcd7204abe2..5a66741b303 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py @@ -779,16 +779,16 @@ class ResourceHealthMetadataPaged(Paged): def __init__(self, *args, **kwargs): super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) -class KubeEnvironmentResourcePaged(Paged): +class KubeEnvironmentPaged(Paged): """ - A paging container for iterating over a list of :class:`KubeEnvironmentResource ` object + A paging container for iterating over a list of :class:`KubeEnvironment ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KubeEnvironmentResource]'} + 'current_page': {'key': 'value', 'type': '[KubeEnvironment]'} } def __init__(self, *args, **kwargs): - super(KubeEnvironmentResourcePaged, self).__init__(*args, **kwargs) + super(KubeEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py index 9db2853518a..6adf1ae4afd 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py @@ -599,6 +599,18 @@ class TriggerTypes(str, Enum): unknown = "Unknown" +class StorageType(str, Enum): + + local_node = "LocalNode" + network_file_system = "NetworkFileSystem" + + +class FrontEndServiceType(str, Enum): + + node_port = "NodePort" + load_balancer = "LoadBalancer" + + class K8SEProvisioningState(str, Enum): succeeded = "Succeeded" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py index 84b4d1e0efa..348ac944a24 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py @@ -51,9 +51,9 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of KubeEnvironmentResource + :return: An iterator like instance of KubeEnvironment :rtype: - ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResourcePaged[~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource] + ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment] :raises: :class:`DefaultErrorResponseException` """ @@ -102,7 +102,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.KubeEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.KubeEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} @@ -122,9 +122,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of KubeEnvironmentResource + :return: An iterator like instance of KubeEnvironment :rtype: - ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResourcePaged[~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource] + ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment] :raises: :class:`DefaultErrorResponseException` """ @@ -174,7 +174,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.KubeEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.KubeEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} @@ -195,8 +195,8 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: KubeEnvironmentResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource or + :return: KubeEnvironment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` @@ -233,7 +233,7 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironmentResource', response) + deserialized = self._deserialize('KubeEnvironment', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -270,7 +270,7 @@ def _create_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentResource') + body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -282,9 +282,9 @@ def _create_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironmentResource', response) + deserialized = self._deserialize('KubeEnvironment', response) if response.status_code == 201: - deserialized = self._deserialize('KubeEnvironmentResource', response) + deserialized = self._deserialize('KubeEnvironment', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -306,18 +306,18 @@ def create( :param kube_environment_envelope: Configuration details of the Kubernetes Environment. :type kube_environment_envelope: - ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource + ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns KubeEnvironmentResource - or ClientRawResponse if raw==True + :return: An instance of LROPoller that returns KubeEnvironment or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment]] :raises: :class:`DefaultErrorResponseException` """ @@ -331,7 +331,7 @@ def create( ) def get_long_running_output(response): - deserialized = self._deserialize('KubeEnvironmentResource', response) + deserialized = self._deserialize('KubeEnvironment', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -368,6 +368,7 @@ def _delete_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -382,10 +383,19 @@ def _delete_initial( if response.status_code not in [202, 204]: raise models.DefaultErrorResponseException(self._deserialize, response) + deserialized = None + + if response.status_code == 202: + deserialized = self._deserialize('Operation', response) + if response.status_code == 204: + deserialized = self._deserialize('Operation', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + def delete( self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): """Delete a Kubernetes Environment. @@ -406,10 +416,12 @@ def delete( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :return: An instance of LROPoller that returns Operation or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Operation] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Operation]] :raises: :class:`DefaultErrorResponseException` """ @@ -423,10 +435,14 @@ def delete( ) def get_long_running_output(response): + deserialized = self._deserialize('Operation', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -450,14 +466,14 @@ def update( :param kube_environment_envelope: Configuration details of the Kubernetes Environment. :type kube_environment_envelope: - ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource + ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: KubeEnvironmentResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentResource or + :return: KubeEnvironment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` @@ -487,7 +503,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentResource') + body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -498,7 +514,7 @@ def update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironmentResource', response) + deserialized = self._deserialize('KubeEnvironment', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -506,3 +522,71 @@ def update( return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + + def get_operation( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Get status of a Kubernetes Environment operation. + + Description for Get status of a Kubernetes Environment 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 Kubernetes Environment. + :type name: str + :param operation_id: ID of the operation. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Operation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2019_08_01.models.Operation or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404, 500]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + if response.status_code == 202: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}/operations/{operationId}'} From 2b27df4cdd0cdc42504fe785cd52639d8ff9e1a8 Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Thu, 17 Sep 2020 18:47:36 -0700 Subject: [PATCH 017/125] Add version 0.1.3 --- src/appservice-kube/HISTORY.rst | 4 ++++ src/appservice-kube/setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index d755520de3b..b2310584da2 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.3 +++++++ +* Add bring your own AKS cluster support + 0.1.2 ++++++ * Retrieve function triggers for kube function apps diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 5cb2165f4b7..39a1878759c 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.2' +VERSION = '0.1.3' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From 8d4d3f08bc8c2b1c8d640bba43ee7a62f308171f Mon Sep 17 00:00:00 2001 From: Satish Ranjan Date: Thu, 1 Oct 2020 17:48:15 -0700 Subject: [PATCH 018/125] Copying getfunctionsjson.sh as part of appservice-kube extension and correcting the lookup path --- src/appservice-kube/azext_appservice_kube/custom.py | 5 ++++- src/appservice-kube/setup.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 944b7ee36c1..334b156e509 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -1749,7 +1749,10 @@ def retrieve_update_function_triggers(container_image_name, #copy the getfunctionsjson.sh in the function image container dir_path = os.path.dirname(os.path.realpath(__file__)) - get_function_sh_script_file_path = os.path.join(dir_path, "getfunctionsjson.sh") + get_function_sh_script_file_path = os.path.join(dir_path, "getfunctionsjson.sh") + if os.path.exists(get_function_sh_script_file_path) == False: + get_function_sh_script_file_path = os.path.join(dir_path, "..", "bin", "getfunctionsjson.sh") + try: tmp_dir = tempfile.mkdtemp() temp_filename = "getfunctionsjson.sh" diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 39a1878759c..a055cc79d0c 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -58,5 +58,6 @@ classifiers=CLASSIFIERS, packages=find_packages(), install_requires=DEPENDENCIES, + scripts=['azext_appservice_kube/getfunctionsjson.sh'], package_data={'azext_appservice_kube': ['azext_metadata.json']}, ) From 9e95f2d407ea20ddb011d0bf4acad77992f8b9db Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Mon, 5 Oct 2020 11:44:00 -0700 Subject: [PATCH 019/125] Adding version 0.1.4 --- src/appservice-kube/HISTORY.rst | 4 +++ src/appservice-kube/setup.py | 2 +- src/index.json | 60 +++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index b2310584da2..9f25c2214a7 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.4 +++++++ +* Fix for including getfunctionsjson.sh in the extension package + 0.1.3 ++++++ * Add bring your own AKS cluster support diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index a055cc79d0c..75dc55731ee 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.3' +VERSION = '0.1.4' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 00ad8fdf22f..a59f325fe54 100644 --- a/src/index.json +++ b/src/index.json @@ -1197,8 +1197,68 @@ "summary": "Provides a preview for upcoming AKS features", "version": "0.4.47" }, +<<<<<<< HEAD "sha256Digest": "042b4acfecdc98059907abce1224c0865f1a61abd566fdc00e09a61436a52e27" }, +======= + "sha256Digest": "10fc3945a4c805617ee0e0de56112f35a50f769128e9d4829071682aa8db56a1" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.4-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.4-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.4" + }, + "sha256Digest": "743ab9c3aef88ccba22d5f61aa56cb6ed68feb885433d6c8f2b39c7f2e2d5d34" + } + ], + "azure-batch-cli-extensions": [ +>>>>>>> 847cdac7... Adding version 0.1.4 { "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/aks_preview-0.4.49-py2.py3-none-any.whl", "filename": "aks_preview-0.4.49-py2.py3-none-any.whl", From 714248eb3c863c0ab8725875e8d1d405a78a116b Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 9 Oct 2020 10:55:54 -0700 Subject: [PATCH 020/125] fix --- src/appservice-kube/azext_appservice_kube/custom.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 334b156e509..910c0dda1ed 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -1140,6 +1140,10 @@ def list_publish_profiles(cmd, resource_group_name, name, slot=None): profiles = xmltodict.parse(full_xml, xml_attribs=True)['publishData']['publishProfile'] converted = [] + + if type(profiles) is not list: + profiles = [profiles] + for profile in profiles: new = {} for key in profile: @@ -1538,8 +1542,9 @@ def _check_zip_deployment_status(cmd, rg_name, name, deployment_status_url, auth def _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot=None): profiles = list_publish_profiles(cmd, resource_group_name, name, slot) - url = next(p['publishUrl'] for p in profiles if p['publishMethod'] == 'FTP') - setattr(webapp, 'ftpPublishingUrl', url) + url = next((p['publishUrl'] for p in profiles if p['publishMethod'] == 'FTP'), None) + if url: + setattr(webapp, 'ftpPublishingUrl', url) return webapp def _get_url(cmd, resource_group_name, name, slot=None): From 752926b453925e59ee9836c99a068b136813c8ac Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Fri, 9 Oct 2020 12:16:58 -0700 Subject: [PATCH 021/125] Update version to 0.1.5 --- src/appservice-kube/HISTORY.rst | 4 +++ src/appservice-kube/setup.py | 2 +- src/index.json | 53 +++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 9f25c2214a7..26a7667ca34 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.5 +++++++ +* Fix webapp show command + 0.1.4 ++++++ * Fix for including getfunctionsjson.sh in the extension package diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 75dc55731ee..e6b69b8687f 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.4' +VERSION = '0.1.5' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index a59f325fe54..8b994eecd46 100644 --- a/src/index.json +++ b/src/index.json @@ -1255,6 +1255,59 @@ "version": "0.1.4" }, "sha256Digest": "743ab9c3aef88ccba22d5f61aa56cb6ed68feb885433d6c8f2b39c7f2e2d5d34" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.5-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.5-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.5" + }, + "sha256Digest": "4ce71979442759a7d3cfabdaafe4962556f0ab9130dee887f2938d888c5ee322" } ], "azure-batch-cli-extensions": [ From 11999bbba71e64ebca57616168ff24b36d46fa3a Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Wed, 28 Oct 2020 16:31:31 -0700 Subject: [PATCH 022/125] Update kube environments SDK --- .../v2019_08_01/models/__init__.py | 9 +++ .../v2019_08_01/models/_models.py | 67 +++++++++++++++++ .../v2019_08_01/models/_models_py3.py | 71 ++++++++++++++++++- .../_kube_environments_operations.py | 28 ++------ 4 files changed, 151 insertions(+), 24 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py index 6ef71ee1d34..1cba27c44dd 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py @@ -21,6 +21,7 @@ from ._models_py3 import ApplicationLogsConfig from ._models_py3 import ApplicationStack from ._models_py3 import ApplicationStackResource + from ._models_py3 import AppLogsConfiguration from ._models_py3 import AppServiceCertificate from ._models_py3 import AppServiceCertificateOrder from ._models_py3 import AppServiceCertificateOrderPatchResource @@ -108,6 +109,7 @@ from ._models_py3 import EndpointDetail from ._models_py3 import ErrorEntity from ._models_py3 import Experiments + from ._models_py3 import ExtendedLocation from ._models_py3 import FileSystemApplicationLogsConfig from ._models_py3 import FileSystemHttpLogsConfig from ._models_py3 import FrontEndConfiguration @@ -137,6 +139,7 @@ from ._models_py3 import KubeEnvironmentProfile from ._models_py3 import KubeNodePool from ._models_py3 import LocalizableString + from ._models_py3 import LogAnalyticsConfiguration from ._models_py3 import LogSpecification from ._models_py3 import ManagedServiceIdentity from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue @@ -279,6 +282,7 @@ from ._models import ApplicationLogsConfig from ._models import ApplicationStack from ._models import ApplicationStackResource + from ._models import AppLogsConfiguration from ._models import AppServiceCertificate from ._models import AppServiceCertificateOrder from ._models import AppServiceCertificateOrderPatchResource @@ -366,6 +370,7 @@ from ._models import EndpointDetail from ._models import ErrorEntity from ._models import Experiments + from ._models import ExtendedLocation from ._models import FileSystemApplicationLogsConfig from ._models import FileSystemHttpLogsConfig from ._models import FrontEndConfiguration @@ -395,6 +400,7 @@ from ._models import KubeEnvironmentProfile from ._models import KubeNodePool from ._models import LocalizableString + from ._models import LogAnalyticsConfiguration from ._models import LogSpecification from ._models import ManagedServiceIdentity from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue @@ -675,6 +681,7 @@ 'ApplicationLogsConfig', 'ApplicationStack', 'ApplicationStackResource', + 'AppLogsConfiguration', 'AppServiceCertificate', 'AppServiceCertificateOrder', 'AppServiceCertificateOrderPatchResource', @@ -762,6 +769,7 @@ 'EndpointDetail', 'ErrorEntity', 'Experiments', + 'ExtendedLocation', 'FileSystemApplicationLogsConfig', 'FileSystemHttpLogsConfig', 'FrontEndConfiguration', @@ -791,6 +799,7 @@ 'KubeEnvironmentProfile', 'KubeNodePool', 'LocalizableString', + 'LogAnalyticsConfiguration', 'LogSpecification', 'ManagedServiceIdentity', 'ManagedServiceIdentityUserAssignedIdentitiesValue', diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py index 39ddf118050..3650093c925 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py @@ -454,6 +454,27 @@ def __init__(self, **kwargs): self.frameworks = kwargs.get('frameworks', None) +class AppLogsConfiguration(Model): + """AppLogsConfiguration. + + :param destination: + :type destination: str + :param log_analytics_configuration: + :type log_analytics_configuration: + ~azure.mgmt.web.v2019_08_01.models.LogAnalyticsConfiguration + """ + + _attribute_map = { + 'destination': {'key': 'destination', 'type': 'str'}, + 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, + } + + def __init__(self, **kwargs): + super(AppLogsConfiguration, self).__init__(**kwargs) + self.destination = kwargs.get('destination', None) + self.log_analytics_configuration = kwargs.get('log_analytics_configuration', None) + + class AppServiceCertificate(Model): """Key Vault container for a certificate that is purchased through Azure. @@ -2007,6 +2028,9 @@ class ArcConfiguration(Model): :param front_end_service_configuration: :type front_end_service_configuration: ~azure.mgmt.web.v2019_08_01.models.FrontEndConfiguration + :param app_logs_configuration: + :type app_logs_configuration: + ~azure.mgmt.web.v2019_08_01.models.AppLogsConfiguration :param kube_config: :type kube_config: str :param aks_engine_resource_group: @@ -2019,6 +2043,7 @@ class ArcConfiguration(Model): 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, + 'app_logs_configuration': {'key': 'appLogsConfiguration', 'type': 'AppLogsConfiguration'}, 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, 'aks_engine_resource_group': {'key': 'aksEngineResourceGroup', 'type': 'str'}, } @@ -2030,6 +2055,7 @@ def __init__(self, **kwargs): self.artifact_storage_mount_path = kwargs.get('artifact_storage_mount_path', None) self.artifact_storage_node_name = kwargs.get('artifact_storage_node_name', None) self.front_end_service_configuration = kwargs.get('front_end_service_configuration', None) + self.app_logs_configuration = kwargs.get('app_logs_configuration', None) self.kube_config = kwargs.get('kube_config', None) self.aks_engine_resource_group = kwargs.get('aks_engine_resource_group', None) @@ -5427,6 +5453,22 @@ def __init__(self, **kwargs): self.ramp_up_rules = kwargs.get('ramp_up_rules', None) +class ExtendedLocation(Model): + """ExtendedLocation. + + :param custom_location: + :type custom_location: str + """ + + _attribute_map = { + 'custom_location': {'key': 'customLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExtendedLocation, self).__init__(**kwargs) + self.custom_location = kwargs.get('custom_location', None) + + class FileSystemApplicationLogsConfig(Model): """Application logs to file system configuration. @@ -6467,6 +6509,9 @@ class KubeEnvironment(Resource): :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] + :param extended_location: + :type extended_location: + ~azure.mgmt.web.v2019_08_01.models.ExtendedLocation :ivar provisioning_state: Provisioning state of the Kubernetes Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Waiting', 'InitializationInProgress', 'ARMDeploymentInProgress', @@ -6565,6 +6610,7 @@ class KubeEnvironment(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'K8SEProvisioningState'}, 'node_pools': {'key': 'properties.nodePools', 'type': '[KubeNodePool]'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, @@ -6590,6 +6636,7 @@ class KubeEnvironment(Resource): def __init__(self, **kwargs): super(KubeEnvironment, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) self.provisioning_state = None self.node_pools = kwargs.get('node_pools', None) self.subscription_id = None @@ -6693,6 +6740,26 @@ def __init__(self, **kwargs): self.localized_value = kwargs.get('localized_value', None) +class LogAnalyticsConfiguration(Model): + """LogAnalyticsConfiguration. + + :param customer_id: + :type customer_id: str + :param shared_key: + :type shared_key: str + """ + + _attribute_map = { + 'customer_id': {'key': 'customerId', 'type': 'str'}, + 'shared_key': {'key': 'sharedKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsConfiguration, self).__init__(**kwargs) + self.customer_id = kwargs.get('customer_id', None) + self.shared_key = kwargs.get('shared_key', None) + + class LogSpecification(Model): """Log Definition of a single resource metric. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py index 67540b7fbec..3154ae0cca3 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py @@ -454,6 +454,27 @@ def __init__(self, *, kind: str=None, application_stack_resource_name: str=None, self.frameworks = frameworks +class AppLogsConfiguration(Model): + """AppLogsConfiguration. + + :param destination: + :type destination: str + :param log_analytics_configuration: + :type log_analytics_configuration: + ~azure.mgmt.web.v2019_08_01.models.LogAnalyticsConfiguration + """ + + _attribute_map = { + 'destination': {'key': 'destination', 'type': 'str'}, + 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, + } + + def __init__(self, *, destination: str=None, log_analytics_configuration=None, **kwargs) -> None: + super(AppLogsConfiguration, self).__init__(**kwargs) + self.destination = destination + self.log_analytics_configuration = log_analytics_configuration + + class AppServiceCertificate(Model): """Key Vault container for a certificate that is purchased through Azure. @@ -2007,6 +2028,9 @@ class ArcConfiguration(Model): :param front_end_service_configuration: :type front_end_service_configuration: ~azure.mgmt.web.v2019_08_01.models.FrontEndConfiguration + :param app_logs_configuration: + :type app_logs_configuration: + ~azure.mgmt.web.v2019_08_01.models.AppLogsConfiguration :param kube_config: :type kube_config: str :param aks_engine_resource_group: @@ -2019,17 +2043,19 @@ class ArcConfiguration(Model): 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, + 'app_logs_configuration': {'key': 'appLogsConfiguration', 'type': 'AppLogsConfiguration'}, 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, 'aks_engine_resource_group': {'key': 'aksEngineResourceGroup', 'type': 'str'}, } - def __init__(self, *, artifacts_storage_type=None, artifact_storage_class_name: str=None, artifact_storage_mount_path: str=None, artifact_storage_node_name: str=None, front_end_service_configuration=None, kube_config: str=None, aks_engine_resource_group: str=None, **kwargs) -> None: + def __init__(self, *, artifacts_storage_type=None, artifact_storage_class_name: str=None, artifact_storage_mount_path: str=None, artifact_storage_node_name: str=None, front_end_service_configuration=None, app_logs_configuration=None, kube_config: str=None, aks_engine_resource_group: str=None, **kwargs) -> None: super(ArcConfiguration, self).__init__(**kwargs) self.artifacts_storage_type = artifacts_storage_type self.artifact_storage_class_name = artifact_storage_class_name self.artifact_storage_mount_path = artifact_storage_mount_path self.artifact_storage_node_name = artifact_storage_node_name self.front_end_service_configuration = front_end_service_configuration + self.app_logs_configuration = app_logs_configuration self.kube_config = kube_config self.aks_engine_resource_group = aks_engine_resource_group @@ -5427,6 +5453,22 @@ def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: self.ramp_up_rules = ramp_up_rules +class ExtendedLocation(Model): + """ExtendedLocation. + + :param custom_location: + :type custom_location: str + """ + + _attribute_map = { + 'custom_location': {'key': 'customLocation', 'type': 'str'}, + } + + def __init__(self, *, custom_location: str=None, **kwargs) -> None: + super(ExtendedLocation, self).__init__(**kwargs) + self.custom_location = custom_location + + class FileSystemApplicationLogsConfig(Model): """Application logs to file system configuration. @@ -6467,6 +6509,9 @@ class KubeEnvironment(Resource): :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] + :param extended_location: + :type extended_location: + ~azure.mgmt.web.v2019_08_01.models.ExtendedLocation :ivar provisioning_state: Provisioning state of the Kubernetes Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Waiting', 'InitializationInProgress', 'ARMDeploymentInProgress', @@ -6565,6 +6610,7 @@ class KubeEnvironment(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'K8SEProvisioningState'}, 'node_pools': {'key': 'properties.nodePools', 'type': '[KubeNodePool]'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, @@ -6588,8 +6634,9 @@ class KubeEnvironment(Resource): 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, } - def __init__(self, *, location: str, node_pools, kind: str=None, tags=None, internal_load_balancer_enabled: bool=None, vnet_subnet_id: str=None, network_plugin=None, service_cidr: str=None, dns_service_ip: str=None, docker_bridge_cidr: str=None, service_principal_client_id: str=None, service_principal_client_secret: str=None, static_ip: str=None, default_certificate_provision_start_time: str=None, log_analytics_workspace_id: str=None, compute_platform: str=None, namespace: str=None, arc_configuration=None, aks_resource_id: str=None, **kwargs) -> None: + def __init__(self, *, location: str, node_pools, kind: str=None, tags=None, extended_location=None, internal_load_balancer_enabled: bool=None, vnet_subnet_id: str=None, network_plugin=None, service_cidr: str=None, dns_service_ip: str=None, docker_bridge_cidr: str=None, service_principal_client_id: str=None, service_principal_client_secret: str=None, static_ip: str=None, default_certificate_provision_start_time: str=None, log_analytics_workspace_id: str=None, compute_platform: str=None, namespace: str=None, arc_configuration=None, aks_resource_id: str=None, **kwargs) -> None: super(KubeEnvironment, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.extended_location = extended_location self.provisioning_state = None self.node_pools = node_pools self.subscription_id = None @@ -6693,6 +6740,26 @@ def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> N self.localized_value = localized_value +class LogAnalyticsConfiguration(Model): + """LogAnalyticsConfiguration. + + :param customer_id: + :type customer_id: str + :param shared_key: + :type shared_key: str + """ + + _attribute_map = { + 'customer_id': {'key': 'customerId', 'type': 'str'}, + 'shared_key': {'key': 'sharedKey', 'type': 'str'}, + } + + def __init__(self, *, customer_id: str=None, shared_key: str=None, **kwargs) -> None: + super(LogAnalyticsConfiguration, self).__init__(**kwargs) + self.customer_id = customer_id + self.shared_key = shared_key + + class LogSpecification(Model): """Log Definition of a single resource metric. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py index 348ac944a24..4738e61c62d 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py @@ -368,7 +368,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -383,19 +382,10 @@ def _delete_initial( if response.status_code not in [202, 204]: raise models.DefaultErrorResponseException(self._deserialize, response) - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('Operation', response) - if response.status_code == 204: - deserialized = self._deserialize('Operation', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - def delete( self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): """Delete a Kubernetes Environment. @@ -416,12 +406,10 @@ def delete( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns Operation or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Operation] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Operation]] + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`DefaultErrorResponseException` """ @@ -435,14 +423,10 @@ def delete( ) def get_long_running_output(response): - deserialized = self._deserialize('Operation', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) From 6432dbb537b015749a4e1a563e79cad67ef6de8f Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Wed, 28 Oct 2020 16:40:49 -0700 Subject: [PATCH 023/125] Add version 0.1.6 --- src/appservice-kube/HISTORY.rst | 4 +++ src/appservice-kube/setup.py | 2 +- src/index.json | 53 +++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 26a7667ca34..bd2da2076ad 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.6 +++++++ +* Update SDK to fix appservice kube delete command + 0.1.5 ++++++ * Fix webapp show command diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index e6b69b8687f..406f2e3e3df 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.5' +VERSION = '0.1.6' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 8b994eecd46..4ff26855827 100644 --- a/src/index.json +++ b/src/index.json @@ -1308,6 +1308,59 @@ "version": "0.1.5" }, "sha256Digest": "4ce71979442759a7d3cfabdaafe4962556f0ab9130dee887f2938d888c5ee322" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.6-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.6-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.6" + }, + "sha256Digest": "2adaa4b4552cd8d32869969000ac07d12ee108a50c358c3081e76a2500a5aeec" } ], "azure-batch-cli-extensions": [ From ff7c355b90ab2b6d4c92c48cbb70d274f043712e Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Tue, 22 Dec 2020 14:33:49 -0800 Subject: [PATCH 024/125] Update kube environments SDK (using api version 2020-06-01), delete old parameters from commands --- .../azext_appservice_kube/__init__.py | 2 +- .../azext_appservice_kube/_help.py | 10 - .../azext_appservice_kube/_params.py | 3 - .../azext_appservice_kube/custom.py | 43 +- .../azure_mgmt_web/_operations_mixin.py | 104 +- .../_web_site_management_client.py | 57 +- .../vendored_sdks/azure_mgmt_web/models.py | 2 +- .../_web_site_management_client.py | 5 - .../v2019_08_01/models/__init__.py | 50 +- .../v2019_08_01/models/_models.py | 573 +- .../v2019_08_01/models/_models_py3.py | 589 +- .../v2019_08_01/models/_paged_models.py | 13 - .../_web_site_management_client_enums.py | 71 +- .../v2019_08_01/operations/__init__.py | 2 - .../operations/_web_apps_operations.py | 352 + .../azure_mgmt_web/v2020_06_01/__init__.py | 19 + .../v2020_06_01/_configuration.py | 49 + .../_web_site_management_client.py | 126 + .../v2020_06_01/models/__init__.py | 1164 + .../v2020_06_01/models/_models.py | 15212 +++++++++ .../v2020_06_01/models/_models_py3.py | 15212 +++++++++ .../v2020_06_01/models/_paged_models.py | 794 + .../_web_site_management_client_enums.py | 646 + .../v2020_06_01/operations/__init__.py | 48 + ...p_service_certificate_orders_operations.py | 1423 + .../_app_service_environments_operations.py | 2858 ++ .../_app_service_plans_operations.py | 1946 ++ ...ficate_registration_provider_operations.py | 104 + .../operations/_certificates_operations.py | 437 + .../_deleted_web_apps_operations.py | 238 + .../operations/_diagnostics_operations.py | 1713 + ...domain_registration_provider_operations.py | 104 + .../operations/_domains_operations.py | 1090 + .../_kube_environments_operations.py | 508 + .../operations/_provider_operations.py | 246 + .../operations/_recommendations_operations.py | 1070 + .../_resource_health_metadata_operations.py | 468 + .../operations/_static_sites_operations.py | 1887 ++ .../_top_level_domains_operations.py | 251 + .../operations/_web_apps_operations.py | 27494 ++++++++++++++++ .../_web_site_management_client_operations.py | 1061 + .../azure_mgmt_web/v2020_06_01/version.py | 13 + 42 files changed, 76926 insertions(+), 1131 deletions(-) create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_certificate_orders_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_environments_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_plans_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificate_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificates_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_deleted_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_diagnostics_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domain_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_kube_environments_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_recommendations_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_resource_health_metadata_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_static_sites_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_top_level_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_site_management_client_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/version.py diff --git a/src/appservice-kube/azext_appservice_kube/__init__.py b/src/appservice-kube/azext_appservice_kube/__init__.py index 90bb64a558d..506bc2168d3 100644 --- a/src/appservice-kube/azext_appservice_kube/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/__init__.py @@ -14,7 +14,7 @@ class AppserviceCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - register_resource_type('latest', CUSTOM_MGMT_APPSERVICE, '2019-08-01') + register_resource_type('latest', CUSTOM_MGMT_APPSERVICE, '2020-06-01') appservice_kube_custom = CliCommandType( operations_tmpl='azext_appservice_kube.custom#{}') diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index 328ddeb9c7c..2691f47d8ef 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -60,16 +60,6 @@ --client-secret MyServicePrincipalClientSecret """ -helps['appservice kube update'] = """ - type: command - short-summary: Update a Kubernetes Environment. - examples: - - name: Update the Kubernetes Environment's Log Analytics workspace ID. - text: | - az appservice kube update -n MyKubeEnvironment -g MyResourceGroup \\ - --workspace-id MyLogAnalyticsWorkspaceResourceId -""" - helps['appservice kube show'] = """ type: command short-summary: Show the details of a kubernetes environment. diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index d692adc4dbc..6f94e5c638d 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -176,9 +176,6 @@ def load_arguments(self, _): with self.argument_context('appservice kube update') as c: c.argument('kube_name', arg_type=name_arg_type, help='Name of the kubernetes environment.') - c.argument('client_id', help='Service principal client id.') - c.argument('client_secret', help='Service principal client secret.') - c.argument('workspace_id', help='Log analytics workspace ID') c.argument('tags', arg_type=tags_type) with self.argument_context('appservice kube delete') as c: diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 910c0dda1ed..13121fd211e 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -65,62 +65,28 @@ def create_kube_environment(cmd, resource_group_name, aks=None, static_ip=None, - client_id=None, - client_secret=None, - node_count=3, - max_count=3, location=None, - nodepool_name='nodepool1', - node_vm_size='Standard_DS2_v2', - network_plugin='kubenet', internal_load_balancing=False, - subnet=None, - vnet_name=None, - dns_service_ip=None, - service_cidr=None, - docker_bridge_cidr=None, - workspace_id=None, tags=None, no_wait=False): - KubeEnvironment, KubeNodePool = cmd.get_models('KubeEnvironment', 'KubeNodePool') + KubeEnvironment = cmd.get_models('KubeEnvironment') location = location or _get_location_from_resource_group(cmd.cli_ctx, resource_group_name) - if subnet is not None: - subnet_id = validate_subnet_id(cmd.cli_ctx, subnet, vnet_name, resource_group_name) - else: - subnet_id = None - if aks is not None: aks_id = validate_aks_id(cmd.cli_ctx, aks, resource_group_name) else: aks_id = None - if aks_id and not static_ip: - raise CLIError('Usage error: --static-ip must be specified when using --aks') + if not internal_load_balancing and not static_ip: + raise CLIError('Usage error: --static-ip must be specified when not using --internal_load_balancing') # TODO: add some verifications - # TODO: support creating service principal automatically - - node_pool_def = KubeNodePool( - vm_size=node_vm_size, - node_count=node_count, - max_node_count=max_count, - name=nodepool_name) kube_def = KubeEnvironment( location=location, tags=tags, - node_pools=[node_pool_def], internal_load_balancer_enabled=internal_load_balancing, - vnet_subnet_id=subnet_id, - network_plugin=network_plugin, - service_cidr=service_cidr, - dns_service_ip=dns_service_ip, - docker_bridge_cidr=docker_bridge_cidr, - service_principal_client_id=client_id, - service_principal_client_secret=client_secret, - log_analytics_workspace_id=workspace_id, aks_resource_id=aks_id, static_ip=static_ip) @@ -136,9 +102,6 @@ def list_kube_environments(client, resource_group_name=None): def update_kube_environment(cmd, kube_name, resource_group_name, - client_id=None, - client_secret=None, - workspace_id=None, tags=None, no_wait=False): raise CLIError("Update is not yet supported for Kubernetes Environments.") diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py index a748425a4eb..07323c7ed2d 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py @@ -26,7 +26,7 @@ def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' :type type: str or - ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes + ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes :param is_fqdn: Is fully qualified domain name. :type is_fqdn: bool :param dict custom_headers: headers that will be added to the request @@ -35,10 +35,10 @@ def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, :param operation_config: :ref:`Operation configuration overrides`. :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability or + :rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('check_name_availability') @@ -48,6 +48,8 @@ def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -69,10 +71,10 @@ def get_publishing_user(self, custom_headers=None, raw=False, **operation_config :param operation_config: :ref:`Operation configuration overrides`. :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.User or + :rtype: ~azure.mgmt.web.v2020_06_01.models.User or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('get_publishing_user') @@ -82,6 +84,8 @@ def get_publishing_user(self, custom_headers=None, raw=False, **operation_config from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -105,10 +109,10 @@ def get_source_control(self, source_control_type, custom_headers=None, raw=False :param operation_config: :ref:`Operation configuration overrides`. :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl or + :rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('get_source_control') @@ -118,6 +122,8 @@ def get_source_control(self, source_control_type, custom_headers=None, raw=False from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -139,10 +145,10 @@ def get_subscription_deployment_locations(self, custom_headers=None, raw=False, :param operation_config: :ref:`Operation configuration overrides`. :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations or + :rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('get_subscription_deployment_locations') @@ -152,6 +158,8 @@ def get_subscription_deployment_locations(self, custom_headers=None, raw=False, from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -178,9 +186,9 @@ def list_billing_meters(self, billing_location=None, os_type=None, custom_header overrides`. :return: An iterator like instance of BillingMeter :rtype: - ~azure.mgmt.web.v2019_08_01.models.BillingMeterPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeter] + ~azure.mgmt.web.v2020_06_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeter] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_billing_meters') @@ -188,6 +196,8 @@ def list_billing_meters(self, billing_location=None, os_type=None, custom_header from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -206,7 +216,7 @@ def list_geo_regions(self, sku=None, linux_workers_enabled=None, xenon_workers_e :param sku: Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' - :type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName + :type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName :param linux_workers_enabled: Specify true if you want to filter to only regions that support Linux workers. :type linux_workers_enabled: bool @@ -223,9 +233,9 @@ def list_geo_regions(self, sku=None, linux_workers_enabled=None, xenon_workers_e overrides`. :return: An iterator like instance of GeoRegion :rtype: - ~azure.mgmt.web.v2019_08_01.models.GeoRegionPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegion] + ~azure.mgmt.web.v2020_06_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegion] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_geo_regions') @@ -235,6 +245,8 @@ def list_geo_regions(self, sku=None, linux_workers_enabled=None, xenon_workers_e from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -257,9 +269,9 @@ def list_premier_add_on_offers(self, custom_headers=None, raw=False, **operation overrides`. :return: An iterator like instance of PremierAddOnOffer :rtype: - ~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOffer] + ~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOffer] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_premier_add_on_offers') @@ -269,6 +281,8 @@ def list_premier_add_on_offers(self, custom_headers=None, raw=False, **operation from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -293,9 +307,9 @@ def list_site_identifiers_assigned_to_host_name(self, name=None, custom_headers= overrides`. :return: An iterator like instance of Identifier :rtype: - ~azure.mgmt.web.v2019_08_01.models.IdentifierPaged[~azure.mgmt.web.v2019_08_01.models.Identifier] + ~azure.mgmt.web.v2020_06_01.models.IdentifierPaged[~azure.mgmt.web.v2020_06_01.models.Identifier] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_site_identifiers_assigned_to_host_name') @@ -305,6 +319,8 @@ def list_site_identifiers_assigned_to_host_name(self, name=None, custom_headers= from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -326,10 +342,10 @@ def list_skus(self, custom_headers=None, raw=False, **operation_config): :param operation_config: :ref:`Operation configuration overrides`. :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos or + :rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_skus') @@ -339,6 +355,8 @@ def list_skus(self, custom_headers=None, raw=False, **operation_config): from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -361,9 +379,9 @@ def list_source_controls(self, custom_headers=None, raw=False, **operation_confi overrides`. :return: An iterator like instance of SourceControl :rtype: - ~azure.mgmt.web.v2019_08_01.models.SourceControlPaged[~azure.mgmt.web.v2019_08_01.models.SourceControl] + ~azure.mgmt.web.v2020_06_01.models.SourceControlPaged[~azure.mgmt.web.v2020_06_01.models.SourceControl] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_source_controls') @@ -373,6 +391,8 @@ def list_source_controls(self, custom_headers=None, raw=False, **operation_confi from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -403,7 +423,7 @@ def move(self, resource_group_name, target_resource_group=None, resources=None, :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('move') @@ -413,6 +433,8 @@ def move(self, resource_group_name, target_resource_group=None, resources=None, from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -429,17 +451,17 @@ def update_publishing_user(self, user_details, custom_headers=None, raw=False, * Description for Updates publishing user. :param user_details: Details of publishing user - :type user_details: ~azure.mgmt.web.v2019_08_01.models.User + :type user_details: ~azure.mgmt.web.v2020_06_01.models.User :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.User or + :rtype: ~azure.mgmt.web.v2020_06_01.models.User or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('update_publishing_user') @@ -449,6 +471,8 @@ def update_publishing_user(self, user_details, custom_headers=None, raw=False, * from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -468,17 +492,17 @@ def update_source_control(self, source_control_type, request_message, custom_hea :type source_control_type: str :param request_message: Source control token information :type request_message: - ~azure.mgmt.web.v2019_08_01.models.SourceControl + ~azure.mgmt.web.v2020_06_01.models.SourceControl :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl or + :rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('update_source_control') @@ -488,6 +512,8 @@ def update_source_control(self, source_control_type, request_message, custom_hea from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -508,17 +534,17 @@ def validate(self, resource_group_name, validate_request, custom_headers=None, r :type resource_group_name: str :param validate_request: Request with the resources to validate. :type validate_request: - ~azure.mgmt.web.v2019_08_01.models.ValidateRequest + ~azure.mgmt.web.v2020_06_01.models.ValidateRequest :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse or + :rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('validate') @@ -528,6 +554,8 @@ def validate(self, resource_group_name, validate_request, custom_headers=None, r from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -593,7 +621,7 @@ def validate_move(self, resource_group_name, target_resource_group=None, resourc :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('validate_move') @@ -603,6 +631,8 @@ def validate_move(self, resource_group_name, target_resource_group=None, resourc from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -621,7 +651,7 @@ def verify_hosting_environment_vnet(self, parameters, custom_headers=None, raw=F Environment by analyzing the Network Security Group rules. :param parameters: VNET information - :type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters + :type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -629,10 +659,10 @@ def verify_hosting_environment_vnet(self, parameters, custom_headers=None, raw=F overrides`. :return: VnetValidationFailureDetails or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails or + ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('verify_hosting_environment_vnet') @@ -642,6 +672,8 @@ def verify_hosting_environment_vnet(self, parameters, custom_headers=None, raw=F from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py index adbb949b12a..ebc80b3b123 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py @@ -46,7 +46,7 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiCl :type profile: azure.profiles.KnownProfiles """ - DEFAULT_API_VERSION = '2019-08-01' + DEFAULT_API_VERSION = '2020-06-01' _PROFILE_TAG = "azure.mgmt.web.WebSiteManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -82,6 +82,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2018-02-01: :mod:`v2018_02_01.models` * 2018-11-01: :mod:`v2018_11_01.models` * 2019-08-01: :mod:`v2019_08_01.models` + * 2020-06-01: :mod:`v2020_06_01.models` """ if api_version == '2015-04-01': from .v2015_04_01 import models @@ -107,6 +108,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2019-08-01': from .v2019_08_01 import models return models + elif api_version == '2020-06-01': + from .v2020_06_01 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -116,6 +120,7 @@ def app_service_certificate_orders(self): * 2015-08-01: :class:`AppServiceCertificateOrdersOperations` * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` * 2019-08-01: :class:`AppServiceCertificateOrdersOperations` + * 2020-06-01: :class:`AppServiceCertificateOrdersOperations` """ api_version = self._get_api_version('app_service_certificate_orders') if api_version == '2015-08-01': @@ -124,6 +129,8 @@ def app_service_certificate_orders(self): from .v2018_02_01.operations import AppServiceCertificateOrdersOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import AppServiceCertificateOrdersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AppServiceCertificateOrdersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -135,6 +142,7 @@ def app_service_environments(self): * 2016-09-01: :class:`AppServiceEnvironmentsOperations` * 2018-02-01: :class:`AppServiceEnvironmentsOperations` * 2019-08-01: :class:`AppServiceEnvironmentsOperations` + * 2020-06-01: :class:`AppServiceEnvironmentsOperations` """ api_version = self._get_api_version('app_service_environments') if api_version == '2016-09-01': @@ -143,6 +151,8 @@ def app_service_environments(self): from .v2018_02_01.operations import AppServiceEnvironmentsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import AppServiceEnvironmentsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AppServiceEnvironmentsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -154,6 +164,7 @@ def app_service_plans(self): * 2016-09-01: :class:`AppServicePlansOperations` * 2018-02-01: :class:`AppServicePlansOperations` * 2019-08-01: :class:`AppServicePlansOperations` + * 2020-06-01: :class:`AppServicePlansOperations` """ api_version = self._get_api_version('app_service_plans') if api_version == '2016-09-01': @@ -162,6 +173,8 @@ def app_service_plans(self): from .v2018_02_01.operations import AppServicePlansOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import AppServicePlansOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AppServicePlansOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -186,6 +199,7 @@ def certificate_registration_provider(self): * 2015-08-01: :class:`CertificateRegistrationProviderOperations` * 2018-02-01: :class:`CertificateRegistrationProviderOperations` * 2019-08-01: :class:`CertificateRegistrationProviderOperations` + * 2020-06-01: :class:`CertificateRegistrationProviderOperations` """ api_version = self._get_api_version('certificate_registration_provider') if api_version == '2015-08-01': @@ -194,6 +208,8 @@ def certificate_registration_provider(self): from .v2018_02_01.operations import CertificateRegistrationProviderOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import CertificateRegistrationProviderOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import CertificateRegistrationProviderOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -206,6 +222,7 @@ def certificates(self): * 2018-02-01: :class:`CertificatesOperations` * 2018-11-01: :class:`CertificatesOperations` * 2019-08-01: :class:`CertificatesOperations` + * 2020-06-01: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2016-03-01': @@ -216,6 +233,8 @@ def certificates(self): from .v2018_11_01.operations import CertificatesOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import CertificatesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import CertificatesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -227,6 +246,7 @@ def deleted_web_apps(self): * 2016-03-01: :class:`DeletedWebAppsOperations` * 2018-02-01: :class:`DeletedWebAppsOperations` * 2019-08-01: :class:`DeletedWebAppsOperations` + * 2020-06-01: :class:`DeletedWebAppsOperations` """ api_version = self._get_api_version('deleted_web_apps') if api_version == '2016-03-01': @@ -235,6 +255,8 @@ def deleted_web_apps(self): from .v2018_02_01.operations import DeletedWebAppsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import DeletedWebAppsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DeletedWebAppsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -246,6 +268,7 @@ def diagnostics(self): * 2016-03-01: :class:`DiagnosticsOperations` * 2018-02-01: :class:`DiagnosticsOperations` * 2019-08-01: :class:`DiagnosticsOperations` + * 2020-06-01: :class:`DiagnosticsOperations` """ api_version = self._get_api_version('diagnostics') if api_version == '2016-03-01': @@ -254,6 +277,8 @@ def diagnostics(self): from .v2018_02_01.operations import DiagnosticsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import DiagnosticsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DiagnosticsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -265,6 +290,7 @@ def domain_registration_provider(self): * 2015-04-01: :class:`DomainRegistrationProviderOperations` * 2018-02-01: :class:`DomainRegistrationProviderOperations` * 2019-08-01: :class:`DomainRegistrationProviderOperations` + * 2020-06-01: :class:`DomainRegistrationProviderOperations` """ api_version = self._get_api_version('domain_registration_provider') if api_version == '2015-04-01': @@ -273,6 +299,8 @@ def domain_registration_provider(self): from .v2018_02_01.operations import DomainRegistrationProviderOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import DomainRegistrationProviderOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DomainRegistrationProviderOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -284,6 +312,7 @@ def domains(self): * 2015-04-01: :class:`DomainsOperations` * 2018-02-01: :class:`DomainsOperations` * 2019-08-01: :class:`DomainsOperations` + * 2020-06-01: :class:`DomainsOperations` """ api_version = self._get_api_version('domains') if api_version == '2015-04-01': @@ -292,6 +321,8 @@ def domains(self): from .v2018_02_01.operations import DomainsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import DomainsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DomainsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -300,11 +331,11 @@ def domains(self): def kube_environments(self): """Instance depends on the API version: - * 2019-08-01: :class:`KubeEnvironmentsOperations` + * 2020-06-01: :class:`KubeEnvironmentsOperations` """ api_version = self._get_api_version('kube_environments') - if api_version == '2019-08-01': - from .v2019_08_01.operations import KubeEnvironmentsOperations as OperationClass + if api_version == '2020-06-01': + from .v2020_06_01.operations import KubeEnvironmentsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -316,6 +347,7 @@ def provider(self): * 2016-03-01: :class:`ProviderOperations` * 2018-02-01: :class:`ProviderOperations` * 2019-08-01: :class:`ProviderOperations` + * 2020-06-01: :class:`ProviderOperations` """ api_version = self._get_api_version('provider') if api_version == '2016-03-01': @@ -324,6 +356,8 @@ def provider(self): from .v2018_02_01.operations import ProviderOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import ProviderOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ProviderOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -335,6 +369,7 @@ def recommendations(self): * 2016-03-01: :class:`RecommendationsOperations` * 2018-02-01: :class:`RecommendationsOperations` * 2019-08-01: :class:`RecommendationsOperations` + * 2020-06-01: :class:`RecommendationsOperations` """ api_version = self._get_api_version('recommendations') if api_version == '2016-03-01': @@ -343,6 +378,8 @@ def recommendations(self): from .v2018_02_01.operations import RecommendationsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import RecommendationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RecommendationsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -354,6 +391,7 @@ def resource_health_metadata(self): * 2016-03-01: :class:`ResourceHealthMetadataOperations` * 2018-02-01: :class:`ResourceHealthMetadataOperations` * 2019-08-01: :class:`ResourceHealthMetadataOperations` + * 2020-06-01: :class:`ResourceHealthMetadataOperations` """ api_version = self._get_api_version('resource_health_metadata') if api_version == '2016-03-01': @@ -362,6 +400,8 @@ def resource_health_metadata(self): from .v2018_02_01.operations import ResourceHealthMetadataOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import ResourceHealthMetadataOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ResourceHealthMetadataOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -371,10 +411,13 @@ def static_sites(self): """Instance depends on the API version: * 2019-08-01: :class:`StaticSitesOperations` + * 2020-06-01: :class:`StaticSitesOperations` """ api_version = self._get_api_version('static_sites') if api_version == '2019-08-01': from .v2019_08_01.operations import StaticSitesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import StaticSitesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -386,6 +429,7 @@ def top_level_domains(self): * 2015-04-01: :class:`TopLevelDomainsOperations` * 2018-02-01: :class:`TopLevelDomainsOperations` * 2019-08-01: :class:`TopLevelDomainsOperations` + * 2020-06-01: :class:`TopLevelDomainsOperations` """ api_version = self._get_api_version('top_level_domains') if api_version == '2015-04-01': @@ -394,6 +438,8 @@ def top_level_domains(self): from .v2018_02_01.operations import TopLevelDomainsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import TopLevelDomainsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import TopLevelDomainsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -405,6 +451,7 @@ def web_apps(self): * 2016-08-01: :class:`WebAppsOperations` * 2018-02-01: :class:`WebAppsOperations` * 2019-08-01: :class:`WebAppsOperations` + * 2020-06-01: :class:`WebAppsOperations` """ api_version = self._get_api_version('web_apps') if api_version == '2016-08-01': @@ -413,6 +460,8 @@ def web_apps(self): from .v2018_02_01.operations import WebAppsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import WebAppsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebAppsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py index f7ccf42a355..6424d4e4638 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py @@ -6,4 +6,4 @@ # -------------------------------------------------------------------------- from .v2016_03_01.models import * from .v2018_02_01.models import * -from .v2019_08_01.models import * +from .v2020_06_01.models import * diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py index 35bbe570223..f02d0132faa 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py @@ -29,7 +29,6 @@ from .operations import AppServiceEnvironmentsOperations from .operations import AppServicePlansOperations from .operations import ResourceHealthMetadataOperations -from .operations import KubeEnvironmentsOperations from . import models @@ -69,8 +68,6 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient) :vartype app_service_plans: azure.mgmt.web.v2019_08_01.operations.AppServicePlansOperations :ivar resource_health_metadata: ResourceHealthMetadata operations :vartype resource_health_metadata: azure.mgmt.web.v2019_08_01.operations.ResourceHealthMetadataOperations - :ivar kube_environments: KubeEnvironments operations - :vartype kube_environments: azure.mgmt.web.v2019_08_01.operations.KubeEnvironmentsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -122,5 +119,3 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self.config, self._serialize, self._deserialize) - self.kube_environments = KubeEnvironmentsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py index 1cba27c44dd..722658164fc 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py @@ -21,7 +21,6 @@ from ._models_py3 import ApplicationLogsConfig from ._models_py3 import ApplicationStack from ._models_py3 import ApplicationStackResource - from ._models_py3 import AppLogsConfiguration from ._models_py3 import AppServiceCertificate from ._models_py3 import AppServiceCertificateOrder from ._models_py3 import AppServiceCertificateOrderPatchResource @@ -32,7 +31,6 @@ from ._models_py3 import AppServiceEnvironmentResource from ._models_py3 import AppServicePlan from ._models_py3 import AppServicePlanPatchResource - from ._models_py3 import ArcConfiguration from ._models_py3 import ArmIdWrapper from ._models_py3 import AutoHealActions from ._models_py3 import AutoHealCustomAction @@ -71,6 +69,8 @@ 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 @@ -109,10 +109,8 @@ from ._models_py3 import EndpointDetail from ._models_py3 import ErrorEntity from ._models_py3 import Experiments - from ._models_py3 import ExtendedLocation from ._models_py3 import FileSystemApplicationLogsConfig from ._models_py3 import FileSystemHttpLogsConfig - from ._models_py3 import FrontEndConfiguration from ._models_py3 import FunctionEnvelope from ._models_py3 import FunctionSecrets from ._models_py3 import GeoRegion @@ -135,11 +133,7 @@ from ._models_py3 import KeyInfo from ._models_py3 import KeyVaultReferenceCollection from ._models_py3 import KeyVaultReferenceResource - from ._models_py3 import KubeEnvironment - from ._models_py3 import KubeEnvironmentProfile - from ._models_py3 import KubeNodePool from ._models_py3 import LocalizableString - from ._models_py3 import LogAnalyticsConfiguration from ._models_py3 import LogSpecification from ._models_py3 import ManagedServiceIdentity from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue @@ -282,7 +276,6 @@ from ._models import ApplicationLogsConfig from ._models import ApplicationStack from ._models import ApplicationStackResource - from ._models import AppLogsConfiguration from ._models import AppServiceCertificate from ._models import AppServiceCertificateOrder from ._models import AppServiceCertificateOrderPatchResource @@ -293,7 +286,6 @@ from ._models import AppServiceEnvironmentResource from ._models import AppServicePlan from ._models import AppServicePlanPatchResource - from ._models import ArcConfiguration from ._models import ArmIdWrapper from ._models import AutoHealActions from ._models import AutoHealCustomAction @@ -332,6 +324,8 @@ from ._models import CsmOperationDescription from ._models import CsmOperationDescriptionProperties from ._models import CsmOperationDisplay + from ._models import CsmPublishingCredentialsPoliciesCollection + from ._models import CsmPublishingCredentialsPoliciesEntity from ._models import CsmPublishingProfileOptions from ._models import CsmSlotEntity from ._models import CsmUsageQuota @@ -370,10 +364,8 @@ from ._models import EndpointDetail from ._models import ErrorEntity from ._models import Experiments - from ._models import ExtendedLocation from ._models import FileSystemApplicationLogsConfig from ._models import FileSystemHttpLogsConfig - from ._models import FrontEndConfiguration from ._models import FunctionEnvelope from ._models import FunctionSecrets from ._models import GeoRegion @@ -396,11 +388,7 @@ from ._models import KeyInfo from ._models import KeyVaultReferenceCollection from ._models import KeyVaultReferenceResource - from ._models import KubeEnvironment - from ._models import KubeEnvironmentProfile - from ._models import KubeNodePool from ._models import LocalizableString - from ._models import LogAnalyticsConfiguration from ._models import LogSpecification from ._models import ManagedServiceIdentity from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue @@ -556,7 +544,6 @@ from ._paged_models import HybridConnectionPaged from ._paged_models import IdentifierPaged from ._paged_models import InboundEnvironmentEndpointPaged -from ._paged_models import KubeEnvironmentPaged from ._paged_models import NameIdentifierPaged from ._paged_models import OutboundEnvironmentEndpointPaged from ._paged_models import PerfMonResponsePaged @@ -602,8 +589,6 @@ IpFilterTag, AutoHealActionType, ConnectionStringType, - AzureStorageType, - AzureStorageState, ScmType, ManagedPipelineMode, SiteLoadBalancing, @@ -613,7 +598,6 @@ HostType, UsageState, SiteAvailabilityState, - ClientCertMode, RedundancyMode, StatusOptions, DomainStatus, @@ -642,6 +626,8 @@ ConfigReferenceSource, ConfigReferenceLocation, LogLevel, + AzureStorageType, + AzureStorageState, BackupItemStatus, DatabaseType, FrequencyUnit, @@ -662,10 +648,6 @@ SiteRuntimeState, BuildStatus, TriggerTypes, - StorageType, - FrontEndServiceType, - K8SEProvisioningState, - K8SENetworkPlugin, SkuName, ) @@ -681,7 +663,6 @@ 'ApplicationLogsConfig', 'ApplicationStack', 'ApplicationStackResource', - 'AppLogsConfiguration', 'AppServiceCertificate', 'AppServiceCertificateOrder', 'AppServiceCertificateOrderPatchResource', @@ -692,7 +673,6 @@ 'AppServiceEnvironmentResource', 'AppServicePlan', 'AppServicePlanPatchResource', - 'ArcConfiguration', 'ArmIdWrapper', 'AutoHealActions', 'AutoHealCustomAction', @@ -731,6 +711,8 @@ 'CsmOperationDescription', 'CsmOperationDescriptionProperties', 'CsmOperationDisplay', + 'CsmPublishingCredentialsPoliciesCollection', + 'CsmPublishingCredentialsPoliciesEntity', 'CsmPublishingProfileOptions', 'CsmSlotEntity', 'CsmUsageQuota', @@ -769,10 +751,8 @@ 'EndpointDetail', 'ErrorEntity', 'Experiments', - 'ExtendedLocation', 'FileSystemApplicationLogsConfig', 'FileSystemHttpLogsConfig', - 'FrontEndConfiguration', 'FunctionEnvelope', 'FunctionSecrets', 'GeoRegion', @@ -795,11 +775,7 @@ 'KeyInfo', 'KeyVaultReferenceCollection', 'KeyVaultReferenceResource', - 'KubeEnvironment', - 'KubeEnvironmentProfile', - 'KubeNodePool', 'LocalizableString', - 'LogAnalyticsConfiguration', 'LogSpecification', 'ManagedServiceIdentity', 'ManagedServiceIdentityUserAssignedIdentitiesValue', @@ -989,7 +965,6 @@ 'StrPaged', 'HybridConnectionPaged', 'ResourceHealthMetadataPaged', - 'KubeEnvironmentPaged', 'KeyVaultSecretStatus', 'CertificateProductType', 'ProvisioningState', @@ -1000,8 +975,6 @@ 'IpFilterTag', 'AutoHealActionType', 'ConnectionStringType', - 'AzureStorageType', - 'AzureStorageState', 'ScmType', 'ManagedPipelineMode', 'SiteLoadBalancing', @@ -1011,7 +984,6 @@ 'HostType', 'UsageState', 'SiteAvailabilityState', - 'ClientCertMode', 'RedundancyMode', 'StatusOptions', 'DomainStatus', @@ -1040,6 +1012,8 @@ 'ConfigReferenceSource', 'ConfigReferenceLocation', 'LogLevel', + 'AzureStorageType', + 'AzureStorageState', 'BackupItemStatus', 'DatabaseType', 'FrequencyUnit', @@ -1060,9 +1034,5 @@ 'SiteRuntimeState', 'BuildStatus', 'TriggerTypes', - 'StorageType', - 'FrontEndServiceType', - 'K8SEProvisioningState', - 'K8SENetworkPlugin', 'SkuName', ] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py index 3650093c925..0753750ec14 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py @@ -282,8 +282,8 @@ class ApiKVReference(Model): :type secret_name: str :param secret_version: :type secret_version: str - :param identity_type: Possible values include: 'None', 'SystemAssigned', - 'UserAssigned' + :param identity_type: Possible values include: 'SystemAssigned', + 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type identity_type: str or ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType :param details: @@ -454,27 +454,6 @@ def __init__(self, **kwargs): self.frameworks = kwargs.get('frameworks', None) -class AppLogsConfiguration(Model): - """AppLogsConfiguration. - - :param destination: - :type destination: str - :param log_analytics_configuration: - :type log_analytics_configuration: - ~azure.mgmt.web.v2019_08_01.models.LogAnalyticsConfiguration - """ - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'str'}, - 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, - } - - def __init__(self, **kwargs): - super(AppLogsConfiguration, self).__init__(**kwargs) - self.destination = kwargs.get('destination', None) - self.log_analytics_configuration = kwargs.get('log_analytics_configuration', None) - - class AppServiceCertificate(Model): """Key Vault container for a certificate that is purchased through Azure. @@ -1795,10 +1774,6 @@ class AppServicePlan(Resource): 'InProgress', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.KubeEnvironmentProfile :param sku: :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription """ @@ -1843,7 +1818,6 @@ class AppServicePlan(Resource): 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } @@ -1868,7 +1842,6 @@ def __init__(self, **kwargs): 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) self.sku = kwargs.get('sku', None) @@ -1924,8 +1897,10 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :type free_offer_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . + :param reserved: This needs to set to true when creating a + Linux App Service Plan, along with kind set to + Linux. It should be false otherwise. Default + value: False . :type reserved: bool :param is_xenon: Obsolete: If Hyper-V container app service plan true, false otherwise. Default value: False . @@ -1942,10 +1917,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'InProgress', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.KubeEnvironmentProfile """ _validation = { @@ -1985,7 +1956,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, } def __init__(self, **kwargs): @@ -2009,55 +1979,6 @@ def __init__(self, **kwargs): 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 ArcConfiguration(Model): - """ArcConfiguration. - - :param artifacts_storage_type: Possible values include: 'LocalNode', - 'NetworkFileSystem' - :type artifacts_storage_type: str or - ~azure.mgmt.web.v2019_08_01.models.StorageType - :param artifact_storage_class_name: - :type artifact_storage_class_name: str - :param artifact_storage_mount_path: - :type artifact_storage_mount_path: str - :param artifact_storage_node_name: - :type artifact_storage_node_name: str - :param front_end_service_configuration: - :type front_end_service_configuration: - ~azure.mgmt.web.v2019_08_01.models.FrontEndConfiguration - :param app_logs_configuration: - :type app_logs_configuration: - ~azure.mgmt.web.v2019_08_01.models.AppLogsConfiguration - :param kube_config: - :type kube_config: str - :param aks_engine_resource_group: - :type aks_engine_resource_group: str - """ - - _attribute_map = { - 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, - 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, - 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, - 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, - 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, - 'app_logs_configuration': {'key': 'appLogsConfiguration', 'type': 'AppLogsConfiguration'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - 'aks_engine_resource_group': {'key': 'aksEngineResourceGroup', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArcConfiguration, self).__init__(**kwargs) - self.artifacts_storage_type = kwargs.get('artifacts_storage_type', None) - self.artifact_storage_class_name = kwargs.get('artifact_storage_class_name', None) - self.artifact_storage_mount_path = kwargs.get('artifact_storage_mount_path', None) - self.artifact_storage_node_name = kwargs.get('artifact_storage_node_name', None) - self.front_end_service_configuration = kwargs.get('front_end_service_configuration', None) - self.app_logs_configuration = kwargs.get('app_logs_configuration', None) - self.kube_config = kwargs.get('kube_config', None) - self.aks_engine_resource_group = kwargs.get('aks_engine_resource_group', None) class ArmIdWrapper(Model): @@ -3778,6 +3699,94 @@ def __init__(self, **kwargs): 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param ftp: Required. Whether FTP is allowed. + :type ftp: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Required. Whether Scm Basic Auth is allowed. + :type scm: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'ftp': {'required': True}, + 'scm': {'required': 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param allow: Required. true to allow access to a publishing + method; otherwise, false. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allow': {'required': 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(Model): """Publishing options for requested profile. @@ -5453,22 +5462,6 @@ def __init__(self, **kwargs): self.ramp_up_rules = kwargs.get('ramp_up_rules', None) -class ExtendedLocation(Model): - """ExtendedLocation. - - :param custom_location: - :type custom_location: str - """ - - _attribute_map = { - 'custom_location': {'key': 'customLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedLocation, self).__init__(**kwargs) - self.custom_location = kwargs.get('custom_location', None) - - class FileSystemApplicationLogsConfig(Model): """Application logs to file system configuration. @@ -5520,22 +5513,6 @@ def __init__(self, **kwargs): self.enabled = kwargs.get('enabled', None) -class FrontEndConfiguration(Model): - """FrontEndConfiguration. - - :param kind: Possible values include: 'NodePort', 'LoadBalancer' - :type kind: str or ~azure.mgmt.web.v2019_08_01.models.FrontEndServiceType - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, - } - - def __init__(self, **kwargs): - super(FrontEndConfiguration, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - - class FunctionEnvelope(ProxyOnlyResource): """Function information. @@ -6313,16 +6290,6 @@ class IpSecurityRestriction(Model): :type name: str :param description: IP restriction rule description. :type description: str - :param x_forwarded_hosts: - :type x_forwarded_hosts: list[str] - :param x_forwarded_fors: 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. - :type x_forwarded_fors: list[str] """ _attribute_map = { @@ -6336,8 +6303,6 @@ class IpSecurityRestriction(Model): 'priority': {'key': 'priority', 'type': 'int'}, 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, - 'x_forwarded_hosts': {'key': 'xForwardedHosts', 'type': '[str]'}, - 'x_forwarded_fors': {'key': 'xForwardedFors', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -6352,8 +6317,6 @@ def __init__(self, **kwargs): self.priority = kwargs.get('priority', None) self.name = kwargs.get('name', None) self.description = kwargs.get('description', None) - self.x_forwarded_hosts = kwargs.get('x_forwarded_hosts', None) - self.x_forwarded_fors = kwargs.get('x_forwarded_fors', None) class KeyInfo(Model): @@ -6440,8 +6403,8 @@ class KeyVaultReferenceResource(ProxyOnlyResource): :type secret_name: str :param secret_version: :type secret_version: str - :param identity_type: Possible values include: 'None', 'SystemAssigned', - 'UserAssigned' + :param identity_type: Possible values include: 'SystemAssigned', + 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type identity_type: str or ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType :param details: @@ -6489,237 +6452,6 @@ def __init__(self, **kwargs): self.location = kwargs.get('location', None) -class KubeEnvironment(Resource): - """A Kubernetes cluster specialized for web workloads by Azure App Service. - - 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: Resource tags. - :type tags: dict[str, str] - :param extended_location: - :type extended_location: - ~azure.mgmt.web.v2019_08_01.models.ExtendedLocation - :ivar provisioning_state: Provisioning state of the Kubernetes - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Waiting', 'InitializationInProgress', 'ARMDeploymentInProgress', - 'ARMDeploymentFinished', 'InfrastructureSetupInProgress', - 'InfrastructureSetupComplete', 'ScheduledForDelete', 'DeletionInProgress', - 'UpgradeRequested', 'UpgradeFailed', 'InitializationFailed' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2019_08_01.models.K8SEProvisioningState - :param node_pools: Required. Description of node pools with VM sizes, - number of instances in each pool, and maximum instance counts for - autoscaling. - :type node_pools: list[~azure.mgmt.web.v2019_08_01.models.KubeNodePool] - :ivar subscription_id: Subscription of the Kubernetes Environment. - :vartype subscription_id: str - :ivar aks_cluster_resource_group: Resource group of the Kubernetes - Environment. - :vartype aks_cluster_resource_group: str - :ivar kubernetes_version: Kubernetes version of the AKS cluster - :vartype kubernetes_version: str - :ivar deployment_errors: Any errors that occurred during deployment or - deployment validation - :vartype deployment_errors: str - :param internal_load_balancer_enabled: Only visible within Vnet/Subnet - :type internal_load_balancer_enabled: bool - :param vnet_subnet_id: Vnet/Subnet of the Kube Nodes/Pods/Services - :type vnet_subnet_id: str - :param network_plugin: Use 'kubenet' (default) or 'azure' network - configuration - if VnetSubnetID is not specified (using default vnet/subnet), only - 'kubenet' is supported - See - https://docs.microsoft.com/en-us/azure/aks/concepts-network#azure-virtual-networks. - Possible values include: 'kubenet', 'azure' - :type network_plugin: str or - ~azure.mgmt.web.v2019_08_01.models.K8SENetworkPlugin - :param service_cidr: Address space to be used by services - (nodeport/clusterip/loadbalancer) - It must be within the vnet but not used by subnet - This is required if VnetSubnetID is specified - :type service_cidr: str - :param dns_service_ip: Kubernetes Dns Service IP within ServiceCidr - (commonly, .10 address) - This is required if VnetSubnetID is specified - :type dns_service_ip: str - :param docker_bridge_cidr: This lets AKS nodes communicate with the - underlying management platform. - This IP address must NOT be within the virtual network IP address range of - your cluster, - and shouldn't overlap with other address ranges in use on your network. - Default (by AKS) is 172.17.0.1/16. If your VNET overlapped with this, you - must specify others - :type docker_bridge_cidr: str - :param service_principal_client_id: Service Principal Client ID - :type service_principal_client_id: str - :param service_principal_client_secret: Service Principal Client Secret - :type service_principal_client_secret: str - :param static_ip: Static IP of the KubeEnvironment - :type static_ip: str - :param default_certificate_provision_start_time: Time when - DefaultCertificateProvisioning is started, used to - determine timeout for certificate provisioning - :type default_certificate_provision_start_time: str - :param log_analytics_workspace_id: - :type log_analytics_workspace_id: str - :param compute_platform: - :type compute_platform: str - :param namespace: - :type namespace: str - :param arc_configuration: Cluster configuration which determines the ARC - cluster - components types. Eg: Choosing between BuildService kind, - FrontEnd Service ArtifactsStorageType etc. - :type arc_configuration: - ~azure.mgmt.web.v2019_08_01.models.ArcConfiguration - :param aks_resource_id: - :type aks_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'node_pools': {'required': True}, - 'subscription_id': {'readonly': True}, - 'aks_cluster_resource_group': {'readonly': True}, - 'kubernetes_version': {'readonly': True}, - 'deployment_errors': {'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}'}, - 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'K8SEProvisioningState'}, - 'node_pools': {'key': 'properties.nodePools', 'type': '[KubeNodePool]'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'aks_cluster_resource_group': {'key': 'properties.aksClusterResourceGroup', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, - 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'network_plugin': {'key': 'properties.networkPlugin', 'type': 'K8SENetworkPlugin'}, - 'service_cidr': {'key': 'properties.serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'properties.dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'properties.dockerBridgeCidr', 'type': 'str'}, - 'service_principal_client_id': {'key': 'properties.servicePrincipalClientId', 'type': 'str'}, - 'service_principal_client_secret': {'key': 'properties.servicePrincipalClientSecret', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, - 'default_certificate_provision_start_time': {'key': 'properties.defaultCertificateProvisionStartTime', 'type': 'str'}, - 'log_analytics_workspace_id': {'key': 'properties.logAnalyticsWorkspaceID', 'type': 'str'}, - 'compute_platform': {'key': 'properties.computePlatform', 'type': 'str'}, - 'namespace': {'key': 'properties.namespace', 'type': 'str'}, - 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, - 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KubeEnvironment, self).__init__(**kwargs) - self.extended_location = kwargs.get('extended_location', None) - self.provisioning_state = None - self.node_pools = kwargs.get('node_pools', None) - self.subscription_id = None - self.aks_cluster_resource_group = None - self.kubernetes_version = None - self.deployment_errors = None - self.internal_load_balancer_enabled = kwargs.get('internal_load_balancer_enabled', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.network_plugin = kwargs.get('network_plugin', None) - self.service_cidr = kwargs.get('service_cidr', None) - self.dns_service_ip = kwargs.get('dns_service_ip', None) - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', None) - self.service_principal_client_id = kwargs.get('service_principal_client_id', None) - self.service_principal_client_secret = kwargs.get('service_principal_client_secret', None) - self.static_ip = kwargs.get('static_ip', None) - self.default_certificate_provision_start_time = kwargs.get('default_certificate_provision_start_time', None) - self.log_analytics_workspace_id = kwargs.get('log_analytics_workspace_id', None) - self.compute_platform = kwargs.get('compute_platform', None) - self.namespace = kwargs.get('namespace', None) - self.arc_configuration = kwargs.get('arc_configuration', None) - self.aks_resource_id = kwargs.get('aks_resource_id', None) - - -class KubeEnvironmentProfile(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 KubeNodePool(Model): - """Node pool of a Kubernetes Environment. - - :param vm_size: VM size of the node pool instances. - :type vm_size: str - :param node_count: Number of instances in the node pool. - :type node_count: int - :param max_node_count: Maximum number of instances for autoscaling. - :type max_node_count: int - :param name: Name of the node pool. - :type name: str - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KubeNodePool, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) - self.node_count = kwargs.get('node_count', None) - self.max_node_count = kwargs.get('max_node_count', None) - self.name = kwargs.get('name', None) - - class LocalizableString(Model): """Localizable string object containing the name and a localized value. @@ -6740,26 +6472,6 @@ def __init__(self, **kwargs): self.localized_value = kwargs.get('localized_value', None) -class LogAnalyticsConfiguration(Model): - """LogAnalyticsConfiguration. - - :param customer_id: - :type customer_id: str - :param shared_key: - :type shared_key: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'shared_key': {'key': 'sharedKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsConfiguration, self).__init__(**kwargs) - self.customer_id = kwargs.get('customer_id', None) - self.shared_key = kwargs.get('shared_key', None) - - class LogSpecification(Model): """Log Definition of a single resource metric. @@ -6769,15 +6481,12 @@ class LogSpecification(Model): :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): @@ -6785,7 +6494,6 @@ def __init__(self, **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(Model): @@ -6795,7 +6503,7 @@ class ManagedServiceIdentity(Model): sending a request. :param type: Type of managed service identity. Possible values include: - 'None', 'SystemAssigned', 'UserAssigned' + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type type: str or ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType :ivar tenant_id: Tenant of managed service identity. @@ -9418,14 +9126,6 @@ class Site(Resource): authentication (TLS mutual authentication); otherwise, false. Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2019_08_01.models.ClientCertMode :param client_cert_exclusion_paths: client certificate authentication comma-separated exclusion paths :type client_cert_exclusion_paths: str @@ -9534,7 +9234,6 @@ class Site(Resource): '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': 'ClientCertMode'}, 'client_cert_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': 'str'}, @@ -9576,7 +9275,6 @@ def __init__(self, **kwargs): 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.outbound_ip_addresses = None @@ -9920,6 +9618,12 @@ class SiteConfig(Model): :param http_logging_enabled: true if HTTP logging is enabled; otherwise, false. :type http_logging_enabled: bool + :param acr_use_managed_identity_creds: Flag to use Managed Identity Creds + for ACR pull + :type acr_use_managed_identity_creds: bool + :param acr_user_managed_identity_id: If using user managed identity, the + user managed identity ClientId + :type acr_user_managed_identity_id: str :param logs_directory_size_limit: HTTP logs directory size limit. :type logs_directory_size_limit: int :param detailed_error_logging_enabled: true if detailed error @@ -9929,9 +9633,6 @@ class SiteConfig(Model): :type publishing_username: str :param app_settings: Application settings. :type app_settings: list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param azure_storage_accounts: AzureStorageAccounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] :param connection_strings: Connection strings. :type connection_strings: list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] @@ -10033,23 +9734,6 @@ class SiteConfig(Model): :type pre_warmed_instance_count: 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 """ _validation = { @@ -10072,11 +9756,12 @@ class SiteConfig(Model): 'remote_debugging_enabled': {'key': 'remoteDebuggingEnabled', 'type': 'bool'}, 'remote_debugging_version': {'key': 'remoteDebuggingVersion', 'type': 'str'}, 'http_logging_enabled': {'key': 'httpLoggingEnabled', 'type': 'bool'}, + 'acr_use_managed_identity_creds': {'key': 'acrUseManagedIdentityCreds', 'type': 'bool'}, + 'acr_user_managed_identity_id': {'key': 'acrUserManagedIdentityID', 'type': 'str'}, '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]'}, @@ -10114,8 +9799,6 @@ class SiteConfig(Model): 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, 'pre_warmed_instance_count': {'key': 'preWarmedInstanceCount', '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'}, } def __init__(self, **kwargs): @@ -10134,11 +9817,12 @@ def __init__(self, **kwargs): 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.acr_use_managed_identity_creds = kwargs.get('acr_use_managed_identity_creds', None) + self.acr_user_managed_identity_id = kwargs.get('acr_user_managed_identity_id', 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) @@ -10176,8 +9860,6 @@ def __init__(self, **kwargs): self.ftps_state = kwargs.get('ftps_state', None) self.pre_warmed_instance_count = kwargs.get('pre_warmed_instance_count', 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) class SiteConfigResource(ProxyOnlyResource): @@ -10226,6 +9908,12 @@ class SiteConfigResource(ProxyOnlyResource): :param http_logging_enabled: true if HTTP logging is enabled; otherwise, false. :type http_logging_enabled: bool + :param acr_use_managed_identity_creds: Flag to use Managed Identity Creds + for ACR pull + :type acr_use_managed_identity_creds: bool + :param acr_user_managed_identity_id: If using user managed identity, the + user managed identity ClientId + :type acr_user_managed_identity_id: str :param logs_directory_size_limit: HTTP logs directory size limit. :type logs_directory_size_limit: int :param detailed_error_logging_enabled: true if detailed error @@ -10235,9 +9923,6 @@ class SiteConfigResource(ProxyOnlyResource): :type publishing_username: str :param app_settings: Application settings. :type app_settings: list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param azure_storage_accounts: AzureStorageAccounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] :param connection_strings: Connection strings. :type connection_strings: list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] @@ -10339,23 +10024,6 @@ class SiteConfigResource(ProxyOnlyResource): :type pre_warmed_instance_count: 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 """ _validation = { @@ -10385,11 +10053,12 @@ class SiteConfigResource(ProxyOnlyResource): 'remote_debugging_enabled': {'key': 'properties.remoteDebuggingEnabled', 'type': 'bool'}, 'remote_debugging_version': {'key': 'properties.remoteDebuggingVersion', 'type': 'str'}, 'http_logging_enabled': {'key': 'properties.httpLoggingEnabled', 'type': 'bool'}, + 'acr_use_managed_identity_creds': {'key': 'properties.acrUseManagedIdentityCreds', 'type': 'bool'}, + 'acr_user_managed_identity_id': {'key': 'properties.acrUserManagedIdentityID', 'type': 'str'}, '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]'}, @@ -10427,8 +10096,6 @@ class SiteConfigResource(ProxyOnlyResource): 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, 'pre_warmed_instance_count': {'key': 'properties.preWarmedInstanceCount', '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'}, } def __init__(self, **kwargs): @@ -10447,11 +10114,12 @@ def __init__(self, **kwargs): 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.acr_use_managed_identity_creds = kwargs.get('acr_use_managed_identity_creds', None) + self.acr_user_managed_identity_id = kwargs.get('acr_user_managed_identity_id', 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) @@ -10489,8 +10157,6 @@ def __init__(self, **kwargs): self.ftps_state = kwargs.get('ftps_state', None) self.pre_warmed_instance_count = kwargs.get('pre_warmed_instance_count', 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) class SiteConfigurationSnapshotInfo(ProxyOnlyResource): @@ -11194,9 +10860,6 @@ class SkuCapacity(Model): :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. @@ -11206,7 +10869,6 @@ class SkuCapacity(Model): _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'}, } @@ -11215,7 +10877,6 @@ 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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py index 3154ae0cca3..9e6603a4202 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py @@ -282,8 +282,8 @@ class ApiKVReference(Model): :type secret_name: str :param secret_version: :type secret_version: str - :param identity_type: Possible values include: 'None', 'SystemAssigned', - 'UserAssigned' + :param identity_type: Possible values include: 'SystemAssigned', + 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type identity_type: str or ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType :param details: @@ -454,27 +454,6 @@ def __init__(self, *, kind: str=None, application_stack_resource_name: str=None, self.frameworks = frameworks -class AppLogsConfiguration(Model): - """AppLogsConfiguration. - - :param destination: - :type destination: str - :param log_analytics_configuration: - :type log_analytics_configuration: - ~azure.mgmt.web.v2019_08_01.models.LogAnalyticsConfiguration - """ - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'str'}, - 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, - } - - def __init__(self, *, destination: str=None, log_analytics_configuration=None, **kwargs) -> None: - super(AppLogsConfiguration, self).__init__(**kwargs) - self.destination = destination - self.log_analytics_configuration = log_analytics_configuration - - class AppServiceCertificate(Model): """Key Vault container for a certificate that is purchased through Azure. @@ -1795,10 +1774,6 @@ class AppServicePlan(Resource): 'InProgress', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.KubeEnvironmentProfile :param sku: :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription """ @@ -1843,11 +1818,10 @@ class AppServicePlan(Resource): 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, sku=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.worker_tier_name = worker_tier_name self.status = None @@ -1868,7 +1842,6 @@ def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name 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 self.sku = sku @@ -1924,8 +1897,10 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :type free_offer_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . + :param reserved: This needs to set to true when creating a + Linux App Service Plan, along with kind set to + Linux. It should be false otherwise. Default + value: False . :type reserved: bool :param is_xenon: Obsolete: If Hyper-V container app service plan true, false otherwise. Default value: False . @@ -1942,10 +1917,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'InProgress', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.KubeEnvironmentProfile """ _validation = { @@ -1985,10 +1956,9 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, } - def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: super(AppServicePlanPatchResource, self).__init__(kind=kind, **kwargs) self.worker_tier_name = worker_tier_name self.status = None @@ -2009,55 +1979,6 @@ def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_enviro 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 ArcConfiguration(Model): - """ArcConfiguration. - - :param artifacts_storage_type: Possible values include: 'LocalNode', - 'NetworkFileSystem' - :type artifacts_storage_type: str or - ~azure.mgmt.web.v2019_08_01.models.StorageType - :param artifact_storage_class_name: - :type artifact_storage_class_name: str - :param artifact_storage_mount_path: - :type artifact_storage_mount_path: str - :param artifact_storage_node_name: - :type artifact_storage_node_name: str - :param front_end_service_configuration: - :type front_end_service_configuration: - ~azure.mgmt.web.v2019_08_01.models.FrontEndConfiguration - :param app_logs_configuration: - :type app_logs_configuration: - ~azure.mgmt.web.v2019_08_01.models.AppLogsConfiguration - :param kube_config: - :type kube_config: str - :param aks_engine_resource_group: - :type aks_engine_resource_group: str - """ - - _attribute_map = { - 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, - 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, - 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, - 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, - 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, - 'app_logs_configuration': {'key': 'appLogsConfiguration', 'type': 'AppLogsConfiguration'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - 'aks_engine_resource_group': {'key': 'aksEngineResourceGroup', 'type': 'str'}, - } - - def __init__(self, *, artifacts_storage_type=None, artifact_storage_class_name: str=None, artifact_storage_mount_path: str=None, artifact_storage_node_name: str=None, front_end_service_configuration=None, app_logs_configuration=None, kube_config: str=None, aks_engine_resource_group: str=None, **kwargs) -> None: - super(ArcConfiguration, self).__init__(**kwargs) - self.artifacts_storage_type = artifacts_storage_type - self.artifact_storage_class_name = artifact_storage_class_name - self.artifact_storage_mount_path = artifact_storage_mount_path - self.artifact_storage_node_name = artifact_storage_node_name - self.front_end_service_configuration = front_end_service_configuration - self.app_logs_configuration = app_logs_configuration - self.kube_config = kube_config - self.aks_engine_resource_group = aks_engine_resource_group class ArmIdWrapper(Model): @@ -3778,6 +3699,94 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param ftp: Required. Whether FTP is allowed. + :type ftp: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Required. Whether Scm Basic Auth is allowed. + :type scm: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'ftp': {'required': True}, + 'scm': {'required': 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, *, ftp, scm, kind: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param allow: Required. true to allow access to a publishing + method; otherwise, false. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allow': {'required': 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, *, allow: bool, kind: str=None, **kwargs) -> None: + super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, **kwargs) + self.allow = allow + + class CsmPublishingProfileOptions(Model): """Publishing options for requested profile. @@ -5453,22 +5462,6 @@ def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: self.ramp_up_rules = ramp_up_rules -class ExtendedLocation(Model): - """ExtendedLocation. - - :param custom_location: - :type custom_location: str - """ - - _attribute_map = { - 'custom_location': {'key': 'customLocation', 'type': 'str'}, - } - - def __init__(self, *, custom_location: str=None, **kwargs) -> None: - super(ExtendedLocation, self).__init__(**kwargs) - self.custom_location = custom_location - - class FileSystemApplicationLogsConfig(Model): """Application logs to file system configuration. @@ -5520,22 +5513,6 @@ def __init__(self, *, retention_in_mb: int=None, retention_in_days: int=None, en self.enabled = enabled -class FrontEndConfiguration(Model): - """FrontEndConfiguration. - - :param kind: Possible values include: 'NodePort', 'LoadBalancer' - :type kind: str or ~azure.mgmt.web.v2019_08_01.models.FrontEndServiceType - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(FrontEndConfiguration, self).__init__(**kwargs) - self.kind = kind - - class FunctionEnvelope(ProxyOnlyResource): """Function information. @@ -6313,16 +6290,6 @@ class IpSecurityRestriction(Model): :type name: str :param description: IP restriction rule description. :type description: str - :param x_forwarded_hosts: - :type x_forwarded_hosts: list[str] - :param x_forwarded_fors: 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. - :type x_forwarded_fors: list[str] """ _attribute_map = { @@ -6336,11 +6303,9 @@ class IpSecurityRestriction(Model): 'priority': {'key': 'priority', 'type': 'int'}, 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, - 'x_forwarded_hosts': {'key': 'xForwardedHosts', 'type': '[str]'}, - 'x_forwarded_fors': {'key': 'xForwardedFors', 'type': '[str]'}, } - def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, x_forwarded_hosts=None, x_forwarded_fors=None, **kwargs) -> None: + def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, **kwargs) -> None: super(IpSecurityRestriction, self).__init__(**kwargs) self.ip_address = ip_address self.subnet_mask = subnet_mask @@ -6352,8 +6317,6 @@ def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_r self.priority = priority self.name = name self.description = description - self.x_forwarded_hosts = x_forwarded_hosts - self.x_forwarded_fors = x_forwarded_fors class KeyInfo(Model): @@ -6440,8 +6403,8 @@ class KeyVaultReferenceResource(ProxyOnlyResource): :type secret_name: str :param secret_version: :type secret_version: str - :param identity_type: Possible values include: 'None', 'SystemAssigned', - 'UserAssigned' + :param identity_type: Possible values include: 'SystemAssigned', + 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type identity_type: str or ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType :param details: @@ -6489,237 +6452,6 @@ def __init__(self, *, kind: str=None, reference: str=None, status=None, vault_na self.location = location -class KubeEnvironment(Resource): - """A Kubernetes cluster specialized for web workloads by Azure App Service. - - 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: Resource tags. - :type tags: dict[str, str] - :param extended_location: - :type extended_location: - ~azure.mgmt.web.v2019_08_01.models.ExtendedLocation - :ivar provisioning_state: Provisioning state of the Kubernetes - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Waiting', 'InitializationInProgress', 'ARMDeploymentInProgress', - 'ARMDeploymentFinished', 'InfrastructureSetupInProgress', - 'InfrastructureSetupComplete', 'ScheduledForDelete', 'DeletionInProgress', - 'UpgradeRequested', 'UpgradeFailed', 'InitializationFailed' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2019_08_01.models.K8SEProvisioningState - :param node_pools: Required. Description of node pools with VM sizes, - number of instances in each pool, and maximum instance counts for - autoscaling. - :type node_pools: list[~azure.mgmt.web.v2019_08_01.models.KubeNodePool] - :ivar subscription_id: Subscription of the Kubernetes Environment. - :vartype subscription_id: str - :ivar aks_cluster_resource_group: Resource group of the Kubernetes - Environment. - :vartype aks_cluster_resource_group: str - :ivar kubernetes_version: Kubernetes version of the AKS cluster - :vartype kubernetes_version: str - :ivar deployment_errors: Any errors that occurred during deployment or - deployment validation - :vartype deployment_errors: str - :param internal_load_balancer_enabled: Only visible within Vnet/Subnet - :type internal_load_balancer_enabled: bool - :param vnet_subnet_id: Vnet/Subnet of the Kube Nodes/Pods/Services - :type vnet_subnet_id: str - :param network_plugin: Use 'kubenet' (default) or 'azure' network - configuration - if VnetSubnetID is not specified (using default vnet/subnet), only - 'kubenet' is supported - See - https://docs.microsoft.com/en-us/azure/aks/concepts-network#azure-virtual-networks. - Possible values include: 'kubenet', 'azure' - :type network_plugin: str or - ~azure.mgmt.web.v2019_08_01.models.K8SENetworkPlugin - :param service_cidr: Address space to be used by services - (nodeport/clusterip/loadbalancer) - It must be within the vnet but not used by subnet - This is required if VnetSubnetID is specified - :type service_cidr: str - :param dns_service_ip: Kubernetes Dns Service IP within ServiceCidr - (commonly, .10 address) - This is required if VnetSubnetID is specified - :type dns_service_ip: str - :param docker_bridge_cidr: This lets AKS nodes communicate with the - underlying management platform. - This IP address must NOT be within the virtual network IP address range of - your cluster, - and shouldn't overlap with other address ranges in use on your network. - Default (by AKS) is 172.17.0.1/16. If your VNET overlapped with this, you - must specify others - :type docker_bridge_cidr: str - :param service_principal_client_id: Service Principal Client ID - :type service_principal_client_id: str - :param service_principal_client_secret: Service Principal Client Secret - :type service_principal_client_secret: str - :param static_ip: Static IP of the KubeEnvironment - :type static_ip: str - :param default_certificate_provision_start_time: Time when - DefaultCertificateProvisioning is started, used to - determine timeout for certificate provisioning - :type default_certificate_provision_start_time: str - :param log_analytics_workspace_id: - :type log_analytics_workspace_id: str - :param compute_platform: - :type compute_platform: str - :param namespace: - :type namespace: str - :param arc_configuration: Cluster configuration which determines the ARC - cluster - components types. Eg: Choosing between BuildService kind, - FrontEnd Service ArtifactsStorageType etc. - :type arc_configuration: - ~azure.mgmt.web.v2019_08_01.models.ArcConfiguration - :param aks_resource_id: - :type aks_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'node_pools': {'required': True}, - 'subscription_id': {'readonly': True}, - 'aks_cluster_resource_group': {'readonly': True}, - 'kubernetes_version': {'readonly': True}, - 'deployment_errors': {'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}'}, - 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'K8SEProvisioningState'}, - 'node_pools': {'key': 'properties.nodePools', 'type': '[KubeNodePool]'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'aks_cluster_resource_group': {'key': 'properties.aksClusterResourceGroup', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, - 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'network_plugin': {'key': 'properties.networkPlugin', 'type': 'K8SENetworkPlugin'}, - 'service_cidr': {'key': 'properties.serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'properties.dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'properties.dockerBridgeCidr', 'type': 'str'}, - 'service_principal_client_id': {'key': 'properties.servicePrincipalClientId', 'type': 'str'}, - 'service_principal_client_secret': {'key': 'properties.servicePrincipalClientSecret', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, - 'default_certificate_provision_start_time': {'key': 'properties.defaultCertificateProvisionStartTime', 'type': 'str'}, - 'log_analytics_workspace_id': {'key': 'properties.logAnalyticsWorkspaceID', 'type': 'str'}, - 'compute_platform': {'key': 'properties.computePlatform', 'type': 'str'}, - 'namespace': {'key': 'properties.namespace', 'type': 'str'}, - 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, - 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, - } - - def __init__(self, *, location: str, node_pools, kind: str=None, tags=None, extended_location=None, internal_load_balancer_enabled: bool=None, vnet_subnet_id: str=None, network_plugin=None, service_cidr: str=None, dns_service_ip: str=None, docker_bridge_cidr: str=None, service_principal_client_id: str=None, service_principal_client_secret: str=None, static_ip: str=None, default_certificate_provision_start_time: str=None, log_analytics_workspace_id: str=None, compute_platform: str=None, namespace: str=None, arc_configuration=None, aks_resource_id: str=None, **kwargs) -> None: - super(KubeEnvironment, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.extended_location = extended_location - self.provisioning_state = None - self.node_pools = node_pools - self.subscription_id = None - self.aks_cluster_resource_group = None - self.kubernetes_version = None - self.deployment_errors = None - self.internal_load_balancer_enabled = internal_load_balancer_enabled - self.vnet_subnet_id = vnet_subnet_id - self.network_plugin = network_plugin - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.service_principal_client_id = service_principal_client_id - self.service_principal_client_secret = service_principal_client_secret - self.static_ip = static_ip - self.default_certificate_provision_start_time = default_certificate_provision_start_time - self.log_analytics_workspace_id = log_analytics_workspace_id - self.compute_platform = compute_platform - self.namespace = namespace - self.arc_configuration = arc_configuration - self.aks_resource_id = aks_resource_id - - -class KubeEnvironmentProfile(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: str=None, **kwargs) -> None: - super(KubeEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class KubeNodePool(Model): - """Node pool of a Kubernetes Environment. - - :param vm_size: VM size of the node pool instances. - :type vm_size: str - :param node_count: Number of instances in the node pool. - :type node_count: int - :param max_node_count: Maximum number of instances for autoscaling. - :type max_node_count: int - :param name: Name of the node pool. - :type name: str - """ - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size: str=None, node_count: int=None, max_node_count: int=None, name: str=None, **kwargs) -> None: - super(KubeNodePool, self).__init__(**kwargs) - self.vm_size = vm_size - self.node_count = node_count - self.max_node_count = max_node_count - self.name = name - - class LocalizableString(Model): """Localizable string object containing the name and a localized value. @@ -6740,26 +6472,6 @@ def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> N self.localized_value = localized_value -class LogAnalyticsConfiguration(Model): - """LogAnalyticsConfiguration. - - :param customer_id: - :type customer_id: str - :param shared_key: - :type shared_key: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'shared_key': {'key': 'sharedKey', 'type': 'str'}, - } - - def __init__(self, *, customer_id: str=None, shared_key: str=None, **kwargs) -> None: - super(LogAnalyticsConfiguration, self).__init__(**kwargs) - self.customer_id = customer_id - self.shared_key = shared_key - - class LogSpecification(Model): """Log Definition of a single resource metric. @@ -6769,23 +6481,19 @@ class LogSpecification(Model): :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: str=None, display_name: str=None, blob_duration: str=None, log_filter_pattern: str=None, **kwargs) -> None: + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: 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(Model): @@ -6795,7 +6503,7 @@ class ManagedServiceIdentity(Model): sending a request. :param type: Type of managed service identity. Possible values include: - 'None', 'SystemAssigned', 'UserAssigned' + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type type: str or ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType :ivar tenant_id: Tenant of managed service identity. @@ -9418,14 +9126,6 @@ class Site(Resource): authentication (TLS mutual authentication); otherwise, false. Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2019_08_01.models.ClientCertMode :param client_cert_exclusion_paths: client certificate authentication comma-separated exclusion paths :type client_cert_exclusion_paths: str @@ -9534,7 +9234,6 @@ class Site(Resource): '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': 'ClientCertMode'}, 'client_cert_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': 'str'}, @@ -9554,7 +9253,7 @@ class Site(Resource): 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.state = None self.host_names = None @@ -9576,7 +9275,6 @@ def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=No 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.outbound_ip_addresses = None @@ -9920,6 +9618,12 @@ class SiteConfig(Model): :param http_logging_enabled: true if HTTP logging is enabled; otherwise, false. :type http_logging_enabled: bool + :param acr_use_managed_identity_creds: Flag to use Managed Identity Creds + for ACR pull + :type acr_use_managed_identity_creds: bool + :param acr_user_managed_identity_id: If using user managed identity, the + user managed identity ClientId + :type acr_user_managed_identity_id: str :param logs_directory_size_limit: HTTP logs directory size limit. :type logs_directory_size_limit: int :param detailed_error_logging_enabled: true if detailed error @@ -9929,9 +9633,6 @@ class SiteConfig(Model): :type publishing_username: str :param app_settings: Application settings. :type app_settings: list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param azure_storage_accounts: AzureStorageAccounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] :param connection_strings: Connection strings. :type connection_strings: list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] @@ -10033,23 +9734,6 @@ class SiteConfig(Model): :type pre_warmed_instance_count: 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 """ _validation = { @@ -10072,11 +9756,12 @@ class SiteConfig(Model): 'remote_debugging_enabled': {'key': 'remoteDebuggingEnabled', 'type': 'bool'}, 'remote_debugging_version': {'key': 'remoteDebuggingVersion', 'type': 'str'}, 'http_logging_enabled': {'key': 'httpLoggingEnabled', 'type': 'bool'}, + 'acr_use_managed_identity_creds': {'key': 'acrUseManagedIdentityCreds', 'type': 'bool'}, + 'acr_user_managed_identity_id': {'key': 'acrUserManagedIdentityID', 'type': 'str'}, '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]'}, @@ -10114,11 +9799,9 @@ class SiteConfig(Model): 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, 'pre_warmed_instance_count': {'key': 'preWarmedInstanceCount', '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'}, } - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, functions_runtime_scale_monitoring_enabled: bool=None, website_time_zone: str=None, **kwargs) -> None: + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, acr_use_managed_identity_creds: bool=None, acr_user_managed_identity_id: str=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: super(SiteConfig, self).__init__(**kwargs) self.number_of_workers = number_of_workers self.default_documents = default_documents @@ -10134,11 +9817,12 @@ def __init__(self, *, number_of_workers: int=None, default_documents=None, net_f self.remote_debugging_enabled = remote_debugging_enabled self.remote_debugging_version = remote_debugging_version self.http_logging_enabled = http_logging_enabled + self.acr_use_managed_identity_creds = acr_use_managed_identity_creds + self.acr_user_managed_identity_id = acr_user_managed_identity_id 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 @@ -10176,8 +9860,6 @@ def __init__(self, *, number_of_workers: int=None, default_documents=None, net_f self.ftps_state = ftps_state self.pre_warmed_instance_count = pre_warmed_instance_count 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 class SiteConfigResource(ProxyOnlyResource): @@ -10226,6 +9908,12 @@ class SiteConfigResource(ProxyOnlyResource): :param http_logging_enabled: true if HTTP logging is enabled; otherwise, false. :type http_logging_enabled: bool + :param acr_use_managed_identity_creds: Flag to use Managed Identity Creds + for ACR pull + :type acr_use_managed_identity_creds: bool + :param acr_user_managed_identity_id: If using user managed identity, the + user managed identity ClientId + :type acr_user_managed_identity_id: str :param logs_directory_size_limit: HTTP logs directory size limit. :type logs_directory_size_limit: int :param detailed_error_logging_enabled: true if detailed error @@ -10235,9 +9923,6 @@ class SiteConfigResource(ProxyOnlyResource): :type publishing_username: str :param app_settings: Application settings. :type app_settings: list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param azure_storage_accounts: AzureStorageAccounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] :param connection_strings: Connection strings. :type connection_strings: list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] @@ -10339,23 +10024,6 @@ class SiteConfigResource(ProxyOnlyResource): :type pre_warmed_instance_count: 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 """ _validation = { @@ -10385,11 +10053,12 @@ class SiteConfigResource(ProxyOnlyResource): 'remote_debugging_enabled': {'key': 'properties.remoteDebuggingEnabled', 'type': 'bool'}, 'remote_debugging_version': {'key': 'properties.remoteDebuggingVersion', 'type': 'str'}, 'http_logging_enabled': {'key': 'properties.httpLoggingEnabled', 'type': 'bool'}, + 'acr_use_managed_identity_creds': {'key': 'properties.acrUseManagedIdentityCreds', 'type': 'bool'}, + 'acr_user_managed_identity_id': {'key': 'properties.acrUserManagedIdentityID', 'type': 'str'}, '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]'}, @@ -10427,11 +10096,9 @@ class SiteConfigResource(ProxyOnlyResource): 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, 'pre_warmed_instance_count': {'key': 'properties.preWarmedInstanceCount', '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'}, } - def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, functions_runtime_scale_monitoring_enabled: bool=None, website_time_zone: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, acr_use_managed_identity_creds: bool=None, acr_user_managed_identity_id: str=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: super(SiteConfigResource, self).__init__(kind=kind, **kwargs) self.number_of_workers = number_of_workers self.default_documents = default_documents @@ -10447,11 +10114,12 @@ def __init__(self, *, kind: str=None, number_of_workers: int=None, default_docum self.remote_debugging_enabled = remote_debugging_enabled self.remote_debugging_version = remote_debugging_version self.http_logging_enabled = http_logging_enabled + self.acr_use_managed_identity_creds = acr_use_managed_identity_creds + self.acr_user_managed_identity_id = acr_user_managed_identity_id 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 @@ -10489,8 +10157,6 @@ def __init__(self, *, kind: str=None, number_of_workers: int=None, default_docum self.ftps_state = ftps_state self.pre_warmed_instance_count = pre_warmed_instance_count 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 class SiteConfigurationSnapshotInfo(ProxyOnlyResource): @@ -11194,9 +10860,6 @@ class SkuCapacity(Model): :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. @@ -11206,16 +10869,14 @@ class SkuCapacity(Model): _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: int=None, maximum: int=None, elastic_maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: super(SkuCapacity, self).__init__(**kwargs) self.minimum = minimum self.maximum = maximum - self.elastic_maximum = elastic_maximum self.default = default self.scale_type = scale_type diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py index 5a66741b303..3f4af4dd589 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py @@ -779,16 +779,3 @@ class ResourceHealthMetadataPaged(Paged): def __init__(self, *args, **kwargs): super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) -class KubeEnvironmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`KubeEnvironment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KubeEnvironment]'} - } - - def __init__(self, *args, **kwargs): - - super(KubeEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py index 6adf1ae4afd..2cbe79ed770 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py @@ -83,9 +83,10 @@ class RouteType(str, Enum): class ManagedServiceIdentityType(str, Enum): - none = "None" system_assigned = "SystemAssigned" user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" class IpFilterTag(str, Enum): @@ -116,19 +117,6 @@ class ConnectionStringType(str, Enum): postgre_sql = "PostgreSQL" -class AzureStorageType(str, Enum): - - azure_files = "AzureFiles" - azure_blob = "AzureBlob" - - -class AzureStorageState(str, Enum): - - ok = "Ok" - invalid_credentials = "InvalidCredentials" - invalid_share = "InvalidShare" - - class ScmType(str, Enum): none = "None" @@ -202,12 +190,6 @@ class SiteAvailabilityState(str, Enum): disaster_recovery_mode = "DisasterRecoveryMode" -class ClientCertMode(str, Enum): - - required = "Required" - optional = "Optional" - - class RedundancyMode(str, Enum): none = "None" @@ -445,6 +427,19 @@ class LogLevel(str, Enum): error = "Error" +class AzureStorageType(str, Enum): + + azure_files = "AzureFiles" + azure_blob = "AzureBlob" + + +class AzureStorageState(str, Enum): + + ok = "Ok" + invalid_credentials = "InvalidCredentials" + invalid_share = "InvalidShare" + + class BackupItemStatus(str, Enum): in_progress = "InProgress" @@ -599,42 +594,6 @@ class TriggerTypes(str, Enum): unknown = "Unknown" -class StorageType(str, Enum): - - local_node = "LocalNode" - network_file_system = "NetworkFileSystem" - - -class FrontEndServiceType(str, Enum): - - node_port = "NodePort" - load_balancer = "LoadBalancer" - - -class K8SEProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - waiting = "Waiting" - initialization_in_progress = "InitializationInProgress" - arm_deployment_in_progress = "ARMDeploymentInProgress" - arm_deployment_finished = "ARMDeploymentFinished" - infrastructure_setup_in_progress = "InfrastructureSetupInProgress" - infrastructure_setup_complete = "InfrastructureSetupComplete" - scheduled_for_delete = "ScheduledForDelete" - deletion_in_progress = "DeletionInProgress" - upgrade_requested = "UpgradeRequested" - upgrade_failed = "UpgradeFailed" - initialization_failed = "InitializationFailed" - - -class K8SENetworkPlugin(str, Enum): - - kubenet = "kubenet" - azure = "azure" - - class SkuName(str, Enum): free = "Free" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py index 499340c06fa..b6a3c15dcb7 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py @@ -24,7 +24,6 @@ from ._app_service_environments_operations import AppServiceEnvironmentsOperations from ._app_service_plans_operations import AppServicePlansOperations from ._resource_health_metadata_operations import ResourceHealthMetadataOperations -from ._kube_environments_operations import KubeEnvironmentsOperations from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin __all__ = [ @@ -43,6 +42,5 @@ 'AppServiceEnvironmentsOperations', 'AppServicePlansOperations', 'ResourceHealthMetadataOperations', - 'KubeEnvironmentsOperations', 'WebSiteManagementClientOperationsMixin', ] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py index 02fa667f828..938d74d4cac 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py @@ -1074,6 +1074,358 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} + def get_basic_publishing_credentials_policies( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesCollection or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesCollection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_basic_publishing_credentials_policies.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} + + def get_ftp_allowed( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ftp_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} + + def update_ftp_allowed( + self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): + """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 allow: true to allow access to a publishing + method; otherwise, false. + :type allow: bool + :param kind: Kind of resource. + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) + + # Construct URL + url = self.update_ftp_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} + + def get_scm_allowed( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_scm_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} + + def update_scm_allowed( + self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): + """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 allow: true to allow access to a publishing + method; otherwise, false. + :type allow: bool + :param kind: Kind of resource. + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) + + # Construct URL + url = self.update_scm_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} + def list_configurations( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """List the configurations of an app. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py new file mode 100644 index 00000000000..17dafedeb44 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py @@ -0,0 +1,126 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import WebSiteManagementClientOperationsMixin +from .operations import AppServiceCertificateOrdersOperations +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 KubeEnvironmentsOperations +from .operations import ProviderOperations +from .operations import RecommendationsOperations +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, SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar app_service_certificate_orders: AppServiceCertificateOrders operations + :vartype app_service_certificate_orders: azure.mgmt.web.v2020_06_01.operations.AppServiceCertificateOrdersOperations + :ivar certificate_registration_provider: CertificateRegistrationProvider operations + :vartype certificate_registration_provider: azure.mgmt.web.v2020_06_01.operations.CertificateRegistrationProviderOperations + :ivar domains: Domains operations + :vartype domains: azure.mgmt.web.v2020_06_01.operations.DomainsOperations + :ivar top_level_domains: TopLevelDomains operations + :vartype top_level_domains: azure.mgmt.web.v2020_06_01.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProvider operations + :vartype domain_registration_provider: azure.mgmt.web.v2020_06_01.operations.DomainRegistrationProviderOperations + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.web.v2020_06_01.operations.CertificatesOperations + :ivar deleted_web_apps: DeletedWebApps operations + :vartype deleted_web_apps: azure.mgmt.web.v2020_06_01.operations.DeletedWebAppsOperations + :ivar diagnostics: Diagnostics operations + :vartype diagnostics: azure.mgmt.web.v2020_06_01.operations.DiagnosticsOperations + :ivar kube_environments: KubeEnvironments operations + :vartype kube_environments: azure.mgmt.web.v2020_06_01.operations.KubeEnvironmentsOperations + :ivar provider: Provider operations + :vartype provider: azure.mgmt.web.v2020_06_01.operations.ProviderOperations + :ivar recommendations: Recommendations operations + :vartype recommendations: azure.mgmt.web.v2020_06_01.operations.RecommendationsOperations + :ivar web_apps: WebApps operations + :vartype web_apps: azure.mgmt.web.v2020_06_01.operations.WebAppsOperations + :ivar static_sites: StaticSites operations + :vartype static_sites: azure.mgmt.web.v2020_06_01.operations.StaticSitesOperations + :ivar app_service_environments: AppServiceEnvironments operations + :vartype app_service_environments: azure.mgmt.web.v2020_06_01.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlans operations + :vartype app_service_plans: azure.mgmt.web.v2020_06_01.operations.AppServicePlansOperations + :ivar resource_health_metadata: ResourceHealthMetadata operations + :vartype resource_health_metadata: azure.mgmt.web.v2020_06_01.operations.ResourceHealthMetadataOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-06-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( + 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.kube_environments = KubeEnvironmentsOperations( + 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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py new file mode 100644 index 00000000000..40088a7dceb --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py @@ -0,0 +1,1164 @@ +# 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 ApiManagementConfig + from ._models_py3 import ApplicationLogsConfig + from ._models_py3 import ApplicationStack + from ._models_py3 import ApplicationStackResource + from ._models_py3 import AppLogsConfiguration + from ._models_py3 import AppRegistration + from ._models_py3 import AppServiceCertificate + from ._models_py3 import AppServiceCertificateOrder + from ._models_py3 import AppServiceCertificateOrderPatchResource + from ._models_py3 import AppServiceCertificatePatchResource + from ._models_py3 import AppServiceCertificateResource + from ._models_py3 import AppServiceEnvironment + from ._models_py3 import AppServiceEnvironmentPatchResource + from ._models_py3 import AppServiceEnvironmentResource + from ._models_py3 import AppServicePlan + from ._models_py3 import AppServicePlanPatchResource + from ._models_py3 import ArcConfiguration + from ._models_py3 import ArmIdWrapper + 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 AzureStorageInfoValue + from ._models_py3 import AzureStoragePropertyDictionaryResource + from ._models_py3 import AzureTableStorageApplicationLogsConfig + from ._models_py3 import BackupItem + from ._models_py3 import BackupRequest + from ._models_py3 import BackupSchedule + from ._models_py3 import BillingMeter + from ._models_py3 import BlobStorageTokenStore + from ._models_py3 import Capability + from ._models_py3 import Certificate + from ._models_py3 import CertificateDetails + from ._models_py3 import CertificateEmail + from ._models_py3 import CertificateOrderAction + from ._models_py3 import CertificatePatchResource + from ._models_py3 import ClientRegistration + from ._models_py3 import CloningInfo + from ._models_py3 import ConnectionStringDictionary + from ._models_py3 import ConnStringInfo + from ._models_py3 import ConnStringValueTypePair + 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 CookieExpiration + from ._models_py3 import CorsSettings + from ._models_py3 import CsmCopySlotEntity + from ._models_py3 import CsmMoveResourceEnvelope + 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 CustomHostnameAnalysisResult + from ._models_py3 import CustomOpenIdConnectProvider + from ._models_py3 import DatabaseBackupSetting + from ._models_py3 import DataSource + from ._models_py3 import DataTableResponseColumn + from ._models_py3 import DataTableResponseObject + from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException + from ._models_py3 import DefaultErrorResponseError + from ._models_py3 import DefaultErrorResponseErrorDetailsItem + from ._models_py3 import DeletedAppRestoreRequest + from ._models_py3 import DeletedSite + from ._models_py3 import Deployment + 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 DiagnosticAnalysis + from ._models_py3 import DiagnosticCategory + from ._models_py3 import DiagnosticData + 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 DomainControlCenterSsoRequest + from ._models_py3 import DomainOwnershipIdentifier + 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 ExtendedLocation + 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 FrontEndConfiguration + from ._models_py3 import FunctionEnvelope + from ._models_py3 import FunctionSecrets + from ._models_py3 import GeoRegion + from ._models_py3 import GitHub + from ._models_py3 import GlobalCsmSkuDescription + from ._models_py3 import GlobalValidation + from ._models_py3 import Google + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentDeploymentInfo + from ._models_py3 import HostingEnvironmentDiagnostics + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostKeys + from ._models_py3 import HostName + from ._models_py3 import HostNameBinding + from ._models_py3 import HostNameSslState + from ._models_py3 import HttpLogsConfig + from ._models_py3 import HttpSettings + from ._models_py3 import HttpSettingsRoutes + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import HybridConnectionLimits + from ._models_py3 import Identifier + from ._models_py3 import IdentityProviders + from ._models_py3 import InboundEnvironmentEndpoint + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import JwtClaimChecks + from ._models_py3 import KeyInfo + from ._models_py3 import KubeEnvironment + from ._models_py3 import KubeEnvironmentProfile + from ._models_py3 import LocalizableString + from ._models_py3 import LogAnalyticsConfiguration + from ._models_py3 import Login + from ._models_py3 import LoginRoutes + from ._models_py3 import LoginScopes + from ._models_py3 import LogSpecification + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricSpecification + from ._models_py3 import MigrateMySqlRequest + from ._models_py3 import MigrateMySqlStatus + from ._models_py3 import MSDeploy + from ._models_py3 import MSDeployLog + from ._models_py3 import MSDeployLogEntry + from ._models_py3 import MSDeployStatus + from ._models_py3 import NameIdentifier + from ._models_py3 import NameValuePair + from ._models_py3 import NetworkAccessControlEntry + 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 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 PremierAddOnPatchResource + from ._models_py3 import PrivateAccess + from ._models_py3 import PrivateAccessSubnet + from ._models_py3 import PrivateAccessVirtualNetwork + from ._models_py3 import PrivateEndpointConnectionResource + 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 ProcessModuleInfo + from ._models_py3 import ProcessThreadInfo + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PublicCertificate + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import Recommendation + from ._models_py3 import RecommendationRule + from ._models_py3 import ReissueCertificateOrderRequest + from ._models_py3 import RelayServiceConnectionEntity + from ._models_py3 import Rendering + from ._models_py3 import RenewCertificateOrderRequest + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceHealthMetadata + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceNameAvailability + from ._models_py3 import ResourceNameAvailabilityRequest + from ._models_py3 import ResponseMetaData + from ._models_py3 import RestoreRequest + 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 SiteConfigResource + from ._models_py3 import SiteConfigurationSnapshotInfo + from ._models_py3 import SiteExtensionInfo + 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 SkuInfos + from ._models_py3 import SlotConfigNamesResource + from ._models_py3 import SlotDifference + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotRecoverySource + from ._models_py3 import SnapshotRestoreRequest + from ._models_py3 import Solution + from ._models_py3 import SourceControl + from ._models_py3 import StackMajorVersion + from ._models_py3 import StackMinorVersion + from ._models_py3 import StampCapacity + from ._models_py3 import StaticSiteARMResource + from ._models_py3 import StaticSiteBuildARMResource + from ._models_py3 import StaticSiteBuildProperties + from ._models_py3 import StaticSiteCustomDomainOverviewARMResource + from ._models_py3 import StaticSiteFunctionOverviewARMResource + from ._models_py3 import StaticSitePatchResource + from ._models_py3 import StaticSiteResetPropertiesARMResource + from ._models_py3 import StaticSitesWorkflowPreview + from ._models_py3 import StaticSitesWorkflowPreviewRequest + from ._models_py3 import StaticSiteUserARMResource + from ._models_py3 import StaticSiteUserInvitationRequestResource + from ._models_py3 import StaticSiteUserInvitationResponseResource + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import StorageMigrationOptions + from ._models_py3 import StorageMigrationResponse + from ._models_py3 import StringDictionary + from ._models_py3 import SwiftVirtualNetwork + from ._models_py3 import TldLegalAgreement + from ._models_py3 import TokenStore + from ._models_py3 import TopLevelDomain + from ._models_py3 import TopLevelDomainAgreementOption + from ._models_py3 import TriggeredJobHistory + from ._models_py3 import TriggeredJobRun + from ._models_py3 import TriggeredWebJob + from ._models_py3 import Twitter + from ._models_py3 import TwitterRegistration + from ._models_py3 import Usage + 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 WebJob + from ._models_py3 import WebSiteInstanceStatus + from ._models_py3 import WorkerPool + from ._models_py3 import WorkerPoolResource +except (SyntaxError, ImportError): + from ._models import AbnormalTimePeriod + from ._models import Address + from ._models import AddressResponse + from ._models import AllowedAudiencesValidation + from ._models import AnalysisData + from ._models import AnalysisDefinition + from ._models import ApiDefinitionInfo + from ._models import ApiManagementConfig + from ._models import ApplicationLogsConfig + from ._models import ApplicationStack + from ._models import ApplicationStackResource + from ._models import AppLogsConfiguration + from ._models import AppRegistration + from ._models import AppServiceCertificate + from ._models import AppServiceCertificateOrder + from ._models import AppServiceCertificateOrderPatchResource + from ._models import AppServiceCertificatePatchResource + from ._models import AppServiceCertificateResource + from ._models import AppServiceEnvironment + from ._models import AppServiceEnvironmentPatchResource + from ._models import AppServiceEnvironmentResource + from ._models import AppServicePlan + from ._models import AppServicePlanPatchResource + from ._models import ArcConfiguration + from ._models import ArmIdWrapper + from ._models import AuthPlatform + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import AzureActiveDirectory + from ._models import AzureActiveDirectoryLogin + from ._models import AzureActiveDirectoryRegistration + from ._models import AzureActiveDirectoryValidation + from ._models import AzureBlobStorageApplicationLogsConfig + from ._models import AzureBlobStorageHttpLogsConfig + from ._models import AzureStorageInfoValue + from ._models import AzureStoragePropertyDictionaryResource + from ._models import AzureTableStorageApplicationLogsConfig + from ._models import BackupItem + from ._models import BackupRequest + from ._models import BackupSchedule + from ._models import BillingMeter + from ._models import BlobStorageTokenStore + from ._models import Capability + from ._models import Certificate + from ._models import CertificateDetails + from ._models import CertificateEmail + from ._models import CertificateOrderAction + from ._models import CertificatePatchResource + from ._models import ClientRegistration + from ._models import CloningInfo + from ._models import ConnectionStringDictionary + from ._models import ConnStringInfo + from ._models import ConnStringValueTypePair + from ._models import Contact + from ._models import ContainerCpuStatistics + from ._models import ContainerCpuUsage + from ._models import ContainerInfo + from ._models import ContainerMemoryStatistics + from ._models import ContainerNetworkInterfaceStatistics + from ._models import ContainerThrottlingData + from ._models import ContinuousWebJob + from ._models import CookieExpiration + from ._models import CorsSettings + from ._models import CsmCopySlotEntity + from ._models import CsmMoveResourceEnvelope + from ._models import CsmOperationDescription + from ._models import CsmOperationDescriptionProperties + from ._models import CsmOperationDisplay + from ._models import CsmPublishingCredentialsPoliciesCollection + from ._models import CsmPublishingCredentialsPoliciesEntity + from ._models import CsmPublishingProfileOptions + from ._models import CsmSlotEntity + from ._models import CsmUsageQuota + from ._models import CustomHostnameAnalysisResult + from ._models import CustomOpenIdConnectProvider + from ._models import DatabaseBackupSetting + from ._models import DataSource + from ._models import DataTableResponseColumn + from ._models import DataTableResponseObject + from ._models import DefaultErrorResponse, DefaultErrorResponseException + from ._models import DefaultErrorResponseError + from ._models import DefaultErrorResponseErrorDetailsItem + from ._models import DeletedAppRestoreRequest + from ._models import DeletedSite + from ._models import Deployment + from ._models import DeploymentLocations + from ._models import DetectorAbnormalTimePeriod + from ._models import DetectorDefinition + from ._models import DetectorInfo + from ._models import DetectorResponse + from ._models import DiagnosticAnalysis + from ._models import DiagnosticCategory + from ._models import DiagnosticData + from ._models import DiagnosticDetectorResponse + from ._models import DiagnosticMetricSample + from ._models import DiagnosticMetricSet + from ._models import Dimension + from ._models import Domain + from ._models import DomainAvailabilityCheckResult + from ._models import DomainControlCenterSsoRequest + from ._models import DomainOwnershipIdentifier + from ._models import DomainPatchResource + from ._models import DomainPurchaseConsent + from ._models import DomainRecommendationSearchParameters + from ._models import EnabledConfig + from ._models import EndpointDependency + from ._models import EndpointDetail + from ._models import ErrorEntity + from ._models import Experiments + from ._models import ExtendedLocation + from ._models import Facebook + from ._models import FileSystemApplicationLogsConfig + from ._models import FileSystemHttpLogsConfig + from ._models import FileSystemTokenStore + from ._models import ForwardProxy + from ._models import FrontEndConfiguration + from ._models import FunctionEnvelope + from ._models import FunctionSecrets + from ._models import GeoRegion + from ._models import GitHub + from ._models import GlobalCsmSkuDescription + from ._models import GlobalValidation + from ._models import Google + from ._models import HandlerMapping + from ._models import HostingEnvironmentDeploymentInfo + from ._models import HostingEnvironmentDiagnostics + from ._models import HostingEnvironmentProfile + from ._models import HostKeys + from ._models import HostName + from ._models import HostNameBinding + from ._models import HostNameSslState + from ._models import HttpLogsConfig + from ._models import HttpSettings + from ._models import HttpSettingsRoutes + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import HybridConnectionLimits + from ._models import Identifier + from ._models import IdentityProviders + from ._models import InboundEnvironmentEndpoint + from ._models import IpSecurityRestriction + from ._models import JwtClaimChecks + from ._models import KeyInfo + from ._models import KubeEnvironment + from ._models import KubeEnvironmentProfile + from ._models import LocalizableString + from ._models import LogAnalyticsConfiguration + from ._models import Login + from ._models import LoginRoutes + from ._models import LoginScopes + from ._models import LogSpecification + from ._models import ManagedServiceIdentity + from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models import MetricAvailability + from ._models import MetricSpecification + from ._models import MigrateMySqlRequest + from ._models import MigrateMySqlStatus + from ._models import MSDeploy + from ._models import MSDeployLog + from ._models import MSDeployLogEntry + from ._models import MSDeployStatus + from ._models import NameIdentifier + from ._models import NameValuePair + from ._models import NetworkAccessControlEntry + from ._models import NetworkFeatures + from ._models import NetworkTrace + from ._models import Nonce + from ._models import OpenIdConnectClientCredential + from ._models import OpenIdConnectConfig + from ._models import OpenIdConnectLogin + from ._models import OpenIdConnectRegistration + from ._models import Operation + from ._models import OutboundEnvironmentEndpoint + from ._models import PerfMonResponse + from ._models import PerfMonSample + from ._models import PerfMonSet + from ._models import PremierAddOn + from ._models import PremierAddOnOffer + from ._models import PremierAddOnPatchResource + from ._models import PrivateAccess + from ._models import PrivateAccessSubnet + from ._models import PrivateAccessVirtualNetwork + from ._models import PrivateEndpointConnectionResource + from ._models import PrivateLinkConnectionApprovalRequestResource + from ._models import PrivateLinkConnectionState + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceProperties + from ._models import PrivateLinkResourcesWrapper + from ._models import ProcessInfo + from ._models import ProcessModuleInfo + from ._models import ProcessThreadInfo + from ._models import ProxyOnlyResource + from ._models import PublicCertificate + from ._models import PushSettings + from ._models import RampUpRule + from ._models import Recommendation + from ._models import RecommendationRule + from ._models import ReissueCertificateOrderRequest + from ._models import RelayServiceConnectionEntity + from ._models import Rendering + from ._models import RenewCertificateOrderRequest + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceHealthMetadata + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceNameAvailability + from ._models import ResourceNameAvailabilityRequest + from ._models import ResponseMetaData + from ._models import RestoreRequest + from ._models import ServiceSpecification + from ._models import Site + from ._models import SiteAuthSettings + from ._models import SiteAuthSettingsV2 + from ._models import SiteCloneability + from ._models import SiteCloneabilityCriterion + from ._models import SiteConfig + from ._models import SiteConfigResource + from ._models import SiteConfigurationSnapshotInfo + from ._models import SiteExtensionInfo + from ._models import SiteLimits + from ._models import SiteLogsConfig + from ._models import SiteMachineKey + from ._models import SitePatchResource + from ._models import SitePhpErrorLogFlag + from ._models import SiteSeal + from ._models import SiteSealRequest + from ._models import SiteSourceControl + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SkuInfo + from ._models import SkuInfos + from ._models import SlotConfigNamesResource + from ._models import SlotDifference + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import Snapshot + from ._models import SnapshotRecoverySource + from ._models import SnapshotRestoreRequest + from ._models import Solution + from ._models import SourceControl + from ._models import StackMajorVersion + from ._models import StackMinorVersion + from ._models import StampCapacity + from ._models import StaticSiteARMResource + from ._models import StaticSiteBuildARMResource + from ._models import StaticSiteBuildProperties + from ._models import StaticSiteCustomDomainOverviewARMResource + from ._models import StaticSiteFunctionOverviewARMResource + from ._models import StaticSitePatchResource + from ._models import StaticSiteResetPropertiesARMResource + from ._models import StaticSitesWorkflowPreview + from ._models import StaticSitesWorkflowPreviewRequest + from ._models import StaticSiteUserARMResource + from ._models import StaticSiteUserInvitationRequestResource + from ._models import StaticSiteUserInvitationResponseResource + from ._models import StatusCodesBasedTrigger + from ._models import StorageMigrationOptions + from ._models import StorageMigrationResponse + from ._models import StringDictionary + from ._models import SwiftVirtualNetwork + from ._models import TldLegalAgreement + from ._models import TokenStore + from ._models import TopLevelDomain + from ._models import TopLevelDomainAgreementOption + from ._models import TriggeredJobHistory + from ._models import TriggeredJobRun + from ._models import TriggeredWebJob + from ._models import Twitter + from ._models import TwitterRegistration + from ._models import Usage + from ._models import User + from ._models import ValidateRequest + from ._models import ValidateResponse + from ._models import ValidateResponseError + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VirtualIPMapping + from ._models import VirtualNetworkProfile + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetParameters + from ._models import VnetRoute + from ._models import VnetValidationFailureDetails + from ._models import VnetValidationTestFailure + from ._models import WebAppCollection + from ._models import WebJob + from ._models import WebSiteInstanceStatus + from ._models import WorkerPool + from ._models import WorkerPoolResource +from ._paged_models import AnalysisDefinitionPaged +from ._paged_models import ApplicationStackResourcePaged +from ._paged_models import AppServiceCertificateOrderPaged +from ._paged_models import AppServiceCertificateResourcePaged +from ._paged_models import AppServiceEnvironmentResourcePaged +from ._paged_models import AppServicePlanPaged +from ._paged_models import BackupItemPaged +from ._paged_models import BillingMeterPaged +from ._paged_models import CertificatePaged +from ._paged_models import ContinuousWebJobPaged +from ._paged_models import CsmOperationDescriptionPaged +from ._paged_models import CsmUsageQuotaPaged +from ._paged_models import DeletedSitePaged +from ._paged_models import DeploymentPaged +from ._paged_models import DetectorDefinitionPaged +from ._paged_models import DetectorResponsePaged +from ._paged_models import DiagnosticCategoryPaged +from ._paged_models import DomainOwnershipIdentifierPaged +from ._paged_models import DomainPaged +from ._paged_models import FunctionEnvelopePaged +from ._paged_models import GeoRegionPaged +from ._paged_models import HostNameBindingPaged +from ._paged_models import HybridConnectionPaged +from ._paged_models import IdentifierPaged +from ._paged_models import InboundEnvironmentEndpointPaged +from ._paged_models import KubeEnvironmentPaged +from ._paged_models import NameIdentifierPaged +from ._paged_models import OutboundEnvironmentEndpointPaged +from ._paged_models import PerfMonResponsePaged +from ._paged_models import PremierAddOnOfferPaged +from ._paged_models import ProcessInfoPaged +from ._paged_models import ProcessModuleInfoPaged +from ._paged_models import ProcessThreadInfoPaged +from ._paged_models import PublicCertificatePaged +from ._paged_models import RecommendationPaged +from ._paged_models import ResourceHealthMetadataPaged +from ._paged_models import ResourceMetricDefinitionPaged +from ._paged_models import SiteConfigResourcePaged +from ._paged_models import SiteConfigurationSnapshotInfoPaged +from ._paged_models import SiteExtensionInfoPaged +from ._paged_models import SitePaged +from ._paged_models import SkuInfoPaged +from ._paged_models import SlotDifferencePaged +from ._paged_models import SnapshotPaged +from ._paged_models import SourceControlPaged +from ._paged_models import StampCapacityPaged +from ._paged_models import StaticSiteARMResourcePaged +from ._paged_models import StaticSiteBuildARMResourcePaged +from ._paged_models import StaticSiteCustomDomainOverviewARMResourcePaged +from ._paged_models import StaticSiteFunctionOverviewARMResourcePaged +from ._paged_models import StaticSiteUserARMResourcePaged +from ._paged_models import StrPaged +from ._paged_models import TldLegalAgreementPaged +from ._paged_models import TopLevelDomainPaged +from ._paged_models import TriggeredJobHistoryPaged +from ._paged_models import TriggeredWebJobPaged +from ._paged_models import UsagePaged +from ._paged_models import WebJobPaged +from ._paged_models import WebSiteInstanceStatusPaged +from ._paged_models import WorkerPoolResourcePaged +from ._web_site_management_client_enums import ( + KeyVaultSecretStatus, + CertificateProductType, + ProvisioningState, + CertificateOrderStatus, + CertificateOrderActionType, + RouteType, + ManagedServiceIdentityType, + IpFilterTag, + AutoHealActionType, + ConnectionStringType, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + FtpsState, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + ClientCertMode, + RedundancyMode, + StatusOptions, + DomainStatus, + AzureResourceType, + CustomHostNameDnsRecordType, + HostNameType, + DnsType, + DomainType, + HostingEnvironmentStatus, + LoadBalancingMode, + ComputeModeOptions, + WorkerSizeOptions, + AccessControlEntryAction, + OperationStatus, + IssueType, + SolutionType, + RenderingType, + StorageType, + FrontEndServiceType, + KubeEnvironmentProvisioningState, + ResourceScopeType, + NotificationLevel, + Channels, + AppServicePlanRestrictions, + InAvailabilityReasonType, + CheckNameResourceTypes, + ValidateResourceTypes, + LogLevel, + AzureStorageType, + AzureStorageState, + BackupItemStatus, + DatabaseType, + FrequencyUnit, + ContinuousWebJobStatus, + WebJobType, + CookieExpirationConvention, + PublishingProfileFormat, + DnsVerificationTestResult, + ClientCredentialMethod, + ForwardProxyConvention, + UnauthenticatedClientActionV2, + MSDeployLogEntryType, + MSDeployProvisioningState, + MySqlMigrationType, + PublicCertificateLocation, + BackupRestoreOperationType, + UnauthenticatedClientAction, + BuiltInAuthenticationProvider, + CloneAbilityResult, + SiteExtensionType, + TriggeredWebJobStatus, + SiteRuntimeState, + BuildStatus, + TriggerTypes, + SkuName, +) + +__all__ = [ + 'AbnormalTimePeriod', + 'Address', + 'AddressResponse', + 'AllowedAudiencesValidation', + 'AnalysisData', + 'AnalysisDefinition', + 'ApiDefinitionInfo', + 'ApiManagementConfig', + 'ApplicationLogsConfig', + 'ApplicationStack', + 'ApplicationStackResource', + 'AppLogsConfiguration', + 'AppRegistration', + 'AppServiceCertificate', + 'AppServiceCertificateOrder', + 'AppServiceCertificateOrderPatchResource', + 'AppServiceCertificatePatchResource', + 'AppServiceCertificateResource', + 'AppServiceEnvironment', + 'AppServiceEnvironmentPatchResource', + 'AppServiceEnvironmentResource', + 'AppServicePlan', + 'AppServicePlanPatchResource', + 'ArcConfiguration', + 'ArmIdWrapper', + 'AuthPlatform', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'AzureActiveDirectory', + 'AzureActiveDirectoryLogin', + 'AzureActiveDirectoryRegistration', + 'AzureActiveDirectoryValidation', + 'AzureBlobStorageApplicationLogsConfig', + 'AzureBlobStorageHttpLogsConfig', + 'AzureStorageInfoValue', + 'AzureStoragePropertyDictionaryResource', + 'AzureTableStorageApplicationLogsConfig', + 'BackupItem', + 'BackupRequest', + 'BackupSchedule', + 'BillingMeter', + 'BlobStorageTokenStore', + 'Capability', + 'Certificate', + 'CertificateDetails', + 'CertificateEmail', + 'CertificateOrderAction', + 'CertificatePatchResource', + 'ClientRegistration', + 'CloningInfo', + 'ConnectionStringDictionary', + 'ConnStringInfo', + 'ConnStringValueTypePair', + 'Contact', + 'ContainerCpuStatistics', + 'ContainerCpuUsage', + 'ContainerInfo', + 'ContainerMemoryStatistics', + 'ContainerNetworkInterfaceStatistics', + 'ContainerThrottlingData', + 'ContinuousWebJob', + 'CookieExpiration', + 'CorsSettings', + 'CsmCopySlotEntity', + 'CsmMoveResourceEnvelope', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'CsmPublishingCredentialsPoliciesCollection', + 'CsmPublishingCredentialsPoliciesEntity', + 'CsmPublishingProfileOptions', + 'CsmSlotEntity', + 'CsmUsageQuota', + 'CustomHostnameAnalysisResult', + 'CustomOpenIdConnectProvider', + 'DatabaseBackupSetting', + 'DataSource', + 'DataTableResponseColumn', + 'DataTableResponseObject', + 'DefaultErrorResponse', 'DefaultErrorResponseException', + 'DefaultErrorResponseError', + 'DefaultErrorResponseErrorDetailsItem', + 'DeletedAppRestoreRequest', + 'DeletedSite', + 'Deployment', + 'DeploymentLocations', + 'DetectorAbnormalTimePeriod', + 'DetectorDefinition', + 'DetectorInfo', + 'DetectorResponse', + 'DiagnosticAnalysis', + 'DiagnosticCategory', + 'DiagnosticData', + 'DiagnosticDetectorResponse', + 'DiagnosticMetricSample', + 'DiagnosticMetricSet', + 'Dimension', + 'Domain', + 'DomainAvailabilityCheckResult', + 'DomainControlCenterSsoRequest', + 'DomainOwnershipIdentifier', + 'DomainPatchResource', + 'DomainPurchaseConsent', + 'DomainRecommendationSearchParameters', + 'EnabledConfig', + 'EndpointDependency', + 'EndpointDetail', + 'ErrorEntity', + 'Experiments', + 'ExtendedLocation', + 'Facebook', + 'FileSystemApplicationLogsConfig', + 'FileSystemHttpLogsConfig', + 'FileSystemTokenStore', + 'ForwardProxy', + 'FrontEndConfiguration', + 'FunctionEnvelope', + 'FunctionSecrets', + 'GeoRegion', + 'GitHub', + 'GlobalCsmSkuDescription', + 'GlobalValidation', + 'Google', + 'HandlerMapping', + 'HostingEnvironmentDeploymentInfo', + 'HostingEnvironmentDiagnostics', + 'HostingEnvironmentProfile', + 'HostKeys', + 'HostName', + 'HostNameBinding', + 'HostNameSslState', + 'HttpLogsConfig', + 'HttpSettings', + 'HttpSettingsRoutes', + 'HybridConnection', + 'HybridConnectionKey', + 'HybridConnectionLimits', + 'Identifier', + 'IdentityProviders', + 'InboundEnvironmentEndpoint', + 'IpSecurityRestriction', + 'JwtClaimChecks', + 'KeyInfo', + 'KubeEnvironment', + 'KubeEnvironmentProfile', + 'LocalizableString', + 'LogAnalyticsConfiguration', + 'Login', + 'LoginRoutes', + 'LoginScopes', + 'LogSpecification', + 'ManagedServiceIdentity', + 'ManagedServiceIdentityUserAssignedIdentitiesValue', + 'MetricAvailability', + 'MetricSpecification', + 'MigrateMySqlRequest', + 'MigrateMySqlStatus', + 'MSDeploy', + 'MSDeployLog', + 'MSDeployLogEntry', + 'MSDeployStatus', + 'NameIdentifier', + 'NameValuePair', + 'NetworkAccessControlEntry', + 'NetworkFeatures', + 'NetworkTrace', + 'Nonce', + 'OpenIdConnectClientCredential', + 'OpenIdConnectConfig', + 'OpenIdConnectLogin', + 'OpenIdConnectRegistration', + 'Operation', + 'OutboundEnvironmentEndpoint', + 'PerfMonResponse', + 'PerfMonSample', + 'PerfMonSet', + 'PremierAddOn', + 'PremierAddOnOffer', + 'PremierAddOnPatchResource', + 'PrivateAccess', + 'PrivateAccessSubnet', + 'PrivateAccessVirtualNetwork', + 'PrivateEndpointConnectionResource', + 'PrivateLinkConnectionApprovalRequestResource', + 'PrivateLinkConnectionState', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'PrivateLinkResourcesWrapper', + 'ProcessInfo', + 'ProcessModuleInfo', + 'ProcessThreadInfo', + 'ProxyOnlyResource', + 'PublicCertificate', + 'PushSettings', + 'RampUpRule', + 'Recommendation', + 'RecommendationRule', + 'ReissueCertificateOrderRequest', + 'RelayServiceConnectionEntity', + 'Rendering', + 'RenewCertificateOrderRequest', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceHealthMetadata', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceNameAvailability', + 'ResourceNameAvailabilityRequest', + 'ResponseMetaData', + 'RestoreRequest', + 'ServiceSpecification', + 'Site', + 'SiteAuthSettings', + 'SiteAuthSettingsV2', + 'SiteCloneability', + 'SiteCloneabilityCriterion', + 'SiteConfig', + 'SiteConfigResource', + 'SiteConfigurationSnapshotInfo', + 'SiteExtensionInfo', + 'SiteLimits', + 'SiteLogsConfig', + 'SiteMachineKey', + 'SitePatchResource', + 'SitePhpErrorLogFlag', + 'SiteSeal', + 'SiteSealRequest', + 'SiteSourceControl', + 'SkuCapacity', + 'SkuDescription', + 'SkuInfo', + 'SkuInfos', + 'SlotConfigNamesResource', + 'SlotDifference', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'Snapshot', + 'SnapshotRecoverySource', + 'SnapshotRestoreRequest', + 'Solution', + 'SourceControl', + 'StackMajorVersion', + 'StackMinorVersion', + 'StampCapacity', + 'StaticSiteARMResource', + 'StaticSiteBuildARMResource', + 'StaticSiteBuildProperties', + 'StaticSiteCustomDomainOverviewARMResource', + 'StaticSiteFunctionOverviewARMResource', + 'StaticSitePatchResource', + 'StaticSiteResetPropertiesARMResource', + 'StaticSitesWorkflowPreview', + 'StaticSitesWorkflowPreviewRequest', + 'StaticSiteUserARMResource', + 'StaticSiteUserInvitationRequestResource', + 'StaticSiteUserInvitationResponseResource', + 'StatusCodesBasedTrigger', + 'StorageMigrationOptions', + 'StorageMigrationResponse', + 'StringDictionary', + 'SwiftVirtualNetwork', + 'TldLegalAgreement', + 'TokenStore', + 'TopLevelDomain', + 'TopLevelDomainAgreementOption', + 'TriggeredJobHistory', + 'TriggeredJobRun', + 'TriggeredWebJob', + 'Twitter', + 'TwitterRegistration', + 'Usage', + 'User', + 'ValidateRequest', + 'ValidateResponse', + 'ValidateResponseError', + 'VirtualApplication', + 'VirtualDirectory', + 'VirtualIPMapping', + 'VirtualNetworkProfile', + 'VnetGateway', + 'VnetInfo', + 'VnetParameters', + 'VnetRoute', + 'VnetValidationFailureDetails', + 'VnetValidationTestFailure', + 'WebAppCollection', + 'WebJob', + 'WebSiteInstanceStatus', + 'WorkerPool', + 'WorkerPoolResource', + 'AppServiceCertificateOrderPaged', + 'AppServiceCertificateResourcePaged', + 'CsmOperationDescriptionPaged', + 'DomainPaged', + 'NameIdentifierPaged', + 'DomainOwnershipIdentifierPaged', + 'TopLevelDomainPaged', + 'TldLegalAgreementPaged', + 'CertificatePaged', + 'DeletedSitePaged', + 'DetectorResponsePaged', + 'DiagnosticCategoryPaged', + 'AnalysisDefinitionPaged', + 'DetectorDefinitionPaged', + 'KubeEnvironmentPaged', + 'ApplicationStackResourcePaged', + 'RecommendationPaged', + 'SourceControlPaged', + 'BillingMeterPaged', + 'GeoRegionPaged', + 'IdentifierPaged', + 'PremierAddOnOfferPaged', + 'SitePaged', + 'BackupItemPaged', + 'SiteConfigResourcePaged', + 'SiteConfigurationSnapshotInfoPaged', + 'ContinuousWebJobPaged', + 'DeploymentPaged', + 'FunctionEnvelopePaged', + 'HostNameBindingPaged', + 'WebSiteInstanceStatusPaged', + 'ProcessInfoPaged', + 'ProcessModuleInfoPaged', + 'ProcessThreadInfoPaged', + 'PerfMonResponsePaged', + 'PublicCertificatePaged', + 'SiteExtensionInfoPaged', + 'SlotDifferencePaged', + 'SnapshotPaged', + 'TriggeredWebJobPaged', + 'TriggeredJobHistoryPaged', + 'CsmUsageQuotaPaged', + 'WebJobPaged', + 'StaticSiteARMResourcePaged', + 'StaticSiteUserARMResourcePaged', + 'StaticSiteBuildARMResourcePaged', + 'StaticSiteFunctionOverviewARMResourcePaged', + 'StaticSiteCustomDomainOverviewARMResourcePaged', + 'AppServiceEnvironmentResourcePaged', + 'StampCapacityPaged', + 'InboundEnvironmentEndpointPaged', + 'WorkerPoolResourcePaged', + 'ResourceMetricDefinitionPaged', + 'SkuInfoPaged', + 'UsagePaged', + 'OutboundEnvironmentEndpointPaged', + 'AppServicePlanPaged', + 'StrPaged', + 'HybridConnectionPaged', + 'ResourceHealthMetadataPaged', + 'KeyVaultSecretStatus', + 'CertificateProductType', + 'ProvisioningState', + 'CertificateOrderStatus', + 'CertificateOrderActionType', + 'RouteType', + 'ManagedServiceIdentityType', + 'IpFilterTag', + 'AutoHealActionType', + 'ConnectionStringType', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'FtpsState', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'ClientCertMode', + 'RedundancyMode', + 'StatusOptions', + 'DomainStatus', + 'AzureResourceType', + 'CustomHostNameDnsRecordType', + 'HostNameType', + 'DnsType', + 'DomainType', + 'HostingEnvironmentStatus', + 'LoadBalancingMode', + 'ComputeModeOptions', + 'WorkerSizeOptions', + 'AccessControlEntryAction', + 'OperationStatus', + 'IssueType', + 'SolutionType', + 'RenderingType', + 'StorageType', + 'FrontEndServiceType', + 'KubeEnvironmentProvisioningState', + 'ResourceScopeType', + 'NotificationLevel', + 'Channels', + 'AppServicePlanRestrictions', + 'InAvailabilityReasonType', + 'CheckNameResourceTypes', + 'ValidateResourceTypes', + 'LogLevel', + 'AzureStorageType', + 'AzureStorageState', + 'BackupItemStatus', + 'DatabaseType', + 'FrequencyUnit', + 'ContinuousWebJobStatus', + 'WebJobType', + 'CookieExpirationConvention', + 'PublishingProfileFormat', + 'DnsVerificationTestResult', + 'ClientCredentialMethod', + 'ForwardProxyConvention', + 'UnauthenticatedClientActionV2', + 'MSDeployLogEntryType', + 'MSDeployProvisioningState', + 'MySqlMigrationType', + 'PublicCertificateLocation', + 'BackupRestoreOperationType', + 'UnauthenticatedClientAction', + 'BuiltInAuthenticationProvider', + 'CloneAbilityResult', + 'SiteExtensionType', + 'TriggeredWebJobStatus', + 'SiteRuntimeState', + 'BuildStatus', + 'TriggerTypes', + 'SkuName', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py new file mode 100644 index 00000000000..644509cc847 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py @@ -0,0 +1,15212 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2020_06_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2020_06_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(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.get('address1', None) + self.address2 = kwargs.get('address2', None) + self.city = kwargs.get('city', None) + self.country = kwargs.get('country', None) + self.postal_code = kwargs.get('postal_code', None) + self.state = kwargs.get('state', None) + + +class ProxyOnlyResource(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_06_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(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_06_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2020_06_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2020_06_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(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 ApiManagementConfig(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 ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2020_06_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2020_06_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_06_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(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_06_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2020_06_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]'}, + } + + 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) + + +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 application_stack_resource_name: Application stack name. + :type application_stack_resource_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_06_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2020_06_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'}, + 'application_stack_resource_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]'}, + } + + def __init__(self, **kwargs): + super(ApplicationStackResource, self).__init__(**kwargs) + self.application_stack_resource_name = kwargs.get('application_stack_resource_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) + + +class AppLogsConfiguration(Model): + """AppLogsConfiguration. + + :param destination: + :type destination: str + :param log_analytics_configuration: + :type log_analytics_configuration: + ~azure.mgmt.web.v2020_06_01.models.LogAnalyticsConfiguration + """ + + _attribute_map = { + 'destination': {'key': 'destination', 'type': 'str'}, + 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, + } + + def __init__(self, **kwargs): + super(AppLogsConfiguration, self).__init__(**kwargs) + self.destination = kwargs.get('destination', None) + self.log_analytics_configuration = kwargs.get('log_analytics_configuration', 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(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_06_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': 'KeyVaultSecretStatus'}, + } + + 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 Resource(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: 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.get('location', None) + 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: Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2020_06_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_06_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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_06_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_06_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2020_06_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_06_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_06_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2020_06_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_06_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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_06_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_06_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2020_06_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_06_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_06_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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_06_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': 'KeyVaultSecretStatus'}, + } + + 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: 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_06_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': 'KeyVaultSecretStatus'}, + } + + 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(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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_06_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_06_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', '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'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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_06_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_06_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) + self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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: Resource tags. + :type tags: dict[str, str] + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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_06_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_06_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentResource, self).__init__(**kwargs) + self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) + self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) + + +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: Resource tags. + :type tags: dict[str, 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_06_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_06_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_06_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_06_01.models.KubeEnvironmentProfile + :param sku: + :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, 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) + self.sku = kwargs.get('sku', 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_06_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_06_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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_06_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_06_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': 'StatusOptions'}, + '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': 'ProvisioningState'}, + '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 ArcConfiguration(Model): + """ArcConfiguration. + + :param artifacts_storage_type: Possible values include: 'LocalNode', + 'NetworkFileSystem' + :type artifacts_storage_type: str or + ~azure.mgmt.web.v2020_06_01.models.StorageType + :param artifact_storage_class_name: + :type artifact_storage_class_name: str + :param artifact_storage_mount_path: + :type artifact_storage_mount_path: str + :param artifact_storage_node_name: + :type artifact_storage_node_name: str + :param artifact_storage_access_mode: + :type artifact_storage_access_mode: str + :param front_end_service_configuration: + :type front_end_service_configuration: + ~azure.mgmt.web.v2020_06_01.models.FrontEndConfiguration + :param app_logs_configuration: + :type app_logs_configuration: + ~azure.mgmt.web.v2020_06_01.models.AppLogsConfiguration + :param kube_config: + :type kube_config: str + """ + + _attribute_map = { + 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, + 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, + 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, + 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, + 'artifact_storage_access_mode': {'key': 'artifactStorageAccessMode', 'type': 'str'}, + 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, + 'app_logs_configuration': {'key': 'appLogsConfiguration', 'type': 'AppLogsConfiguration'}, + 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArcConfiguration, self).__init__(**kwargs) + self.artifacts_storage_type = kwargs.get('artifacts_storage_type', None) + self.artifact_storage_class_name = kwargs.get('artifact_storage_class_name', None) + self.artifact_storage_mount_path = kwargs.get('artifact_storage_mount_path', None) + self.artifact_storage_node_name = kwargs.get('artifact_storage_node_name', None) + self.artifact_storage_access_mode = kwargs.get('artifact_storage_access_mode', None) + self.front_end_service_configuration = kwargs.get('front_end_service_configuration', None) + self.app_logs_configuration = kwargs.get('app_logs_configuration', None) + self.kube_config = kwargs.get('kube_config', None) + + +class ArmIdWrapper(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 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(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_06_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2020_06_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': 'AutoHealActionType'}, + '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(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(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_06_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2020_06_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2020_06_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_06_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2020_06_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', 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_06_01.models.AzureActiveDirectoryRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_06_01.models.AzureActiveDirectoryLogin + :param validation: + :type validation: + ~azure.mgmt.web.v2020_06_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_06_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(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_06_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': 'LogLevel'}, + '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(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 AzureStorageInfoValue(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_06_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' + :vartype state: str or + ~azure.mgmt.web.v2020_06_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + 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_06_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(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_06_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': 'LogLevel'}, + '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.get('sas_url', None) + + +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 backup_item_name: Name of this backup. + :vartype backup_item_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_06_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 + :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_06_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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.backup_item_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 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. + + 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 + :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: Required. 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_06_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2020_06_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account_url': {'required': 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(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). Default value: 7 . + :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_06_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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 + """ + + _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'}, + } + + 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) + + +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(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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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_06_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_06_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', '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) + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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 + """ + + _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_06_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: 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': 'CertificateOrderActionType'}, + '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 CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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_06_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_06_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', '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) + + +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(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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.get('source_web_app_id', None) + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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_06_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(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_06_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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(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_06_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, **kwargs): + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) + + +class Contact(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_06_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.get('email', None) + self.fax = kwargs.get('fax', None) + self.job_title = kwargs.get('job_title', None) + self.name_first = kwargs.get('name_first', None) + self.name_last = kwargs.get('name_last', None) + self.name_middle = kwargs.get('name_middle', None) + self.organization = kwargs.get('organization', None) + self.phone = kwargs.get('phone', None) + + +class ContainerCpuStatistics(Model): + """ContainerCpuStatistics. + + :param cpu_usage: + :type cpu_usage: ~azure.mgmt.web.v2020_06_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_06_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(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(Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: datetime + :param previous_time_stamp: + :type previous_time_stamp: datetime + :param current_cpu_stats: + :type current_cpu_stats: + ~azure.mgmt.web.v2020_06_01.models.ContainerCpuStatistics + :param previous_cpu_stats: + :type previous_cpu_stats: + ~azure.mgmt.web.v2020_06_01.models.ContainerCpuStatistics + :param memory_stats: + :type memory_stats: + ~azure.mgmt.web.v2020_06_01.models.ContainerMemoryStatistics + :param name: + :type name: str + :param id: + :type id: str + :param eth0: + :type eth0: + ~azure.mgmt.web.v2020_06_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(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(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(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_06_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_06_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': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + '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 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_06_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': 'CookieExpirationConvention'}, + '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(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 CsmCopySlotEntity(Model): + """Copy deployment slot parameters. + + All required parameters must be populated in order to send to Azure. + + :param target_slot: Required. Destination deployment slot during copy + operation. + :type target_slot: str + :param site_config: Required. The site object which will be merged with + the source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2020_06_01.models.SiteConfig + """ + + _validation = { + 'target_slot': {'required': True}, + 'site_config': {'required': True}, + } + + _attribute_map = { + 'target_slot': {'key': 'targetSlot', 'type': 'str'}, + 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, + } + + def __init__(self, **kwargs): + super(CsmCopySlotEntity, self).__init__(**kwargs) + self.target_slot = kwargs.get('target_slot', None) + self.site_config = kwargs.get('site_config', None) + + +class CsmMoveResourceEnvelope(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 CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2020_06_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2020_06_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(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2020_06_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(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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param ftp: Required. Whether FTP is allowed. + :type ftp: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Required. Whether Scm Basic Auth is allowed. + :type scm: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'ftp': {'required': True}, + 'scm': {'required': 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param allow: Required. true to allow access to a publishing + method; otherwise, false. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allow': {'required': 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(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_06_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(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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.get('target_slot', None) + self.preserve_vnet = kwargs.get('preserve_vnet', None) + + +class CsmUsageQuota(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 + :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_06_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 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: true if hostname is + already verified; otherwise, 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_06_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_06_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_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_cname_records = kwargs.get('alternate_cname_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_06_01.models.OpenIdConnectRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_06_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(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_06_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.get('database_type', None) + 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 DataSource(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_06_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(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(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_06_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(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_06_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 DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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_06_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(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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_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.deleted_site_kind = None + self.geo_region_name = 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 + :param end_time: End time. + :type end_time: 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 DeploymentLocations(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_06_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2020_06_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_06_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(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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_06_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_06_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2020_06_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': 'IssueType'}, + '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(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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_06_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2020_06_01.models.DiagnosticData] + """ + + _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]'}, + } + + def __init__(self, **kwargs): + super(DetectorResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.dataset = kwargs.get('dataset', 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 + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_06_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2020_06_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_06_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 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 DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2020_06_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2020_06_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 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 + :param end_time: End time of the period + :type end_time: 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_06_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2020_06_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_06_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2020_06_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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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(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 + :param end_time: End time of the period + :type end_time: 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_06_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(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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_06_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_06_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_06_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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_06_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_06_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2020_06_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_06_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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_06_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + 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 DomainControlCenterSsoRequest(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 DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_06_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_06_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_06_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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_06_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_06_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2020_06_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_06_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(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 + 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 + """ + + _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(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(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(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_06_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(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(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_06_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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2020_06_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 ExtendedLocation(Model): + """ExtendedLocation. + + :param custom_location: + :type custom_location: str + """ + + _attribute_map = { + 'custom_location': {'key': 'customLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExtendedLocation, self).__init__(**kwargs) + self.custom_location = kwargs.get('custom_location', 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_06_01.models.AppRegistration + :param graph_api_version: + :type graph_api_version: str + :param login: + :type login: ~azure.mgmt.web.v2020_06_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(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2020_06_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, **kwargs): + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', "Off") + + +class FileSystemHttpLogsConfig(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_06_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': 'ForwardProxyConvention'}, + '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 FrontEndConfiguration(Model): + """FrontEndConfiguration. + + :param kind: Possible values include: 'NodePort', 'LoadBalancer' + :type kind: str or ~azure.mgmt.web.v2020_06_01.models.FrontEndServiceType + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, + } + + def __init__(self, **kwargs): + super(FrontEndConfiguration, self).__init__(**kwargs) + self.kind = kwargs.get('kind', 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 FunctionSecrets(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 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_06_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_06_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 GlobalCsmSkuDescription(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_06_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_06_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_06_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': 'UnauthenticatedClientActionV2'}, + '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_06_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_06_01.models.LoginScopes + :param validation: + :type validation: + ~azure.mgmt.web.v2020_06_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(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(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(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(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(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(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_06_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_06_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_06_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + 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_06_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_06_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2020_06_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2020_06_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + '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 HostNameSslState(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_06_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 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_06_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2020_06_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_06_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_06_01.models.HttpSettingsRoutes + :param forward_proxy: + :type forward_proxy: ~azure.mgmt.web.v2020_06_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 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 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_06_01.models.AzureActiveDirectory + :param facebook: + :type facebook: ~azure.mgmt.web.v2020_06_01.models.Facebook + :param git_hub: + :type git_hub: ~azure.mgmt.web.v2020_06_01.models.GitHub + :param google: + :type google: ~azure.mgmt.web.v2020_06_01.models.Google + :param twitter: + :type twitter: ~azure.mgmt.web.v2020_06_01.models.Twitter + :param custom_open_id_connect_providers: + :type custom_open_id_connect_providers: dict[str, + ~azure.mgmt.web.v2020_06_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'}, + 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, + '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.twitter = kwargs.get('twitter', None) + self.custom_open_id_connect_providers = kwargs.get('custom_open_id_connect_providers', None) + + +class InboundEnvironmentEndpoint(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 IpSecurityRestriction(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_06_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(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 KubeEnvironment(Resource): + """A Kubernetes cluster specialized for web workloads by Azure App Service. + + 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: Resource tags. + :type tags: dict[str, str] + :param extended_location: + :type extended_location: + ~azure.mgmt.web.v2020_06_01.models.ExtendedLocation + :ivar provisioning_state: Provisioning state of the Kubernetes + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Waiting', 'InitializationInProgress', 'InfrastructureSetupInProgress', + 'InfrastructureSetupComplete', 'ScheduledForDelete', 'UpgradeRequested', + 'UpgradeFailed' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_06_01.models.KubeEnvironmentProvisioningState + :ivar deployment_errors: Any errors that occurred during deployment or + deployment validation + :vartype deployment_errors: str + :param internal_load_balancer_enabled: Only visible within Vnet/Subnet + :type internal_load_balancer_enabled: bool + :param static_ip: Static IP of the KubeEnvironment + :type static_ip: str + :param namespace: + :type namespace: str + :param arc_configuration: Cluster configuration which determines the ARC + cluster + components types. Eg: Choosing between BuildService kind, + FrontEnd Service ArtifactsStorageType etc. + :type arc_configuration: + ~azure.mgmt.web.v2020_06_01.models.ArcConfiguration + :param aks_resource_id: + :type aks_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'deployment_errors': {'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}'}, + 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KubeEnvironmentProvisioningState'}, + 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, + 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, + 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, + 'namespace': {'key': 'properties.namespace', 'type': 'str'}, + 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, + 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubeEnvironment, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.provisioning_state = None + self.deployment_errors = None + self.internal_load_balancer_enabled = kwargs.get('internal_load_balancer_enabled', None) + self.static_ip = kwargs.get('static_ip', None) + self.namespace = kwargs.get('namespace', None) + self.arc_configuration = kwargs.get('arc_configuration', None) + self.aks_resource_id = kwargs.get('aks_resource_id', None) + + +class KubeEnvironmentProfile(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 LocalizableString(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 LogAnalyticsConfiguration(Model): + """LogAnalyticsConfiguration. + + :param customer_id: + :type customer_id: str + :param shared_key: + :type shared_key: str + """ + + _attribute_map = { + 'customer_id': {'key': 'customerId', 'type': 'str'}, + 'shared_key': {'key': 'sharedKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsConfiguration, self).__init__(**kwargs) + self.customer_id = kwargs.get('customer_id', None) + self.shared_key = kwargs.get('shared_key', 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_06_01.models.LoginRoutes + :param token_store: + :type token_store: ~azure.mgmt.web.v2020_06_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_06_01.models.CookieExpiration + :param nonce: + :type nonce: ~azure.mgmt.web.v2020_06_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(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(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_06_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_06_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailability(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(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_06_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2020_06_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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2020_06_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + 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_06_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': 'OperationStatus'}, + '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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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_06_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(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2020_06_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': 'MSDeployLogEntryType'}, + '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_06_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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(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 NameValuePair(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 NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2020_06_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.description = kwargs.get('description', None) + self.order = kwargs.get('order', None) + self.remote_subnet = kwargs.get('remote_subnet', 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_06_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2020_06_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(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 + :param method: Possible values include: 'ClientSecretPost' + :type method: str or + ~azure.mgmt.web.v2020_06_01.models.ClientCredentialMethod + :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'}, + 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenIdConnectClientCredential, self).__init__(**kwargs) + self.method = kwargs.get('method', None) + 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_06_01.models.OpenIdConnectClientCredential + :param open_id_connect_configuration: + :type open_id_connect_configuration: + ~azure.mgmt.web.v2020_06_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(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_06_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2020_06_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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(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_06_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 PerfMonResponse(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_06_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(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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(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 + :param end_time: End time of the period. + :type end_time: 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_06_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: 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: true if promotion code is + required; otherwise, 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_06_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': 'AppServicePlanRestrictions'}, + '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 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_06_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(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(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_06_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 PrivateEndpointConnectionResource(ProxyOnlyResource): + """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_06_01.models.ArmIdWrapper + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_06_01.models.PrivateLinkConnectionState + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionResource, 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) + + +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: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_06_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(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(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_06_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.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.properties = kwargs.get('properties', None) + + +class PrivateLinkResourceProperties(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(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_06_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.get('value', None) + + +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_06_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_06_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 + :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 + :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 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 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 + :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 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_06_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': 'PublicCertificateLocation'}, + '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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + \\nMinReroutePercentage or + MaxReroutePercentage. Site metrics are checked every N + minutes specified in ChangeIntervalInMinutes.\\nCustom + decision algorithm + can be provided in TiPCallback site extension which URL can be specified + in 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 + :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_06_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_06_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_06_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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 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_06_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_06_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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 Rendering(Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.v2020_06_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': 'RenderingType'}, + '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(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 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 ResourceMetricAvailability(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_06_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 ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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_06_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(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_06_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.get('name', None) + self.type = kwargs.get('type', None) + self.is_fqdn = kwargs.get('is_fqdn', None) + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2020_06_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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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_06_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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_06_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + '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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2020_06_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: + list[~azure.mgmt.web.v2020_06_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: Resource tags. + :type tags: dict[str, str] + :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_06_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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_06_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_06_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_06_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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_06_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2020_06_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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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_06_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: true if the app is a default + container; otherwise, 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_06_01.models.SlotSwapStatus + :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_06_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 identity: + :type identity: ~azure.mgmt.web.v2020_06_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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_06_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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_06_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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested + as part of GitHub Login authentication. + This setting is optional + :type git_hub_oauth_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_oauth_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_oauth_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'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_oauth_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_oauth_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_oauth_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_oauth_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.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_oauth_scopes = kwargs.get('google_oauth_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_oauth_scopes = kwargs.get('facebook_oauth_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_oauth_scopes = kwargs.get('git_hub_oauth_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_oauth_scopes = kwargs.get('microsoft_account_oauth_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_06_01.models.AuthPlatform + :param global_validation: + :type global_validation: + ~azure.mgmt.web.v2020_06_01.models.GlobalValidation + :param identity_providers: + :type identity_providers: + ~azure.mgmt.web.v2020_06_01.models.IdentityProviders + :param login: + :type login: ~azure.mgmt.web.v2020_06_01.models.Login + :param http_settings: + :type http_settings: ~azure.mgmt.web.v2020_06_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(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_06_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2020_06_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_06_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2020_06_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + '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(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(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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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_06_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2020_06_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_06_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2020_06_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_06_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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_06_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2020_06_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2020_06_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_06_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_06_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_06_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_06_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_06_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2020_06_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2020_06_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2020_06_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_06_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. Default value: True . + :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_06_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_06_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_06_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 health_check_path: Health check path + :type health_check_path: str + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, + } + + 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.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.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.health_check_path = kwargs.get('health_check_path', 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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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_06_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2020_06_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_06_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2020_06_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_06_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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_06_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2020_06_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2020_06_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_06_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_06_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_06_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_06_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_06_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2020_06_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2020_06_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2020_06_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_06_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. Default value: True . + :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_06_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_06_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_06_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 health_check_path: Health check path + :type health_check_path: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, + } + + 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.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.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.health_check_path = kwargs.get('health_check_path', 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 + :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 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_06_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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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': 'SiteExtensionType'}, + '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 SiteLimits(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_06_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2020_06_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2020_06_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2020_06_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(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 + :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_06_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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_06_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_06_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_06_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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_06_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2020_06_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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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_06_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: true if the app is a default + container; otherwise, 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_06_01.models.SlotSwapStatus + :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_06_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 identity: + :type identity: ~azure.mgmt.web.v2020_06_01.models.ManagedServiceIdentity + """ + + _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'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(SitePatchResource, self).__init__(**kwargs) + 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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.identity = kwargs.get('identity', 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(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.get('html', None) + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param is_git_hub_action: true if this is deployed via GitHub + action. + :type is_git_hub_action: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + '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'}, + } + + 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) + + +class SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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_06_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_06_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(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_06_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2020_06_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 SkuInfos(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_06_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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.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 SnapshotRecoverySource(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. + + 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 + :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_06_01.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': 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(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_06_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2020_06_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': 'SolutionType'}, + '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 + """ + + _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 StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2020_06_01.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool + :param is_preview: true if this stack is in Preview, + otherwise false. + :type is_preview: bool + :param is_deprecated: true if this stack has been deprecated, + otherwise false. + :type is_deprecated: bool + :param is_hidden: true if this stack should be hidden for new + customers on portal, otherwise 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'}, + '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.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(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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(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_06_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' + :type worker_size: str or + ~azure.mgmt.web.v2020_06_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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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 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: Resource tags. + :type tags: dict[str, 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 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_06_01.models.StaticSiteBuildProperties + :param sku: + :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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}'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(StaticSiteARMResource, self).__init__(**kwargs) + self.default_hostname = None + self.repository_url = kwargs.get('repository_url', None) + self.branch = kwargs.get('branch', None) + self.custom_domains = None + self.repository_token = kwargs.get('repository_token', None) + self.build_properties = kwargs.get('build_properties', None) + self.sku = kwargs.get('sku', 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 + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: 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_06_01.models.BuildStatus + """ + + _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}, + } + + _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'}, + } + + 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 + + +class StaticSiteBuildProperties(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: The path of the app artifacts after + building. + :type app_artifact_location: str + """ + + _attribute_map = { + 'app_location': {'key': 'appLocation', 'type': 'str'}, + 'api_location': {'key': 'apiLocation', 'type': 'str'}, + 'app_artifact_location': {'key': 'appArtifactLocation', '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) + + +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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_name': {'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'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StaticSiteCustomDomainOverviewARMResource, self).__init__(**kwargs) + self.domain_name = None + self.created_on = None + + +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_06_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 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 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_06_01.models.StaticSiteBuildProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + 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.custom_domains = None + self.repository_token = kwargs.get('repository_token', None) + self.build_properties = kwargs.get('build_properties', 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_06_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 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 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 + :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 StatusCodesBasedTrigger(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 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'}, + '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.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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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 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(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.get('agreement_key', None) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) + self.url = kwargs.get('url', 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_06_01.models.FileSystemTokenStore + :param azure_blob_storage: + :type azure_blob_storage: + ~azure.mgmt.web.v2020_06_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 true, then the top level domain supports + domain privacy; otherwise, 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(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + 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 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_06_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 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_06_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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': 'TriggeredWebJobStatus'}, + '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_06_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_06_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': 'WebJobType'}, + '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 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_06_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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2020_06_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': 'ComputeModeOptions'}, + '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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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(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' + :type type: str or + ~azure.mgmt.web.v2020_06_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: 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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ValidateRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + 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) + + +class ValidateResponse(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_06_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(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(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2020_06_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(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(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(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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.get('id', None) + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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_06_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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 + """ + + _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'}, + } + + 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) + + +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_06_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 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_06_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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, **kwargs): + super(VnetValidationFailureDetails, self).__init__(**kwargs) + self.failed = kwargs.get('failed', None) + self.failed_tests = kwargs.get('failed_tests', 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(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_06_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.get('value', None) + 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_06_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': 'WebJobType'}, + '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 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_06_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: + :type containers: dict[str, + ~azure.mgmt.web.v2020_06_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': 'SiteRuntimeState'}, + '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 WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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_06_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 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_06_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] + :param sku: + :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(WorkerPoolResource, self).__init__(**kwargs) + 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 + self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py new file mode 100644 index 00000000000..7ee96120d6b --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py @@ -0,0 +1,15212 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2020_06_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2020_06_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: + super(AbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.events = events + self.solutions = solutions + + +class Address(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: str=None, **kwargs) -> None: + 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(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: str=None, **kwargs) -> None: + 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_06_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: str=None, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: + 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: str=None, allowed_audiences=None, **kwargs) -> None: + super(AllowedAudiencesValidation, self).__init__(kind=kind, **kwargs) + self.allowed_audiences = allowed_audiences + + +class AnalysisData(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_06_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2020_06_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2020_06_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) + self.description = None + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class ApiManagementConfig(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: str=None, **kwargs) -> None: + super(ApiManagementConfig, self).__init__(**kwargs) + self.id = id + + +class ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2020_06_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2020_06_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_06_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: + 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(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_06_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2020_06_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]'}, + } + + def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: + super(ApplicationStack, self).__init__(**kwargs) + self.name = name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + + +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 application_stack_resource_name: Application stack name. + :type application_stack_resource_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_06_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2020_06_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'}, + 'application_stack_resource_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]'}, + } + + def __init__(self, *, kind: str=None, application_stack_resource_name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: + super(ApplicationStackResource, self).__init__(kind=kind, **kwargs) + self.application_stack_resource_name = application_stack_resource_name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + + +class AppLogsConfiguration(Model): + """AppLogsConfiguration. + + :param destination: + :type destination: str + :param log_analytics_configuration: + :type log_analytics_configuration: + ~azure.mgmt.web.v2020_06_01.models.LogAnalyticsConfiguration + """ + + _attribute_map = { + 'destination': {'key': 'destination', 'type': 'str'}, + 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, + } + + def __init__(self, *, destination: str=None, log_analytics_configuration=None, **kwargs) -> None: + super(AppLogsConfiguration, self).__init__(**kwargs) + self.destination = destination + self.log_analytics_configuration = log_analytics_configuration + + +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: str=None, app_id: str=None, app_secret_setting_name: str=None, **kwargs) -> None: + super(AppRegistration, self).__init__(kind=kind, **kwargs) + self.app_id = app_id + self.app_secret_setting_name = app_secret_setting_name + + +class AppServiceCertificate(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_06_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2020_06_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_06_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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_06_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_06_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2020_06_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_06_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_06_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, location: str, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2020_06_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_06_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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_06_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_06_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2020_06_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_06_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_06_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 + + +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_06_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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: 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_06_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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_06_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_06_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', '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'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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_06_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_06_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) + self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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: Resource tags. + :type tags: dict[str, str] + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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_06_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_06_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.app_service_environment_resource_name = app_service_environment_resource_name + self.app_service_environment_resource_location = app_service_environment_resource_location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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: Resource tags. + :type tags: dict[str, 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_06_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_06_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_06_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_06_01.models.KubeEnvironmentProfile + :param sku: + :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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 + self.sku = sku + + +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_06_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_06_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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_06_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_06_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': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + } + + def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, **kwargs) -> None: + 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 ArcConfiguration(Model): + """ArcConfiguration. + + :param artifacts_storage_type: Possible values include: 'LocalNode', + 'NetworkFileSystem' + :type artifacts_storage_type: str or + ~azure.mgmt.web.v2020_06_01.models.StorageType + :param artifact_storage_class_name: + :type artifact_storage_class_name: str + :param artifact_storage_mount_path: + :type artifact_storage_mount_path: str + :param artifact_storage_node_name: + :type artifact_storage_node_name: str + :param artifact_storage_access_mode: + :type artifact_storage_access_mode: str + :param front_end_service_configuration: + :type front_end_service_configuration: + ~azure.mgmt.web.v2020_06_01.models.FrontEndConfiguration + :param app_logs_configuration: + :type app_logs_configuration: + ~azure.mgmt.web.v2020_06_01.models.AppLogsConfiguration + :param kube_config: + :type kube_config: str + """ + + _attribute_map = { + 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, + 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, + 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, + 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, + 'artifact_storage_access_mode': {'key': 'artifactStorageAccessMode', 'type': 'str'}, + 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, + 'app_logs_configuration': {'key': 'appLogsConfiguration', 'type': 'AppLogsConfiguration'}, + 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, + } + + def __init__(self, *, artifacts_storage_type=None, artifact_storage_class_name: str=None, artifact_storage_mount_path: str=None, artifact_storage_node_name: str=None, artifact_storage_access_mode: str=None, front_end_service_configuration=None, app_logs_configuration=None, kube_config: str=None, **kwargs) -> None: + super(ArcConfiguration, self).__init__(**kwargs) + self.artifacts_storage_type = artifacts_storage_type + self.artifact_storage_class_name = artifact_storage_class_name + self.artifact_storage_mount_path = artifact_storage_mount_path + self.artifact_storage_node_name = artifact_storage_node_name + self.artifact_storage_access_mode = artifact_storage_access_mode + self.front_end_service_configuration = front_end_service_configuration + self.app_logs_configuration = app_logs_configuration + self.kube_config = kube_config + + +class ArmIdWrapper(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) -> None: + super(ArmIdWrapper, self).__init__(**kwargs) + self.id = 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, *, kind: str=None, enabled: bool=None, runtime_version: str=None, config_file_path: str=None, **kwargs) -> None: + super(AuthPlatform, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_version + self.config_file_path = config_file_path + + +class AutoHealActions(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_06_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2020_06_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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_06_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2020_06_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2020_06_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_06_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2020_06_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +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_06_01.models.AzureActiveDirectoryRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_06_01.models.AzureActiveDirectoryLogin + :param validation: + :type validation: + ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, login=None, validation=None, is_auto_provisioned: bool=None, **kwargs) -> None: + 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: str=None, disable_www_authenticate: bool=None, login_parameters=None, **kwargs) -> None: + 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: str=None, open_id_issuer: str=None, client_id: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, **kwargs) -> None: + 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_06_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: str=None, jwt_claim_checks=None, allowed_audiences=None, **kwargs) -> None: + super(AzureActiveDirectoryValidation, self).__init__(kind=kind, **kwargs) + self.jwt_claim_checks = jwt_claim_checks + self.allowed_audiences = allowed_audiences + + +class AzureBlobStorageApplicationLogsConfig(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_06_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + } + + def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: + super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + self.retention_in_days = retention_in_days + + +class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) + self.sas_url = sas_url + self.retention_in_days = retention_in_days + self.enabled = enabled + + +class AzureStorageInfoValue(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_06_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' + :vartype state: str or + ~azure.mgmt.web.v2020_06_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: + 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_06_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: str=None, properties=None, **kwargs) -> None: + super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class AzureTableStorageApplicationLogsConfig(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_06_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: + 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 backup_item_name: Name of this backup. + :vartype backup_item_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_06_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 + :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_06_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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: str=None, **kwargs) -> None: + super(BackupItem, self).__init__(kind=kind, **kwargs) + self.backup_id = None + self.storage_account_url = None + self.blob_name = None + self.backup_item_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 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. + + 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 + :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: Required. 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_06_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2020_06_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account_url': {'required': 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, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: + 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(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). Default value: 7 . + :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_06_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: + 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 + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: + 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 + + +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: str=None, sas_url_setting_name: str=None, **kwargs) -> None: + super(BlobStorageTokenStore, self).__init__(kind=kind, **kwargs) + self.sas_url_setting_name = sas_url_setting_name + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + 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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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_06_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_06_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + } + + def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: + 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 + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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) -> None: + 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 + """ + + _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: + 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_06_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: 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': 'CertificateOrderActionType'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) + self.action_type = None + self.created_at = None + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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_06_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_06_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 + """ + + _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}, + 'password': {'required': 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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + } + + def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: + 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 + + +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: str=None, client_id: str=None, client_secret_setting_name: str=None, **kwargs) -> None: + super(ClientRegistration, self).__init__(kind=kind, **kwargs) + self.client_id = client_id + self.client_secret_setting_name = client_secret_setting_name + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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_06_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: str=None, properties=None, **kwargs) -> None: + super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class ConnStringInfo(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_06_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class ConnStringValueTypePair(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_06_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, value: str, type, **kwargs) -> None: + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = value + self.type = type + + +class Contact(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_06_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: + 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(Model): + """ContainerCpuStatistics. + + :param cpu_usage: + :type cpu_usage: ~azure.mgmt.web.v2020_06_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_06_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=None, system_cpu_usage: int=None, online_cpu_count: int=None, throttling_data=None, **kwargs) -> None: + 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(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: int=None, per_cpu_usage=None, kernel_mode_usage: int=None, user_mode_usage: int=None, **kwargs) -> None: + 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(Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: datetime + :param previous_time_stamp: + :type previous_time_stamp: datetime + :param current_cpu_stats: + :type current_cpu_stats: + ~azure.mgmt.web.v2020_06_01.models.ContainerCpuStatistics + :param previous_cpu_stats: + :type previous_cpu_stats: + ~azure.mgmt.web.v2020_06_01.models.ContainerCpuStatistics + :param memory_stats: + :type memory_stats: + ~azure.mgmt.web.v2020_06_01.models.ContainerMemoryStatistics + :param name: + :type name: str + :param id: + :type id: str + :param eth0: + :type eth0: + ~azure.mgmt.web.v2020_06_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=None, previous_time_stamp=None, current_cpu_stats=None, previous_cpu_stats=None, memory_stats=None, name: str=None, id: str=None, eth0=None, **kwargs) -> None: + 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(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: int=None, max_usage: int=None, limit: int=None, **kwargs) -> None: + super(ContainerMemoryStatistics, self).__init__(**kwargs) + self.usage = usage + self.max_usage = max_usage + self.limit = limit + + +class ContainerNetworkInterfaceStatistics(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: int=None, rx_packets: int=None, rx_errors: int=None, rx_dropped: int=None, tx_bytes: int=None, tx_packets: int=None, tx_errors: int=None, tx_dropped: int=None, **kwargs) -> None: + 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(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: int=None, throttled_periods: int=None, throttled_time: int=None, **kwargs) -> None: + 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_06_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_06_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': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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_06_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': 'CookieExpirationConvention'}, + 'time_to_expiration': {'key': 'properties.timeToExpiration', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, convention=None, time_to_expiration: str=None, **kwargs) -> None: + super(CookieExpiration, self).__init__(kind=kind, **kwargs) + self.convention = convention + self.time_to_expiration = time_to_expiration + + +class CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.support_credentials = support_credentials + + +class CsmCopySlotEntity(Model): + """Copy deployment slot parameters. + + All required parameters must be populated in order to send to Azure. + + :param target_slot: Required. Destination deployment slot during copy + operation. + :type target_slot: str + :param site_config: Required. The site object which will be merged with + the source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2020_06_01.models.SiteConfig + """ + + _validation = { + 'target_slot': {'required': True}, + 'site_config': {'required': True}, + } + + _attribute_map = { + 'target_slot': {'key': 'targetSlot', 'type': 'str'}, + 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, + } + + def __init__(self, *, target_slot: str, site_config, **kwargs) -> None: + super(CsmCopySlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.site_config = site_config + + +class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: + super(CsmMoveResourceEnvelope, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2020_06_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2020_06_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2020_06_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param ftp: Required. Whether FTP is allowed. + :type ftp: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Required. Whether Scm Basic Auth is allowed. + :type scm: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'ftp': {'required': True}, + 'scm': {'required': 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, *, ftp, scm, kind: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param allow: Required. true to allow access to a publishing + method; otherwise, false. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allow': {'required': 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, *, allow: bool, kind: str=None, **kwargs) -> None: + super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, **kwargs) + self.allow = allow + + +class CsmPublishingProfileOptions(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_06_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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = format + self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints + + +class CsmSlotEntity(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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) -> None: + super(CsmSlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.preserve_vnet = preserve_vnet + + +class CsmUsageQuota(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 + :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_06_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + 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 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: true if hostname is + already verified; otherwise, 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_06_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_06_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, + 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: + 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_cname_records = alternate_cname_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_06_01.models.OpenIdConnectRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: + super(CustomOpenIdConnectProvider, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class DatabaseBackupSetting(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_06_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: + 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 DataSource(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_06_01.models.NameValuePair] + """ + + _attribute_map = { + 'instructions': {'key': 'instructions', 'type': '[str]'}, + 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, + } + + def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: + super(DataSource, self).__init__(**kwargs) + self.instructions = instructions + self.data_source_uri = data_source_uri + + +class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: + super(DataTableResponseColumn, self).__init__(**kwargs) + self.column_name = column_name + self.data_type = data_type + self.column_type = column_type + + +class DataTableResponseObject(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_06_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: str=None, columns=None, rows=None, **kwargs) -> None: + super(DataTableResponseObject, self).__init__(**kwargs) + self.table_name = table_name + self.columns = columns + self.rows = rows + + +class DefaultErrorResponse(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_06_01.models.DefaultErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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_06_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=None, **kwargs) -> None: + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(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) -> None: + 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: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: + 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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, + 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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.deleted_site_kind = None + self.geo_region_name = 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 + :param end_time: End time. + :type end_time: 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: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: + 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 DeploymentLocations(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_06_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2020_06_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_06_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: + super(DeploymentLocations, self).__init__(**kwargs) + self.locations = locations + self.hosting_environments = hosting_environments + self.hosting_environment_deployment_infos = hosting_environment_deployment_infos + + +class DetectorAbnormalTimePeriod(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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_06_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_06_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2020_06_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': 'IssueType'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(DetectorDefinition, self).__init__(kind=kind, **kwargs) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None + + +class DetectorInfo(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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_06_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2020_06_01.models.DiagnosticData] + """ + + _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]'}, + } + + def __init__(self, *, kind: str=None, metadata=None, dataset=None, **kwargs) -> None: + super(DetectorResponse, self).__init__(kind=kind, **kwargs) + self.metadata = metadata + self.dataset = dataset + + +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 + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_06_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2020_06_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_06_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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) + self.description = None + + +class DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2020_06_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2020_06_01.models.Rendering + """ + + _attribute_map = { + 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, + 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, + } + + def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: + super(DiagnosticData, self).__init__(**kwargs) + self.table = table + self.rendering_properties = rendering_properties + + +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 + :param end_time: End time of the period + :type end_time: 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_06_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2020_06_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_06_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2020_06_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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: + 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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: + 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(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 + :param end_time: End time of the period + :type end_time: 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_06_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_06_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_06_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_06_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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_06_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_06_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2020_06_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_06_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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_06_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: + super(DomainAvailabilityCheckResult, self).__init__(**kwargs) + self.name = name + self.available = available + self.domain_type = domain_type + + +class DomainControlCenterSsoRequest(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) -> None: + 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: str=None, ownership_id: str=None, **kwargs) -> None: + super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) + self.ownership_id = ownership_id + + +class DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_06_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_06_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_06_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_06_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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_06_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_06_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2020_06_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_06_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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(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 + 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 + """ + + _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: + super(DomainPurchaseConsent, self).__init__(**kwargs) + self.agreement_keys = agreement_keys + self.agreed_by = agreed_by + self.agreed_at = agreed_at + + +class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: + super(DomainRecommendationSearchParameters, self).__init__(**kwargs) + self.keywords = keywords + self.max_domain_recommendations = max_domain_recommendations + + +class EnabledConfig(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: bool=None, **kwargs) -> None: + super(EnabledConfig, self).__init__(**kwargs) + self.enabled = enabled + + +class EndpointDependency(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_06_01.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(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: str=None, port: int=None, latency: float=None, is_accessible: bool=None, **kwargs) -> None: + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.latency = latency + self.is_accessible = is_accessible + + +class ErrorEntity(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_06_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: + 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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2020_06_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class ExtendedLocation(Model): + """ExtendedLocation. + + :param custom_location: + :type custom_location: str + """ + + _attribute_map = { + 'custom_location': {'key': 'customLocation', 'type': 'str'}, + } + + def __init__(self, *, custom_location: str=None, **kwargs) -> None: + super(ExtendedLocation, self).__init__(**kwargs) + self.custom_location = custom_location + + +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_06_01.models.AppRegistration + :param graph_api_version: + :type graph_api_version: str + :param login: + :type login: ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, graph_api_version: str=None, login=None, **kwargs) -> None: + 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(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2020_06_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, *, level="Off", **kwargs) -> None: + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + + +class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + 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: str=None, directory: str=None, **kwargs) -> None: + 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_06_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': 'ForwardProxyConvention'}, + 'custom_host_header_name': {'key': 'properties.customHostHeaderName', 'type': 'str'}, + 'custom_proto_header_name': {'key': 'properties.customProtoHeaderName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, convention=None, custom_host_header_name: str=None, custom_proto_header_name: str=None, **kwargs) -> None: + 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 FrontEndConfiguration(Model): + """FrontEndConfiguration. + + :param kind: Possible values include: 'NodePort', 'LoadBalancer' + :type kind: str or ~azure.mgmt.web.v2020_06_01.models.FrontEndServiceType + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(FrontEndConfiguration, self).__init__(**kwargs) + self.kind = kind + + +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: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: + 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 FunctionSecrets(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: str=None, trigger_url: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(GeoRegion, self).__init__(kind=kind, **kwargs) + self.description = None + self.display_name = None + self.org_domain = 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_06_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: + super(GitHub, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class GlobalCsmSkuDescription(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_06_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_06_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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_06_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': 'UnauthenticatedClientActionV2'}, + 'redirect_to_provider': {'key': 'properties.redirectToProvider', 'type': 'str'}, + 'excluded_paths': {'key': 'properties.excludedPaths', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, require_authentication: bool=None, unauthenticated_client_action=None, redirect_to_provider: str=None, excluded_paths=None, **kwargs) -> None: + 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_06_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_06_01.models.LoginScopes + :param validation: + :type validation: + ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, login=None, validation=None, **kwargs) -> None: + super(Google, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + self.validation = validation + + +class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: + super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) + self.name = name + self.location = location + + +class HostingEnvironmentDiagnostics(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: str=None, diagnostics_output: str=None, **kwargs) -> None: + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = name + self.diagnostics_output = diagnostics_output + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: + super(HostKeys, self).__init__(**kwargs) + self.master_key = master_key + self.function_keys = function_keys + self.system_keys = system_keys + + +class HostName(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_06_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_06_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_06_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: + 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_06_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_06_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2020_06_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2020_06_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: + 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 HostNameSslState(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_06_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 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_06_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2020_06_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_06_01.models.AzureBlobStorageHttpLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, + } + + def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: + 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_06_01.models.HttpSettingsRoutes + :param forward_proxy: + :type forward_proxy: ~azure.mgmt.web.v2020_06_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: str=None, require_https: bool=None, routes=None, forward_proxy=None, **kwargs) -> None: + 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: str=None, api_prefix: str=None, **kwargs) -> None: + 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, value: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.value = value + + +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_06_01.models.AzureActiveDirectory + :param facebook: + :type facebook: ~azure.mgmt.web.v2020_06_01.models.Facebook + :param git_hub: + :type git_hub: ~azure.mgmt.web.v2020_06_01.models.GitHub + :param google: + :type google: ~azure.mgmt.web.v2020_06_01.models.Google + :param twitter: + :type twitter: ~azure.mgmt.web.v2020_06_01.models.Twitter + :param custom_open_id_connect_providers: + :type custom_open_id_connect_providers: dict[str, + ~azure.mgmt.web.v2020_06_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'}, + 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, + 'custom_open_id_connect_providers': {'key': 'properties.customOpenIdConnectProviders', 'type': '{CustomOpenIdConnectProvider}'}, + } + + def __init__(self, *, kind: str=None, azure_active_directory=None, facebook=None, git_hub=None, google=None, twitter=None, custom_open_id_connect_providers=None, **kwargs) -> None: + 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.twitter = twitter + self.custom_open_id_connect_providers = custom_open_id_connect_providers + + +class InboundEnvironmentEndpoint(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: str=None, endpoints=None, ports=None, **kwargs) -> None: + super(InboundEnvironmentEndpoint, self).__init__(**kwargs) + self.description = description + self.endpoints = endpoints + self.ports = ports + + +class IpSecurityRestriction(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_06_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: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, headers=None, **kwargs) -> None: + 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: str=None, allowed_groups=None, allowed_client_applications=None, **kwargs) -> None: + super(JwtClaimChecks, self).__init__(kind=kind, **kwargs) + self.allowed_groups = allowed_groups + self.allowed_client_applications = allowed_client_applications + + +class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: + super(KeyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class KubeEnvironment(Resource): + """A Kubernetes cluster specialized for web workloads by Azure App Service. + + 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: Resource tags. + :type tags: dict[str, str] + :param extended_location: + :type extended_location: + ~azure.mgmt.web.v2020_06_01.models.ExtendedLocation + :ivar provisioning_state: Provisioning state of the Kubernetes + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Waiting', 'InitializationInProgress', 'InfrastructureSetupInProgress', + 'InfrastructureSetupComplete', 'ScheduledForDelete', 'UpgradeRequested', + 'UpgradeFailed' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_06_01.models.KubeEnvironmentProvisioningState + :ivar deployment_errors: Any errors that occurred during deployment or + deployment validation + :vartype deployment_errors: str + :param internal_load_balancer_enabled: Only visible within Vnet/Subnet + :type internal_load_balancer_enabled: bool + :param static_ip: Static IP of the KubeEnvironment + :type static_ip: str + :param namespace: + :type namespace: str + :param arc_configuration: Cluster configuration which determines the ARC + cluster + components types. Eg: Choosing between BuildService kind, + FrontEnd Service ArtifactsStorageType etc. + :type arc_configuration: + ~azure.mgmt.web.v2020_06_01.models.ArcConfiguration + :param aks_resource_id: + :type aks_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'deployment_errors': {'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}'}, + 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KubeEnvironmentProvisioningState'}, + 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, + 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, + 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, + 'namespace': {'key': 'properties.namespace', 'type': 'str'}, + 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, + 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, extended_location=None, internal_load_balancer_enabled: bool=None, static_ip: str=None, namespace: str=None, arc_configuration=None, aks_resource_id: str=None, **kwargs) -> None: + super(KubeEnvironment, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.provisioning_state = None + self.deployment_errors = None + self.internal_load_balancer_enabled = internal_load_balancer_enabled + self.static_ip = static_ip + self.namespace = namespace + self.arc_configuration = arc_configuration + self.aks_resource_id = aks_resource_id + + +class KubeEnvironmentProfile(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: str=None, **kwargs) -> None: + super(KubeEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class LogAnalyticsConfiguration(Model): + """LogAnalyticsConfiguration. + + :param customer_id: + :type customer_id: str + :param shared_key: + :type shared_key: str + """ + + _attribute_map = { + 'customer_id': {'key': 'customerId', 'type': 'str'}, + 'shared_key': {'key': 'sharedKey', 'type': 'str'}, + } + + def __init__(self, *, customer_id: str=None, shared_key: str=None, **kwargs) -> None: + super(LogAnalyticsConfiguration, self).__init__(**kwargs) + self.customer_id = customer_id + self.shared_key = shared_key + + +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_06_01.models.LoginRoutes + :param token_store: + :type token_store: ~azure.mgmt.web.v2020_06_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_06_01.models.CookieExpiration + :param nonce: + :type nonce: ~azure.mgmt.web.v2020_06_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: str=None, routes=None, token_store=None, preserve_url_fragments_for_logins: bool=None, allowed_external_redirect_urls=None, cookie_expiration=None, nonce=None, **kwargs) -> None: + 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: str=None, logout_endpoint: str=None, **kwargs) -> None: + 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: str=None, scopes=None, **kwargs) -> None: + super(LoginScopes, self).__init__(kind=kind, **kwargs) + self.scopes = scopes + + +class LogSpecification(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: str=None, display_name: str=None, blob_duration: str=None, log_filter_pattern: str=None, **kwargs) -> None: + 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(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_06_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_06_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = user_assigned_identities + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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) -> None: + super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricSpecification(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_06_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2020_06_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: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2020_06_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: + 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_06_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': 'OperationStatus'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: + 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_06_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: str=None, **kwargs) -> None: + super(MSDeployLog, self).__init__(kind=kind, **kwargs) + self.entries = None + + +class MSDeployLogEntry(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2020_06_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': 'MSDeployLogEntryType'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + 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_06_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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: str=None, **kwargs) -> None: + 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(Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2020_06_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = action + self.description = description + self.order = order + self.remote_subnet = remote_subnet + + +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_06_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2020_06_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: str=None, **kwargs) -> None: + 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(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: str=None, status: str=None, message: str=None, **kwargs) -> None: + 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: str=None, validate_nonce: bool=None, nonce_expiration_interval: str=None, **kwargs) -> None: + 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 + :param method: Possible values include: 'ClientSecretPost' + :type method: str or + ~azure.mgmt.web.v2020_06_01.models.ClientCredentialMethod + :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'}, + 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, method=None, client_secret_setting_name: str=None, **kwargs) -> None: + super(OpenIdConnectClientCredential, self).__init__(kind=kind, **kwargs) + self.method = method + 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: str=None, authorization_endpoint: str=None, token_endpoint: str=None, issuer: str=None, certification_uri: str=None, well_known_open_id_configuration: str=None, **kwargs) -> None: + 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: str=None, name_claim_type: str=None, scopes=None, **kwargs) -> None: + 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_06_01.models.OpenIdConnectClientCredential + :param open_id_connect_configuration: + :type open_id_connect_configuration: + ~azure.mgmt.web.v2020_06_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: str=None, client_id: str=None, client_credential=None, open_id_connect_configuration=None, **kwargs) -> None: + 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(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_06_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2020_06_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: + 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(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_06_01.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class PerfMonResponse(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_06_01.models.PerfMonSet + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'PerfMonSet'}, + } + + def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: + super(PerfMonResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.data = data + + +class PerfMonSample(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: + super(PerfMonSample, self).__init__(**kwargs) + self.time = time + self.instance_name = instance_name + self.value = value + + +class PerfMonSet(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 + :param end_time: End time of the period. + :type end_time: 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_06_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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: 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: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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: true if promotion code is + required; otherwise, 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_06_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': 'AppServicePlanRestrictions'}, + '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: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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 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: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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_06_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: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: + super(PrivateAccess, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.virtual_networks = virtual_networks + + +class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = name + self.key = key + + +class PrivateAccessVirtualNetwork(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_06_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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = name + self.key = key + self.resource_id = resource_id + self.subnets = subnets + + +class PrivateEndpointConnectionResource(ProxyOnlyResource): + """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_06_01.models.ArmIdWrapper + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_06_01.models.PrivateLinkConnectionState + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnectionResource, 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 + + +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: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_06_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: str=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, **kwargs) + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkConnectionState(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: str=None, description: str=None, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkResource(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_06_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, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.properties = properties + + +class PrivateLinkResourceProperties(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) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkResourcesWrapper(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_06_01.models.PrivateLinkResource] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + 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_06_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_06_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 + :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 + :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: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: + 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 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: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: + 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 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 + :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: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: + 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 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_06_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': 'PublicCertificateLocation'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: + super(PublicCertificate, self).__init__(kind=kind, **kwargs) + self.blob = blob + self.public_certificate_location = public_certificate_location + self.thumbprint = None + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + \\nMinReroutePercentage or + MaxReroutePercentage. Site metrics are checked every N + minutes specified in ChangeIntervalInMinutes.\\nCustom + decision algorithm + can be provided in TiPCallback site extension which URL can be specified + in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 + :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_06_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_06_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_06_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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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 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_06_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_06_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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: + 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 Rendering(Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.v2020_06_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': 'RenderingType'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: + 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: + super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) + self.category = category + self.signal_availability = signal_availability + + +class ResourceMetricAvailability(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) -> None: + 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_06_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: str=None, **kwargs) -> None: + 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 ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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_06_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: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(ResourceNameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class ResourceNameAvailabilityRequest(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_06_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, is_fqdn: bool=None, **kwargs) -> None: + super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.is_fqdn = is_fqdn + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2020_06_01.models.DataSource + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, + } + + def __init__(self, *, data_source=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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_06_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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_06_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + } + + def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: + 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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2020_06_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: + list[~azure.mgmt.web.v2020_06_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :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_06_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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_06_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_06_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_06_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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_06_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2020_06_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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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_06_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: true if the app is a default + container; otherwise, 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_06_01.models.SlotSwapStatus + :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_06_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 identity: + :type identity: ~azure.mgmt.web.v2020_06_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.identity = identity + + +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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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_06_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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_06_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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested + as part of GitHub Login authentication. + This setting is optional + :type git_hub_oauth_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_oauth_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_oauth_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'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_oauth_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_oauth_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_oauth_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_oauth_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: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, aad_claims_authorization: str=None, google_client_id: str=None, google_client_secret: str=None, google_client_secret_setting_name: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_app_secret_setting_name: str=None, facebook_oauth_scopes=None, git_hub_client_id: str=None, git_hub_client_secret: str=None, git_hub_client_secret_setting_name: str=None, git_hub_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, twitter_consumer_secret_setting_name: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_client_secret_setting_name: str=None, microsoft_account_oauth_scopes=None, is_auth_from_file: str=None, auth_file_path: str=None, **kwargs) -> None: + super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_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_oauth_scopes = google_oauth_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_oauth_scopes = facebook_oauth_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_oauth_scopes = git_hub_oauth_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_oauth_scopes = microsoft_account_oauth_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_06_01.models.AuthPlatform + :param global_validation: + :type global_validation: + ~azure.mgmt.web.v2020_06_01.models.GlobalValidation + :param identity_providers: + :type identity_providers: + ~azure.mgmt.web.v2020_06_01.models.IdentityProviders + :param login: + :type login: ~azure.mgmt.web.v2020_06_01.models.Login + :param http_settings: + :type http_settings: ~azure.mgmt.web.v2020_06_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: str=None, platform=None, global_validation=None, identity_providers=None, login=None, http_settings=None, **kwargs) -> None: + 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(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_06_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2020_06_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_06_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2020_06_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, + } + + def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: + 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(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: str=None, description: str=None, **kwargs) -> None: + super(SiteCloneabilityCriterion, self).__init__(**kwargs) + self.name = name + self.description = description + + +class SiteConfig(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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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_06_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2020_06_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_06_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2020_06_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_06_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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_06_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2020_06_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2020_06_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_06_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_06_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_06_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_06_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_06_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2020_06_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2020_06_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2020_06_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_06_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. Default value: True . + :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_06_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_06_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_06_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 health_check_path: Health check path + :type health_check_path: str + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: + 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.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.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.health_check_path = health_check_path + + +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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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_06_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2020_06_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_06_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2020_06_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_06_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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_06_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2020_06_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2020_06_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_06_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_06_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_06_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_06_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_06_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2020_06_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2020_06_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2020_06_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_06_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. Default value: True . + :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_06_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_06_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_06_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 health_check_path: Health check path + :type health_check_path: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: + 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.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.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.health_check_path = health_check_path + + +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 + :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: str=None, **kwargs) -> None: + super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) + self.time = None + self.snapshot_id = 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_06_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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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': 'SiteExtensionType'}, + '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: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: + 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 SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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_06_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2020_06_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2020_06_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2020_06_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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: + 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + 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 + :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_06_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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_06_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_06_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_06_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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_06_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2020_06_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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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_06_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: true if the app is a default + container; otherwise, 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_06_01.models.SlotSwapStatus + :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_06_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 identity: + :type identity: ~azure.mgmt.web.v2020_06_01.models.ManagedServiceIdentity + """ + + _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'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: + super(SitePatchResource, self).__init__(kind=kind, **kwargs) + 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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.identity = identity + + +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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: + 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(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) -> None: + super(SiteSeal, self).__init__(**kwargs) + self.html = html + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: + 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param is_git_hub_action: true if this is deployed via GitHub + action. + :type is_git_hub_action: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + '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'}, + } + + def __init__(self, *, kind: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, is_git_hub_action: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: + 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 + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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_06_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_06_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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(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_06_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2020_06_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: str=None, sku=None, capacity=None, **kwargs) -> None: + super(SkuInfo, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity + + +class SkuInfos(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_06_01.models.GlobalCsmSkuDescription] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, + } + + def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: + 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: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + 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: str=None, **kwargs) -> None: + super(Snapshot, self).__init__(kind=kind, **kwargs) + self.time = None + + +class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: + 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. + + 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 + :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_06_01.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': 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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: + 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(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_06_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2020_06_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': 'SolutionType'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: + 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 + """ + + _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: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: + 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 StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2020_06_01.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool + :param is_preview: true if this stack is in Preview, + otherwise false. + :type is_preview: bool + :param is_deprecated: true if this stack has been deprecated, + otherwise false. + :type is_deprecated: bool + :param is_hidden: true if this stack should be hidden for new + customers on portal, otherwise 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'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + } + + def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, is_preview: bool=None, is_deprecated: bool=None, is_hidden: bool=None, **kwargs) -> None: + 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.is_preview = is_preview + self.is_deprecated = is_deprecated + self.is_hidden = is_hidden + + +class StackMinorVersion(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: + 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(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_06_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' + :type worker_size: str or + ~azure.mgmt.web.v2020_06_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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: + 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 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: Resource tags. + :type tags: dict[str, 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 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_06_01.models.StaticSiteBuildProperties + :param sku: + :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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}'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, sku=None, **kwargs) -> None: + super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.default_hostname = None + self.repository_url = repository_url + self.branch = branch + self.custom_domains = None + self.repository_token = repository_token + self.build_properties = build_properties + self.sku = sku + + +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 + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: 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_06_01.models.BuildStatus + """ + + _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}, + } + + _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'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 + + +class StaticSiteBuildProperties(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: The path of the app artifacts after + building. + :type app_artifact_location: str + """ + + _attribute_map = { + 'app_location': {'key': 'appLocation', 'type': 'str'}, + 'api_location': {'key': 'apiLocation', 'type': 'str'}, + 'app_artifact_location': {'key': 'appArtifactLocation', 'type': 'str'}, + } + + def __init__(self, *, app_location: str=None, api_location: str=None, app_artifact_location: str=None, **kwargs) -> None: + super(StaticSiteBuildProperties, self).__init__(**kwargs) + self.app_location = app_location + self.api_location = api_location + self.app_artifact_location = app_artifact_location + + +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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_name': {'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'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(StaticSiteCustomDomainOverviewARMResource, self).__init__(kind=kind, **kwargs) + self.domain_name = None + self.created_on = None + + +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_06_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: str=None, **kwargs) -> None: + super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, **kwargs) + self.function_name = None + self.trigger_type = 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 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_06_01.models.StaticSiteBuildProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + def __init__(self, *, kind: str=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, **kwargs) -> None: + super(StaticSitePatchResource, self).__init__(kind=kind, **kwargs) + self.default_hostname = None + self.repository_url = repository_url + self.branch = branch + self.custom_domains = None + self.repository_token = repository_token + self.build_properties = build_properties + + +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: str=None, repository_token: str=None, should_update_repository: bool=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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_06_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: str=None, repository_url: str=None, branch: str=None, build_properties=None, **kwargs) -> None: + super(StaticSitesWorkflowPreviewRequest, self).__init__(kind=kind, **kwargs) + self.repository_url = repository_url + self.branch = branch + self.build_properties = build_properties + + +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: str=None, roles: str=None, **kwargs) -> None: + super(StaticSiteUserARMResource, self).__init__(kind=kind, **kwargs) + self.provider = None + self.user_id = None + self.display_name = None + self.roles = roles + + +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: str=None, domain: str=None, provider: str=None, user_details: str=None, roles: str=None, num_hours_to_expiration: int=None, **kwargs) -> None: + 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 + :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: str=None, **kwargs) -> None: + super(StaticSiteUserInvitationResponseResource, self).__init__(kind=kind, **kwargs) + self.expires_on = None + self.invitation_url = None + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, properties=None, **kwargs) -> None: + super(StringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +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: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: + super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) + self.subnet_resource_id = subnet_resource_id + self.swift_supported = swift_supported + + +class TldLegalAgreement(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: str=None, **kwargs) -> None: + super(TldLegalAgreement, self).__init__(**kwargs) + self.agreement_key = agreement_key + self.title = title + self.content = content + self.url = url + + +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_06_01.models.FileSystemTokenStore + :param azure_blob_storage: + :type azure_blob_storage: + ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, token_refresh_extension_hours: float=None, file_system=None, azure_blob_storage=None, **kwargs) -> None: + 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 true, then the top level domain supports + domain privacy; otherwise, 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: str=None, privacy: bool=None, **kwargs) -> None: + super(TopLevelDomain, self).__init__(kind=kind, **kwargs) + self.privacy = privacy + + +class TopLevelDomainAgreementOption(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + """ + + _attribute_map = { + 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, + 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, + } + + def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: + super(TopLevelDomainAgreementOption, self).__init__(**kwargs) + self.include_privacy = include_privacy + self.for_transfer = for_transfer + + +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_06_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: str=None, runs=None, **kwargs) -> None: + super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) + self.runs = runs + + +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_06_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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': 'TriggeredWebJobStatus'}, + '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: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: + 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_06_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_06_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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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_06_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: str=None, enabled: bool=None, registration=None, **kwargs) -> None: + 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: str=None, consumer_key: str=None, consumer_secret_setting_name: str=None, **kwargs) -> None: + 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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2020_06_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': 'ComputeModeOptions'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: + 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(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' + :type type: str or + ~azure.mgmt.web.v2020_06_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: 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 + """ + + _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'}, + } + + def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, container_registry_base_url: str=None, container_registry_username: str=None, container_registry_password: str=None, container_image_repository: str=None, container_image_tag: str=None, container_image_platform: str=None, **kwargs) -> None: + 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 + + +class ValidateResponse(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_06_01.models.ValidateResponseError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ValidateResponseError'}, + } + + def __init__(self, *, status: str=None, error=None, **kwargs) -> None: + super(ValidateResponse, self).__init__(**kwargs) + self.status = status + self.error = error + + +class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: + super(ValidateResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2020_06_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +class VirtualIPMapping(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: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, service_name: str=None, **kwargs) -> None: + 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(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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=None, subnet: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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_06_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: + 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 + """ + + _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'}, + } + + def __init__(self, *, kind: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: + 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 + + +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_06_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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + 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 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_06_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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, *, kind: str=None, failed: bool=None, failed_tests=None, **kwargs) -> None: + super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) + self.failed = failed + self.failed_tests = failed_tests + + +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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: + super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) + self.test_name = test_name + self.details = details + + +class WebAppCollection(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_06_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, **kwargs) -> None: + super(WebAppCollection, 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_06_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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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_06_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: + :type containers: dict[str, + ~azure.mgmt.web.v2020_06_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': 'SiteRuntimeState'}, + '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: str=None, state=None, status_url: str=None, detector_url: str=None, console_url: str=None, health_check_url: str=None, containers=None, **kwargs) -> None: + 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 WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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_06_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 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_06_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] + :param sku: + :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: + super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) + 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 + self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py new file mode 100644 index 00000000000..18cfd9b17b3 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py @@ -0,0 +1,794 @@ +# 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 msrest.paging import Paged + + +class AppServiceCertificateOrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) +class AppServiceCertificateResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) +class CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) +class DomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`Domain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Domain]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainPaged, self).__init__(*args, **kwargs) +class NameIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`NameIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(NameIdentifierPaged, self).__init__(*args, **kwargs) +class DomainOwnershipIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) +class TopLevelDomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`TopLevelDomain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} + } + + def __init__(self, *args, **kwargs): + + super(TopLevelDomainPaged, self).__init__(*args, **kwargs) +class TldLegalAgreementPaged(Paged): + """ + A paging container for iterating over a list of :class:`TldLegalAgreement ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} + } + + def __init__(self, *args, **kwargs): + + super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) +class CertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`Certificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Certificate]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificatePaged, self).__init__(*args, **kwargs) +class DeletedSitePaged(Paged): + """ + A paging container for iterating over a list of :class:`DeletedSite ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeletedSite]'} + } + + def __init__(self, *args, **kwargs): + + super(DeletedSitePaged, self).__init__(*args, **kwargs) +class DetectorResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorResponsePaged, self).__init__(*args, **kwargs) +class DiagnosticCategoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiagnosticCategory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} + } + + def __init__(self, *args, **kwargs): + + super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) +class AnalysisDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AnalysisDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) +class DetectorDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) +class KubeEnvironmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`KubeEnvironment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[KubeEnvironment]'} + } + + def __init__(self, *args, **kwargs): + + super(KubeEnvironmentPaged, self).__init__(*args, **kwargs) +class ApplicationStackResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationStackResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationStackResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationStackResourcePaged, self).__init__(*args, **kwargs) +class RecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Recommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Recommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendationPaged, self).__init__(*args, **kwargs) +class SourceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlPaged, self).__init__(*args, **kwargs) +class BillingMeterPaged(Paged): + """ + A paging container for iterating over a list of :class:`BillingMeter ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BillingMeter]'} + } + + def __init__(self, *args, **kwargs): + + super(BillingMeterPaged, self).__init__(*args, **kwargs) +class GeoRegionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoRegion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoRegion]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoRegionPaged, self).__init__(*args, **kwargs) +class IdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`Identifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Identifier]'} + } + + def __init__(self, *args, **kwargs): + + super(IdentifierPaged, self).__init__(*args, **kwargs) +class PremierAddOnOfferPaged(Paged): + """ + A paging container for iterating over a list of :class:`PremierAddOnOffer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} + } + + def __init__(self, *args, **kwargs): + + super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) +class SitePaged(Paged): + """ + A paging container for iterating over a list of :class:`Site ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Site]'} + } + + def __init__(self, *args, **kwargs): + + super(SitePaged, self).__init__(*args, **kwargs) +class BackupItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupItem]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupItemPaged, self).__init__(*args, **kwargs) +class SiteConfigResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) +class SiteConfigurationSnapshotInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) +class ContinuousWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContinuousWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) +class DeploymentPaged(Paged): + """ + A paging container for iterating over a list of :class:`Deployment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Deployment]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentPaged, self).__init__(*args, **kwargs) +class FunctionEnvelopePaged(Paged): + """ + A paging container for iterating over a list of :class:`FunctionEnvelope ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} + } + + def __init__(self, *args, **kwargs): + + super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) +class HostNameBindingPaged(Paged): + """ + A paging container for iterating over a list of :class:`HostNameBinding ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} + } + + def __init__(self, *args, **kwargs): + + super(HostNameBindingPaged, self).__init__(*args, **kwargs) +class WebSiteInstanceStatusPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebSiteInstanceStatus ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebSiteInstanceStatus]'} + } + + def __init__(self, *args, **kwargs): + + super(WebSiteInstanceStatusPaged, self).__init__(*args, **kwargs) +class ProcessInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessInfoPaged, self).__init__(*args, **kwargs) +class ProcessModuleInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessModuleInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) +class ProcessThreadInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessThreadInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) +class PerfMonResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`PerfMonResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(PerfMonResponsePaged, self).__init__(*args, **kwargs) +class PublicCertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`PublicCertificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} + } + + def __init__(self, *args, **kwargs): + + super(PublicCertificatePaged, self).__init__(*args, **kwargs) +class SiteExtensionInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteExtensionInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) +class SlotDifferencePaged(Paged): + """ + A paging container for iterating over a list of :class:`SlotDifference ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SlotDifference]'} + } + + def __init__(self, *args, **kwargs): + + super(SlotDifferencePaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) +class TriggeredWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) +class TriggeredJobHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredJobHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) +class CsmUsageQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmUsageQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) +class WebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(WebJobPaged, self).__init__(*args, **kwargs) +class StaticSiteARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteUserARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteUserARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteUserARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteUserARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteBuildARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteBuildARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteBuildARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteFunctionOverviewARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteFunctionOverviewARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteFunctionOverviewARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteCustomDomainOverviewARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteCustomDomainOverviewARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteCustomDomainOverviewARMResourcePaged, self).__init__(*args, **kwargs) +class AppServiceEnvironmentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) +class StampCapacityPaged(Paged): + """ + A paging container for iterating over a list of :class:`StampCapacity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StampCapacity]'} + } + + def __init__(self, *args, **kwargs): + + super(StampCapacityPaged, self).__init__(*args, **kwargs) +class InboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class WorkerPoolResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkerPoolResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) +class ResourceMetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) +class SkuInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInfoPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class OutboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class AppServicePlanPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServicePlan ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServicePlanPaged, self).__init__(*args, **kwargs) +class StrPaged(Paged): + """ + A paging container for iterating over a list of str object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[str]'} + } + + def __init__(self, *args, **kwargs): + + super(StrPaged, self).__init__(*args, **kwargs) +class HybridConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`HybridConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HybridConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(HybridConnectionPaged, self).__init__(*args, **kwargs) +class ResourceHealthMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..e06bfb981ad --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py @@ -0,0 +1,646 @@ +# 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 + + +class KeyVaultSecretStatus(str, Enum): + + 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 CertificateProductType(str, Enum): + + standard_domain_validated_ssl = "StandardDomainValidatedSsl" + standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class CertificateOrderStatus(str, Enum): + + pendingissuance = "Pendingissuance" + issued = "Issued" + revoked = "Revoked" + canceled = "Canceled" + denied = "Denied" + pendingrevocation = "Pendingrevocation" + pending_rekey = "PendingRekey" + unused = "Unused" + expired = "Expired" + not_submitted = "NotSubmitted" + + +class CertificateOrderActionType(str, Enum): + + 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 RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" + + +class IpFilterTag(str, Enum): + + default = "Default" + xff_proxy = "XffProxy" + service_tag = "ServiceTag" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 ScmType(str, Enum): + + 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 ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class FtpsState(str, Enum): + + all_allowed = "AllAllowed" + ftps_only = "FtpsOnly" + disabled = "Disabled" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class ClientCertMode(str, Enum): + + required = "Required" + optional = "Optional" + + +class RedundancyMode(str, Enum): + + none = "None" + manual = "Manual" + failover = "Failover" + active_active = "ActiveActive" + geo_redundant = "GeoRedundant" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class DomainStatus(str, Enum): + + 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 AzureResourceType(str, Enum): + + website = "Website" + traffic_manager = "TrafficManager" + + +class CustomHostNameDnsRecordType(str, Enum): + + cname = "CName" + a = "A" + + +class HostNameType(str, Enum): + + verified = "Verified" + managed = "Managed" + + +class DnsType(str, Enum): + + azure_dns = "AzureDns" + default_domain_registrar_dns = "DefaultDomainRegistrarDns" + + +class DomainType(str, Enum): + + regular = "Regular" + soft_deleted = "SoftDeleted" + + +class HostingEnvironmentStatus(str, Enum): + + preparing = "Preparing" + ready = "Ready" + scaling = "Scaling" + deleting = "Deleting" + + +class LoadBalancingMode(str, Enum): + + none = "None" + web = "Web" + publishing = "Publishing" + web_publishing = "Web,Publishing" + + +class ComputeModeOptions(str, Enum): + + shared = "Shared" + dedicated = "Dedicated" + dynamic = "Dynamic" + + +class WorkerSizeOptions(str, Enum): + + small = "Small" + medium = "Medium" + large = "Large" + d1 = "D1" + d2 = "D2" + d3 = "D3" + nested_small = "NestedSmall" + default = "Default" + + +class AccessControlEntryAction(str, Enum): + + permit = "Permit" + deny = "Deny" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" + + +class IssueType(str, Enum): + + 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 SolutionType(str, Enum): + + quick_solution = "QuickSolution" + deep_investigation = "DeepInvestigation" + best_practices = "BestPractices" + + +class RenderingType(str, Enum): + + no_graph = "NoGraph" + table = "Table" + time_series = "TimeSeries" + time_series_per_instance = "TimeSeriesPerInstance" + + +class StorageType(str, Enum): + + local_node = "LocalNode" + network_file_system = "NetworkFileSystem" + + +class FrontEndServiceType(str, Enum): + + node_port = "NodePort" + load_balancer = "LoadBalancer" + + +class KubeEnvironmentProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + waiting = "Waiting" + initialization_in_progress = "InitializationInProgress" + infrastructure_setup_in_progress = "InfrastructureSetupInProgress" + infrastructure_setup_complete = "InfrastructureSetupComplete" + scheduled_for_delete = "ScheduledForDelete" + upgrade_requested = "UpgradeRequested" + upgrade_failed = "UpgradeFailed" + + +class ResourceScopeType(str, Enum): + + server_farm = "ServerFarm" + subscription = "Subscription" + web_site = "WebSite" + + +class NotificationLevel(str, Enum): + + critical = "Critical" + warning = "Warning" + information = "Information" + non_urgent_suggestion = "NonUrgentSuggestion" + + +class Channels(str, Enum): + + notification = "Notification" + api = "Api" + email = "Email" + webhook = "Webhook" + all = "All" + + +class AppServicePlanRestrictions(str, Enum): + + none = "None" + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class InAvailabilityReasonType(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class CheckNameResourceTypes(str, Enum): + + site = "Site" + slot = "Slot" + hosting_environment = "HostingEnvironment" + publishing_user = "PublishingUser" + microsoft_websites = "Microsoft.Web/sites" + microsoft_websitesslots = "Microsoft.Web/sites/slots" + microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" + microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" + + +class ValidateResourceTypes(str, Enum): + + server_farm = "ServerFarm" + site = "Site" + + +class LogLevel(str, Enum): + + off = "Off" + verbose = "Verbose" + information = "Information" + warning = "Warning" + error = "Error" + + +class AzureStorageType(str, Enum): + + azure_files = "AzureFiles" + azure_blob = "AzureBlob" + + +class AzureStorageState(str, Enum): + + ok = "Ok" + invalid_credentials = "InvalidCredentials" + invalid_share = "InvalidShare" + + +class BackupItemStatus(str, Enum): + + 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 DatabaseType(str, Enum): + + sql_azure = "SqlAzure" + my_sql = "MySql" + local_my_sql = "LocalMySql" + postgre_sql = "PostgreSql" + + +class FrequencyUnit(str, Enum): + + day = "Day" + hour = "Hour" + + +class ContinuousWebJobStatus(str, Enum): + + initializing = "Initializing" + starting = "Starting" + running = "Running" + pending_restart = "PendingRestart" + stopped = "Stopped" + + +class WebJobType(str, Enum): + + continuous = "Continuous" + triggered = "Triggered" + + +class CookieExpirationConvention(str, Enum): + + fixed_time = "FixedTime" + identity_provider_derived = "IdentityProviderDerived" + + +class PublishingProfileFormat(str, Enum): + + file_zilla3 = "FileZilla3" + web_deploy = "WebDeploy" + ftp = "Ftp" + + +class DnsVerificationTestResult(str, Enum): + + passed = "Passed" + failed = "Failed" + skipped = "Skipped" + + +class ClientCredentialMethod(str, Enum): + + client_secret_post = "ClientSecretPost" + + +class ForwardProxyConvention(str, Enum): + + no_proxy = "NoProxy" + standard = "Standard" + custom = "Custom" + + +class UnauthenticatedClientActionV2(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + return401 = "Return401" + return403 = "Return403" + + +class MSDeployLogEntryType(str, Enum): + + message = "Message" + warning = "Warning" + error = "Error" + + +class MSDeployProvisioningState(str, Enum): + + accepted = "accepted" + running = "running" + succeeded = "succeeded" + failed = "failed" + canceled = "canceled" + + +class MySqlMigrationType(str, Enum): + + local_to_remote = "LocalToRemote" + remote_to_local = "RemoteToLocal" + + +class PublicCertificateLocation(str, Enum): + + current_user_my = "CurrentUserMy" + local_machine_my = "LocalMachineMy" + unknown = "Unknown" + + +class BackupRestoreOperationType(str, Enum): + + default = "Default" + clone = "Clone" + relocation = "Relocation" + snapshot = "Snapshot" + cloud_fs = "CloudFS" + + +class UnauthenticatedClientAction(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + + +class BuiltInAuthenticationProvider(str, Enum): + + azure_active_directory = "AzureActiveDirectory" + facebook = "Facebook" + google = "Google" + microsoft_account = "MicrosoftAccount" + twitter = "Twitter" + github = "Github" + + +class CloneAbilityResult(str, Enum): + + cloneable = "Cloneable" + partially_cloneable = "PartiallyCloneable" + not_cloneable = "NotCloneable" + + +class SiteExtensionType(str, Enum): + + gallery = "Gallery" + web_root = "WebRoot" + + +class TriggeredWebJobStatus(str, Enum): + + success = "Success" + failed = "Failed" + error = "Error" + + +class SiteRuntimeState(str, Enum): + + ready = "READY" + stopped = "STOPPED" + unknown = "UNKNOWN" + + +class BuildStatus(str, Enum): + + waiting_for_deployment = "WaitingForDeployment" + uploading = "Uploading" + deploying = "Deploying" + ready = "Ready" + failed = "Failed" + deleting = "Deleting" + detached = "Detached" + + +class TriggerTypes(str, Enum): + + http_trigger = "HttpTrigger" + unknown = "Unknown" + + +class SkuName(str, Enum): + + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + dynamic = "Dynamic" + isolated = "Isolated" + premium_v2 = "PremiumV2" + elastic_premium = "ElasticPremium" + elastic_isolated = "ElasticIsolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py new file mode 100644 index 00000000000..bf42bd594b1 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py @@ -0,0 +1,48 @@ +# 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_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 ._kube_environments_operations import KubeEnvironmentsOperations +from ._provider_operations import ProviderOperations +from ._recommendations_operations import RecommendationsOperations +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 +from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin + +__all__ = [ + 'AppServiceCertificateOrdersOperations', + 'CertificateRegistrationProviderOperations', + 'DomainsOperations', + 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', + 'CertificatesOperations', + 'DeletedWebAppsOperations', + 'DiagnosticsOperations', + 'KubeEnvironmentsOperations', + 'ProviderOperations', + 'RecommendationsOperations', + 'WebAppsOperations', + 'StaticSitesOperations', + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', + 'ResourceHealthMetadataOperations', + 'WebSiteManagementClientOperationsMixin', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_certificate_orders_operations.py new file mode 100644 index 00000000000..e6f37c318ec --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_certificate_orders_operations.py @@ -0,0 +1,1423 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceCertificateOrdersOperations(object): + """AppServiceCertificateOrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all certificate orders in a subscription. + + Description for List all certificate orders in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def validate_purchase_information( + self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate_purchase_information.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def get( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + + def _create_or_update_initial( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateOrder or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def delete( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.AppServiceCertificateOrderPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def list_certificates( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_certificates.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} + + def get_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + + def _create_or_update_certificate_initial( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.AppServiceCertificateResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def delete_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.AppServiceCertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def reissue( + self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.ReissueCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reissue.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} + + def renew( + self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.RenewCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} + + def resend_email( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.resend_email.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} + + def resend_request_emails( + self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): + """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: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.resend_request_emails.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} + + def retrieve_site_seal( + self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): + """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 light_theme: If 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSeal or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSeal or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) + + # Construct URL + url = self.retrieve_site_seal.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSeal', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} + + def verify_domain_ownership( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_domain_ownership.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} + + def retrieve_certificate_actions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2020_06_01.models.CertificateOrderAction] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_actions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateOrderAction]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} + + def retrieve_certificate_email_history( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.CertificateEmail] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_email_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateEmail]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_environments_operations.py new file mode 100644 index 00000000000..a8bac4ca995 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_environments_operations.py @@ -0,0 +1,2858 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceEnvironmentsOperations(object): + """AppServiceEnvironmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all App Service Environments for a subscription. + + Description for Get all App Service Environments for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.AppServiceEnvironmentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceEnvironmentResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 true to force the deletion + even if the App Service Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.AppServiceEnvironmentPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def list_capacities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StampCapacity + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StampCapacityPaged[~azure.mgmt.web.v2020_06_01.models.StampCapacity] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_capacities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} + + def get_vip_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.AddressResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vip_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} + + + def _change_vnet_initial( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): + vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) + + # Construct URL + url = self.change_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def change_vnet( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 id: Resource id of the Virtual Network. + :type id: str + :param subnet: Subnet within the Virtual Network. + :type subnet: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._change_vnet_initial( + resource_group_name=resource_group_name, + name=name, + id=id, + subnet=subnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} + + def list_diagnostics( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2020_06_01.models.HostingEnvironmentDiagnostics] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_diagnostics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} + + def get_diagnostics_item( + self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostingEnvironmentDiagnostics or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.HostingEnvironmentDiagnostics or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostics_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} + + def get_inbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2020_06_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_06_01.models.InboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_inbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} + + def list_multi_role_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} + + def get_multi_role_pool( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + + def _create_or_update_multi_role_pool_initial( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def list_multi_role_pool_instance_metric_definitions( + self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} + + def list_multi_role_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} + + def list_multi_role_pool_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_06_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} + + def list_multi_role_usages( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2020_06_01.models.UsagePaged[~azure.mgmt.web.v2020_06_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} + + def list_operations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.Operation] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_operations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Operation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} + + def get_outbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OutboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2020_06_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_06_01.models.OutboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_outbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} + + def reboot( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reboot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} + + + def _resume_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.resume.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def resume( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} + + def list_app_service_plans( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_app_service_plans.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} + + def list_web_apps( + self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} + + + def _suspend_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.suspend.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def suspend( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} + + def list_worker_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} + + def get_worker_pool( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + + def _create_or_update_worker_pool_initial( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def list_worker_pool_instance_metric_definitions( + self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} + + def list_web_worker_metric_definitions( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} + + def list_worker_pool_skus( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_06_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} + + def list_web_worker_usages( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2020_06_01.models.UsagePaged[~azure.mgmt.web.v2020_06_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_plans_operations.py new file mode 100644 index 00000000000..5707a72568a --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_plans_operations.py @@ -0,0 +1,1946 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServicePlansOperations(object): + """AppServicePlansOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, detailed=None, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans for a subscription. + + Description for Get all App Service plans for a subscription. + + :param detailed: Specify true to return all App Service + plan properties. The default is false, which returns a + subset of the properties. + Retrieval of all properties may increase the API latency. + :type detailed: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + if detailed is not None: + query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlan') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.AppServicePlan + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AppServicePlan or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.AppServicePlan]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.AppServicePlanPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def list_capabilities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.Capability] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_capabilities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Capability]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_web_apps_by_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of str + :rtype: ~azure.mgmt.web.v2020_06_01.models.StrPaged[str] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps_by_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} + + def get_hybrid_connection_plan_limit( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionLimits or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnectionLimits or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_plan_limit.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionLimits', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HybridConnection + :rtype: + ~azure.mgmt.web.v2020_06_01.models.HybridConnectionPaged[~azure.mgmt.web.v2020_06_01.models.HybridConnection] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} + + def restart_web_apps( + self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): + """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 true to perform a soft + restart, applies the configuration settings and restarts the apps if + necessary. The default is false, which always restarts + and reprovisions the apps + :type soft_restart: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} + + def list_web_apps( + self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} + + def get_server_farm_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_server_farm_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} + + def list_vnets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} + + def get_vnet_from_server_farm( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_from_server_farm.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_routes_for_vnet( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_routes_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} + + def get_route_for_vnet( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_route_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def create_or_update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def delete_vnet_route( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def reboot_worker( + self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reboot_worker.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificate_registration_provider_operations.py new file mode 100644 index 00000000000..1245a328aac --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificate_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificateRegistrationProviderOperations(object): + """CertificateRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificates_operations.py new file mode 100644 index 00000000000..367a6e54712 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificates_operations.py @@ -0,0 +1,437 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all certificates for a subscription. + + Description for Get all certificates for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CertificatePaged[~azure.mgmt.web.v2020_06_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CertificatePaged[~azure.mgmt.web.v2020_06_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def create_or_update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.Certificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'Certificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.CertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_deleted_web_apps_operations.py new file mode 100644 index 00000000000..265707b3b47 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_deleted_web_apps_operations.py @@ -0,0 +1,238 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DeletedWebAppsOperations(object): + """DeletedWebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all deleted apps for a subscription. + + Description for Get all deleted apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_06_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_06_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} + + def get_deleted_web_app_by_location( + self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeletedSite or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DeletedSite or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deleted_web_app_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeletedSite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_diagnostics_operations.py new file mode 100644 index 00000000000..3e6c03e73ab --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_diagnostics_operations.py @@ -0,0 +1,1713 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DiagnosticsOperations(object): + """DiagnosticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list_hosting_environment_detector_responses( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hosting_environment_detector_responses.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} + + def get_hosting_environment_detector_response( + self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hosting_environment_detector_response.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} + + def list_site_detector_responses( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} + + def get_site_detector_response( + self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} + + def list_site_diagnostic_categories( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} + + def get_site_diagnostic_category( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AnalysisDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.AnalysisDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AnalysisDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector( + self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector( + self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} + + def list_site_detector_responses_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} + + def get_site_detector_response_slot( + self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} + + def list_site_diagnostic_categories_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} + + def get_site_diagnostic_category_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AnalysisDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.AnalysisDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AnalysisDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector_slot( + self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector_slot( + self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domain_registration_provider_operations.py new file mode 100644 index 00000000000..ab4755dec83 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domain_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DomainRegistrationProviderOperations(object): + """DomainRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py new file mode 100644 index 00000000000..a210462fa9d --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py @@ -0,0 +1,1090 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DomainsOperations(object): + """DomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def check_availability( + self, name=None, custom_headers=None, raw=False, **operation_config): + """Check if a domain is available for registration. + + Description for Check if a domain is available for registration. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainAvailabilityCheckResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DomainAvailabilityCheckResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.check_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainAvailabilityCheckResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all domains in a subscription. + + Description for Get all domains in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DomainPaged[~azure.mgmt.web.v2020_06_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} + + def get_control_center_sso_request( + self, custom_headers=None, raw=False, **operation_config): + """Generate a single sign-on request for the domain management portal. + + Description for Generate a single sign-on request for the domain + management portal. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainControlCenterSsoRequest or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DomainControlCenterSsoRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_control_center_sso_request.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainControlCenterSsoRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} + + def list_recommendations( + self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): + """Get domain name recommendations based on keywords. + + Description for Get domain name recommendations based on keywords. + + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NameIdentifier + :rtype: + ~azure.mgmt.web.v2020_06_01.models.NameIdentifierPaged[~azure.mgmt.web.v2020_06_01.models.NameIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommendations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DomainPaged[~azure.mgmt.web.v2020_06_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} + + def get( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'Domain') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.Domain + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.Domain]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def delete( + self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): + """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 true to delete + the domain immediately. The default is false which + deletes the domain after 24 hours. + :type force_hard_delete_domain: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.DomainPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'DomainPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def list_ownership_identifiers( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DomainOwnershipIdentifier + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_ownership_identifiers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} + + def get_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def create_or_update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """Creates an ownership identifier for a domain or updates identifier + details for an existing identifer. + + Description for Creates an ownership identifier for a domain or updates + identifier details for an existing identifer. + + :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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.create_or_update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def delete_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """Creates an ownership identifier for a domain or updates identifier + details for an existing identifer. + + Description for Creates an ownership identifier for a domain or updates + identifier details for an existing identifer. + + :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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def renew( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_kube_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_kube_environments_operations.py new file mode 100644 index 00000000000..cffa1ea68b4 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_kube_environments_operations.py @@ -0,0 +1,508 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class KubeEnvironmentsOperations(object): + """KubeEnvironmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Get all Kubernetes Environments for a subscription. + + Description for Get all Kubernetes Environments for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of KubeEnvironment + :rtype: + ~azure.mgmt.web.v2020_06_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2020_06_01.models.KubeEnvironment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.KubeEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all the Kubernetes Environments in a resource group. + + Description for Get all the Kubernetes Environments in a resource + group. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of KubeEnvironment + :rtype: + ~azure.mgmt.web.v2020_06_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2020_06_01.models.KubeEnvironment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.KubeEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get the properties of a Kubernetes Environment. + + Description for Get the properties of a Kubernetes 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 Kubernetes Environment. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KubeEnvironment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.KubeEnvironment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KubeEnvironment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + + + def _create_initial( + self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('KubeEnvironment', response) + if response.status_code == 201: + deserialized = self._deserialize('KubeEnvironment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a Kubernetes Environment. + + Description for Create a Kubernetes 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 Kubernetes Environment. + :type name: str + :param kube_environment_envelope: Configuration details of the + Kubernetes Environment. + :type kube_environment_envelope: + ~azure.mgmt.web.v2020_06_01.models.KubeEnvironment + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns KubeEnvironment or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.KubeEnvironment] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.KubeEnvironment]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + name=name, + kube_environment_envelope=kube_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('KubeEnvironment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + + + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a Kubernetes Environment. + + Description for Delete a Kubernetes 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 Kubernetes Environment. + :type name: str + :param force_delete: Specify true to force the deletion + even if the Kubernetes Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + + def update( + self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, **operation_config): + """Updates a Kubernetes Environment. + + Description for Updates a Kubernetes 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 Kubernetes Environment. + :type name: str + :param kube_environment_envelope: Configuration details of the + Kubernetes Environment. + :type kube_environment_envelope: + ~azure.mgmt.web.v2020_06_01.models.KubeEnvironment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KubeEnvironment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.KubeEnvironment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KubeEnvironment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_provider_operations.py new file mode 100644 index 00000000000..0eab3098d88 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_provider_operations.py @@ -0,0 +1,246 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProviderOperations(object): + """ProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def get_available_stacks( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their + versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStackResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_06_01.models.ApplicationStackResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks.metadata['url'] + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} + + def get_available_stacks_on_prem( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their + versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStackResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_06_01.models.ApplicationStackResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks_on_prem.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_recommendations_operations.py new file mode 100644 index 00000000000..66530d2ec58 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_recommendations_operations.py @@ -0,0 +1,1070 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RecommendationsOperations(object): + """RecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """List all recommendations for a subscription. + + Description for List all recommendations for a subscription. + + :param featured: Specify true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} + + def reset_all_filters( + self, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for a subscription. + + Description for Reset all recommendation opt-out settings for a + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} + + def disable_recommendation_for_subscription( + self, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} + + def list_history_for_hosting_environment( + self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} + + def list_recommended_rules_for_hosting_environment( + self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} + + def disable_all_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_all_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} + + def reset_all_filters_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} + + def get_rule_details_by_hosting_environment( + self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} + + def disable_recommendation_for_hosting_environment( + self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_hosting_environment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} + + def list_history_for_web_app( + self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} + + def list_recommended_rules_for_web_app( + self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} + + def disable_all_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_all_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} + + def reset_all_filters_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} + + def get_rule_details_by_web_app( + self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} + + def disable_recommendation_for_site( + self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_site.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_resource_health_metadata_operations.py new file mode 100644 index 00000000000..1d6b14d1334 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_resource_health_metadata_operations.py @@ -0,0 +1,468 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceHealthMetadataOperations(object): + """ResourceHealthMetadataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the subscription. + + Description for List all ResourceHealthMetadata for all sites in the + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} + + def get_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} + + def list_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} + + def get_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_static_sites_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_static_sites_operations.py new file mode 100644 index 00000000000..35a49a30db2 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_static_sites_operations.py @@ -0,0 +1,1887 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class StaticSitesOperations(object): + """StaticSitesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def preview_workflow( + self, location, static_sites_workflow_preview_request, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.StaticSitesWorkflowPreviewRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSitesWorkflowPreview or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSitesWorkflowPreview + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.preview_workflow.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSitesWorkflowPreview', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all Static Sites for a subscription. + + Description for Get all Static Sites for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteARMResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} + + def get_static_sites_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteARMResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_static_sites_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} + + def get_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def create_or_update_static_site( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.StaticSiteARMResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def delete_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def update_static_site( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.StaticSitePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def list_static_site_users( + self, resource_group_name, name, authprovider, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteUserARMResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteUserARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteUserARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_users.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteUserARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} + + def delete_static_site_user( + self, resource_group_name, name, authprovider, userid, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} + + def update_static_site_user( + self, resource_group_name, name, authprovider, userid, kind=None, roles=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param roles: The roles for the static site user, in free-form string + format + :type roles: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteUserARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + static_site_user_envelope = models.StaticSiteUserARMResource(kind=kind, roles=roles) + + # Construct URL + url = self.update_static_site_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} + + def get_static_site_builds( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteBuildARMResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteBuildARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteBuildARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_static_site_builds.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteBuildARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} + + def get_static_site_build( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteBuildARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteBuildARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteBuildARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} + + def delete_static_site_build( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} + + def create_or_update_static_site_build_function_app_settings( + self, resource_group_name, name, pr_id, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings'} + + def list_static_site_build_functions( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteFunctionOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_build_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} + + def list_static_site_build_function_app_settings( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 + :param pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_build_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} + + def create_or_update_static_site_function_app_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.create_or_update_static_site_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} + + def create_user_roles_invitation_link( + self, resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.StaticSiteUserInvitationRequestResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserInvitationResponseResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteUserInvitationResponseResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_user_roles_invitation_link.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} + + def list_static_site_custom_domains( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteCustomDomainOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteCustomDomainOverviewARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteCustomDomainOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_custom_domains.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteCustomDomainOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} + + def create_or_update_static_site_custom_domain( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteCustomDomainOverviewARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteCustomDomainOverviewARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + def delete_static_site_custom_domain( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + def validate_custom_domain_can_be_added_to_static_site( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate_custom_domain_can_be_added_to_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} + + def detach_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.detach_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} + + def list_static_site_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteFunctionOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} + + def list_static_site_function_app_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} + + def list_static_site_secrets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} + + def reset_static_site_api_key( + self, resource_group_name, name, reset_properties_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.StaticSiteResetPropertiesARMResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_static_site_api_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_top_level_domains_operations.py new file mode 100644 index 00000000000..27e30ae664f --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_top_level_domains_operations.py @@ -0,0 +1,251 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TopLevelDomainsOperations(object): + """TopLevelDomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all top-level domains supported for registration. + + Description for Get all top-level domains supported for registration. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TopLevelDomain + :rtype: + ~azure.mgmt.web.v2020_06_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2020_06_01.models.TopLevelDomain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} + + def get( + self, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TopLevelDomain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.TopLevelDomain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TopLevelDomain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} + + def list_agreements( + self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): + """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 include_privacy: If true, then the list of + agreements will include agreements for domain privacy as well; + otherwise, false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TldLegalAgreement + :rtype: + ~azure.mgmt.web.v2020_06_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2020_06_01.models.TldLegalAgreement] + :raises: + :class:`DefaultErrorResponseException` + """ + agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_agreements.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_apps_operations.py new file mode 100644 index 00000000000..3280739d993 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_apps_operations.py @@ -0,0 +1,27494 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WebAppsOperations(object): + """WebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all apps for a subscription. + + Description for Get all apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} + + def list_by_resource_group( + self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + if include_slots is not None: + query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.Site + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def delete( + self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SitePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def analyze_custom_hostname( + self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} + + def apply_slot_config_to_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_config_to_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} + + def backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} + + def list_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_06_01.models.BackupItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} + + def get_backup_status( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def delete_backup( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def list_backup_status_secrets( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} + + + def _restore_initial( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} + + def get_basic_publishing_credentials_policies( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesCollection or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesCollection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_basic_publishing_credentials_policies.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} + + def get_ftp_allowed( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ftp_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} + + def update_ftp_allowed( + self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): + """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 allow: true to allow access to a publishing + method; otherwise, false. + :type allow: bool + :param kind: Kind of resource. + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) + + # Construct URL + url = self.update_ftp_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} + + def get_scm_allowed( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_scm_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} + + def update_scm_allowed( + self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): + """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 allow: true to allow access to a publishing + method; otherwise, false. + :type allow: bool + :param kind: Kind of resource. + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) + + # Construct URL + url = self.update_scm_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} + + def list_configurations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} + + def update_application_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} + + def list_application_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} + + def update_auth_settings( + self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteAuthSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} + + def get_auth_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} + + def update_auth_settings_v2( + self, resource_group_name, name, site_auth_settings_v2, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteAuthSettingsV2 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} + + def get_auth_settings_v2( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} + + def update_azure_storage_accounts( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2020_06_01.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} + + def list_azure_storage_accounts( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} + + def update_backup_configuration( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def delete_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def get_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} + + def update_connection_strings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2020_06_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} + + def list_connection_strings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_diagnostic_logs_config( + self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteLogsConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_metadata( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} + + def list_metadata( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} + + + def _list_publishing_credentials_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} + + def update_site_push_settings( + self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PushSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} + + def list_site_push_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} + + def list_slot_configuration_names( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def update_slot_configuration_names( + self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SlotConfigNamesResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def get_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def create_or_update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def list_configuration_snapshot_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} + + def get_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.recover_site_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} + + def get_container_logs_zip( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} + + def list_continuous_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_06_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} + + def get_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DeploymentPaged[~azure.mgmt.web.v2020_06_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} + + def get_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def create_deployment( + self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def delete_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def list_deployment_log( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} + + def discover_backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} + + def list_domain_ownership_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_06_01.models.IdentifierPaged[~azure.mgmt.web.v2020_06_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_initial( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + def get_ms_deploy_log( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} + + def list_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} + + def get_functions_admin_token( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} + + def get_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + + def _create_function_initial( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_function( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def delete_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def create_or_update_function_secret( + self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def delete_function_secret( + self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} + + def list_function_secrets( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} + + def list_host_keys( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} + + def list_sync_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} + + def sync_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} + + def create_or_update_host_secret( + self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def delete_host_secret( + self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2020_06_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_06_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} + + def get_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding( + self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.HostNameBinding + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def delete_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} + + def list_relay_service_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} + + def get_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def delete_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def list_instance_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebSiteInstanceStatus + :rtype: + ~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatus] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} + + def get_instance_info( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebSiteInstanceStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebSiteInstanceStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} + + def get_instance_ms_deploy_status( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + + def _create_instance_ms_deploy_operation_initial( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} + + def list_instance_processes( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} + + def get_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} + + def list_instance_process_modules( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module( + self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} + + def list_instance_process_threads( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} + + def is_cloneable( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} + + def list_site_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_06_01.models.BackupItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} + + def list_sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} + + + def _migrate_storage_initial( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_storage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_storage( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.StorageMigrationOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StorageMigrationResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.StorageMigrationResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.StorageMigrationResponse]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} + + + def _migrate_my_sql_initial( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_my_sql.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_my_sql( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.MigrateMySqlRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Operation or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.Operation] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.Operation]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} + + def get_migrate_my_sql_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} + + def get_swift_virtual_network_connection( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_swift_virtual_network.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def list_network_features( + self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): + """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. This can either be "summary" or + "detailed". + :type view: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_network_features.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} + + def get_network_trace_operation( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} + + def stop_web_site_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} + + def get_network_traces( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} + + def get_network_trace_operation_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} + + def get_network_traces_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.generate_new_site_publishing_password.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} + + def list_perf_mon_counters( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2020_06_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_06_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} + + def get_site_php_error_log_flag( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} + + def list_premier_add_ons( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} + + def get_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PremierAddOn + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PremierAddOnPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def get_private_access( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def put_private_access_vnet( + self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PrivateAccess + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def list_processes( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} + + def get_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def delete_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def get_process_dump( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} + + def list_process_modules( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} + + def get_process_module( + self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} + + def list_public_certificates( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2020_06_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_06_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} + + def get_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate( + self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PublicCertificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets( + self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """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 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_06_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the + DisasterRecover endpoint if true + :type include_disaster_recovery_endpoints: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} + + def reset_production_slot_config( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_production_slot_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} + + def restart( + self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} + + + def _restore_from_backup_blob_initial( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob( + self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_backup_blob_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.DeletedAppRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_deleted_app_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} + + + def _restore_snapshot_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.SnapshotRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_snapshot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} + + def list_site_extensions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} + + def get_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_initial( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def delete_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _copy_production_slot_initial( + self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, **operation_config): + copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) + + # Construct URL + url = self.copy_production_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def copy_production_slot( + self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): + """Copies a deployment slot to another deployment slot of an app. + + Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. + :type target_slot: str + :param site_config: The site object which will be merged with the + source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2020_06_01.models.SiteConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._copy_production_slot_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + site_config=site_config, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} + + def list_slots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} + + def get_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + + def _create_or_update_slot_initial( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.Site + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def delete_slot( + self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """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 true if the App Service plan + will be empty after app deletion and you want to delete the empty App + Service plan. By default, the empty App Service plan is not deleted. + :type delete_empty_server_farm: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SitePatchResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def analyze_custom_hostname_slot( + self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} + + def apply_slot_configuration_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} + + def backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} + + def list_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_06_01.models.BackupItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} + + def get_backup_status_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def delete_backup_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def list_backup_status_secrets_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.BackupRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} + + + def _restore_slot_initial( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} + + def list_configurations_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} + + def update_application_settings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} + + def list_application_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} + + def update_auth_settings_slot( + self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteAuthSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} + + def get_auth_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} + + def update_auth_settings_v2_slot( + self, resource_group_name, name, site_auth_settings_v2, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteAuthSettingsV2 + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_v2_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} + + def get_auth_settings_v2_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_v2_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} + + def update_azure_storage_accounts_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2020_06_01.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} + + def list_azure_storage_accounts_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} + + def update_backup_configuration_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def delete_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def get_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} + + def update_connection_strings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2020_06_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} + + def list_connection_strings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_diagnostic_logs_config_slot( + self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteLogsConfig + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_metadata_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} + + def list_metadata_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} + + + def _list_publishing_credentials_slot_initial( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} + + def update_site_push_settings_slot( + self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PushSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} + + def list_site_push_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} + + def get_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def create_or_update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def list_configuration_snapshot_info_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} + + def get_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.recover_site_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} + + def get_container_logs_zip_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} + + def list_continuous_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_06_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} + + def get_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2020_06_01.models.DeploymentPaged[~azure.mgmt.web.v2020_06_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} + + def get_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def create_deployment_slot( + self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def delete_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def list_deployment_log_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} + + def discover_backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} + + def list_domain_ownership_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_06_01.models.IdentifierPaged[~azure.mgmt.web.v2020_06_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation_slot( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + def get_ms_deploy_log_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} + + def list_instance_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} + + def get_functions_admin_token_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} + + def get_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + + def _create_instance_function_slot_initial( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_function_slot( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def delete_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def create_or_update_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} + + def list_function_secrets_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} + + def list_host_keys_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} + + def list_sync_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} + + def sync_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} + + def create_or_update_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2020_06_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_06_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} + + def get_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding_slot( + self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.HostNameBinding + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def delete_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def get_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} + + def list_relay_service_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} + + def get_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def delete_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def list_instance_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebSiteInstanceStatus + :rtype: + ~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatus] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} + + def get_instance_info_slot( + self, resource_group_name, name, instance_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebSiteInstanceStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebSiteInstanceStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} + + def get_instance_ms_deploy_status_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + + def _create_instance_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation_slot( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_processes_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} + + def get_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_process_modules_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def list_instance_process_threads_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} + + def is_cloneable_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} + + def list_site_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_06_01.models.BackupItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} + + def list_sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} + + def get_migrate_my_sql_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} + + def get_swift_virtual_network_connection_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_swift_virtual_network_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def list_network_features_slot( + self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): + """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. This can either be "summary" or + "detailed". + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_network_features_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} + + def get_network_trace_operation_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} + + def stop_web_site_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} + + def get_network_traces_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} + + def get_network_trace_operation_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def get_network_traces_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.generate_new_site_publishing_password_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} + + def list_perf_mon_counters_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2020_06_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_06_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} + + def get_site_php_error_log_flag_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} + + def list_premier_add_ons_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} + + def get_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PremierAddOn + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PremierAddOnPatchResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def get_private_access_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def put_private_access_vnet_slot( + self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PrivateAccess + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def get_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """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: + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnectionResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.PrivateEndpointConnectionResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _approve_or_reject_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) + + # Construct URL + url = self.approve_or_reject_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + if response.status_code == 202: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def approve_or_reject_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_06_01.models.PrivateLinkConnectionState + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PrivateEndpointConnectionResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.PrivateEndpointConnectionResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.PrivateEndpointConnectionResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + kind=kind, + private_link_service_connection_state=private_link_service_connection_state, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + if response.status_code == 202: + deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get_private_link_resources( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateLinkResourcesWrapper + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_link_resources.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} + + def list_processes_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} + + def get_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def delete_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def get_process_dump_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} + + def list_process_modules_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} + + def get_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} + + def list_public_certificates_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2020_06_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_06_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} + + def get_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate_slot( + self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.PublicCertificate + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets_slot( + self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """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 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_06_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the + DisasterRecover endpoint if true + :type include_disaster_recovery_endpoints: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} + + def reset_slot_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} + + def restart_slot( + self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} + + + def _restore_from_backup_blob_slot_initial( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_backup_blob_slot_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.DeletedAppRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_deleted_app_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} + + + def _restore_snapshot_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.SnapshotRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_snapshot_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} + + def list_site_extensions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} + + def get_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_slot_initial( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def delete_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _copy_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, **operation_config): + copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) + + # Construct URL + url = self.copy_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def copy_slot_slot( + self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): + """Copies a deployment slot to another deployment slot of an app. + + Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. + :type target_slot: str + :param site_config: The site object which will be merged with the + source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2020_06_01.models.SiteConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._copy_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + site_config=site_config, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + copy_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} + + def list_slot_differences_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_06_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} + + + def _swap_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._swap_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} + + def list_snapshots_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SnapshotPaged[~azure.mgmt.web.v2020_06_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} + + def list_snapshots_from_dr_secondary_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SnapshotPaged[~azure.mgmt.web.v2020_06_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} + + def get_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + + def _create_or_update_source_control_slot_initial( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def delete_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def start_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} + + + def _start_network_trace_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} + + def stop_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} + + def stop_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} + + def sync_repository_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_repository_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} + + def sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} + + def list_triggered_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2020_06_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} + + def get_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def run_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.run_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} + + def list_usages_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} + + def list_vnet_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} + + def get_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2020_06_01.models.WebJobPaged[~azure.mgmt.web.v2020_06_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} + + def get_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} + + def list_slot_differences_from_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_06_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_from_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} + + + def _swap_slot_with_production_initial( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_with_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_with_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} + + def list_snapshots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SnapshotPaged[~azure.mgmt.web.v2020_06_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} + + def list_snapshots_from_dr_secondary( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SnapshotPaged[~azure.mgmt.web.v2020_06_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} + + def get_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + + def _create_or_update_source_control_initial( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): + """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_06_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def delete_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def start( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} + + + def _start_network_trace_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} + + def stop( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} + + def stop_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} + + def sync_repository( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_repository.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} + + def sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} + + def list_triggered_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2020_06_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} + + def get_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history( + self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} + + def run_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.run_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} + + def list_vnet_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} + + def get_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2020_06_01.models.WebJobPaged[~azure.mgmt.web.v2020_06_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} + + def get_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_site_management_client_operations.py new file mode 100644 index 00000000000..da3d3526107 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_site_management_client_operations.py @@ -0,0 +1,1061 @@ +# 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 msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from .. import models +import uuid + + +class WebSiteManagementClientOperationsMixin(object): + + def get_publishing_user( + self, custom_headers=None, raw=False, **operation_config): + """Gets publishing user. + + Description for Gets publishing user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def update_publishing_user( + self, user_details, custom_headers=None, raw=False, **operation_config): + """Updates publishing user. + + Description for Updates publishing user. + + :param user_details: Details of publishing user + :type user_details: ~azure.mgmt.web.v2020_06_01.models.User + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(user_details, 'User') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def list_source_controls( + self, custom_headers=None, raw=False, **operation_config): + """Gets the source controls available for Azure websites. + + Description for Gets the source controls available for Azure websites. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.web.v2020_06_01.models.SourceControlPaged[~azure.mgmt.web.v2020_06_01.models.SourceControl] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_source_controls.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} + + def get_source_control( + self, source_control_type, custom_headers=None, raw=False, **operation_config): + """Gets source control token. + + Description for Gets source control token. + + :param source_control_type: Type of source control + :type source_control_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def update_source_control( + self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.SourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request_message, 'SourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def list_billing_meters( + self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BillingMeter + :rtype: + ~azure.mgmt.web.v2020_06_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeter] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_billing_meters.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} + + def check_name_availability( + self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): + """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. 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_06_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceNameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) + + # Construct URL + url = self.check_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceNameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} + + def get_subscription_deployment_locations( + self, custom_headers=None, raw=False, **operation_config): + """Gets list of available geo regions plus ministamps. + + Description for Gets list of available geo regions plus ministamps. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentLocations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_subscription_deployment_locations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeploymentLocations', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} + + def list_geo_regions( + self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values + include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', + 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + :type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName + :param linux_workers_enabled: Specify true if you want to + filter to only regions that support Linux workers. + :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify true if you want to + filter to only regions that support Xenon workers. + :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify true if you + want to filter to only regions that support Linux Consumption Workers. + :type linux_dynamic_workers_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GeoRegion + :rtype: + ~azure.mgmt.web.v2020_06_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegion] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_geo_regions.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} + + def list_site_identifiers_assigned_to_host_name( + self, name=None, custom_headers=None, raw=False, **operation_config): + """List all apps that are assigned to a hostname. + + Description for List all apps that are assigned to a hostname. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_06_01.models.IdentifierPaged[~azure.mgmt.web.v2020_06_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} + + def list_premier_add_on_offers( + self, custom_headers=None, raw=False, **operation_config): + """List all premier add-on offers. + + Description for List all premier add-on offers. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PremierAddOnOffer + :rtype: + ~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOffer] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_premier_add_on_offers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} + + def list_skus( + self, custom_headers=None, raw=False, **operation_config): + """List all SKUs. + + Description for List all SKUs. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SkuInfos or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SkuInfos', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} + + def verify_hosting_environment_vnet( + self, parameters, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.VnetParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetValidationFailureDetails or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_hosting_environment_vnet.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VnetParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetValidationFailureDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} + + def move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} + + def validate( + self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): + """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_06_01.models.ValidateRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_request, 'ValidateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} + + def validate_move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.validate_move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/version.py @@ -0,0 +1,13 @@ +# 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" + From 35221e95168cb8c7e0817d8b64fc2ce424ae6fdb Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Tue, 22 Dec 2020 14:38:02 -0800 Subject: [PATCH 025/125] Add version 0.1.7 --- src/appservice-kube/HISTORY.rst | 5 ++++ src/appservice-kube/setup.py | 2 +- src/index.json | 53 +++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index bd2da2076ad..7b941716ada 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.7 +++++++ +* Update kube environments SDK +* Delete old parameters no longer in API + 0.1.6 ++++++ * Update SDK to fix appservice kube delete command diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 406f2e3e3df..01952bdcd2f 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.6' +VERSION = '0.1.7' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 4ff26855827..b75c673e885 100644 --- a/src/index.json +++ b/src/index.json @@ -1361,6 +1361,59 @@ "version": "0.1.6" }, "sha256Digest": "2adaa4b4552cd8d32869969000ac07d12ee108a50c358c3081e76a2500a5aeec" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.7-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.7-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.7" + }, + "sha256Digest": "9070e0f440582c26148f4307b7752235c3f5034fe4fe56f82d13723c918afee6" } ], "azure-batch-cli-extensions": [ From eecafb2bc8b77b5ecbbc3412f1c51dccae26d971 Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Fri, 19 Feb 2021 14:15:05 -0800 Subject: [PATCH 026/125] remove azure-cli-core dependency --- src/appservice-kube/setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 01952bdcd2f..32745cac181 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -35,9 +35,7 @@ ] # TODO: Add any additional SDK dependencies here -DEPENDENCIES = [ - 'azure-cli-core' -] +DEPENDENCIES = [] with open('README.rst', 'r', encoding='utf-8') as f: README = f.read() From ffcfc235e646605f494b2670890a301bc19cc7b4 Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Fri, 19 Feb 2021 14:17:46 -0800 Subject: [PATCH 027/125] Add version 0.1.8 --- src/appservice-kube/HISTORY.rst | 4 +++ src/appservice-kube/setup.py | 2 +- src/index.json | 45 +++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 7b941716ada..c4dfc5b6347 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.8 +++++++ +* Remove azure-cli-core dependency + 0.1.7 ++++++ * Update kube environments SDK diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 32745cac181..6845aba6d7b 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.7' +VERSION = '0.1.8' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index b75c673e885..58ab3af4577 100644 --- a/src/index.json +++ b/src/index.json @@ -1414,6 +1414,51 @@ "version": "0.1.7" }, "sha256Digest": "9070e0f440582c26148f4307b7752235c3f5034fe4fe56f82d13723c918afee6" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.8-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.8-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.8" + }, + "sha256Digest": "9530c1347525a91b62311a443e3df4d80f00e2cdb1d40e6326cbd90cf500cfea" } ], "azure-batch-cli-extensions": [ From c6b63e63159d998d6c55b0cdaf7a40d1289aeff5 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 24 Mar 2021 10:26:01 -0700 Subject: [PATCH 028/125] Add latest changes from cli core (except az webapp up) --- .../azext_appservice_kube/_constants.py | 2 + .../azext_appservice_kube/_create_util.py | 24 +++ .../azext_appservice_kube/commands.py | 4 + .../azext_appservice_kube/custom.py | 192 +++++++++++++++--- 4 files changed, 189 insertions(+), 33 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py index a4830a59a25..3d5ec27ece4 100644 --- a/src/appservice-kube/azext_appservice_kube/_constants.py +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -12,6 +12,8 @@ WINDOWS_RUNTIMES = ['dotnet', 'node', 'java', 'powershell'] NODE_VERSION_DEFAULT = "10.14" +NODE_VERSION_NEWER = "12-lts" +NODE_EXACT_VERSION_DEFAULT = "10.14.1" NETCORE_VERSION_DEFAULT = "2.2" DOTNET_VERSION_DEFAULT = "4.7" PYTHON_VERSION_DEFAULT = "3.7" diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py index 8f7e457f236..231fd97e745 100644 --- a/src/appservice-kube/azext_appservice_kube/_create_util.py +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -286,6 +286,20 @@ def should_create_new_rg(cmd, rg_name, is_linux): return True +def get_site_availability(cmd, name): + """ This is used by az webapp up to verify if a site needs to be created or should just be deployed""" + client = web_client_factory(cmd.cli_ctx) + availability = client.check_name_availability(name, 'Site') + + # check for "." in app name. it is valid for hostnames to contain it, but not allowed for webapp names + if "." in name: + availability.name_available = False + availability.reason = "Invalid" + availability.message = ("Site names only allow alphanumeric characters and hyphens, " + "cannot start or end in a hyphen, and must be less than 64 chars.") + return availability + + def does_app_already_exist(cmd, name): """ This is used by az webapp up to verify if a site needs to be created or should just be deployed""" client = web_client_factory(cmd.cli_ctx) @@ -359,6 +373,16 @@ def get_kube_plan_to_use(cmd, kube_environment, loc, sku, create_rg, resource_gr return _determine_if_default_plan_to_use(cmd, _default_asp, resource_group_name, loc, sku, create_rg) return plan + +# Portal uses the current_stack property in the app metadata to display the correct stack +# This value should be one of: ['dotnet', 'dotnetcore', 'node', 'php', 'python', 'java'] +def get_current_stack_from_runtime(runtime): + language = runtime.split('|')[0].lower() + if language == 'aspnet': + return 'dotnet' + return language + + # if plan name not provided we need to get a plan name based on the OS, location & SKU def _determine_if_default_plan_to_use(cmd, plan_name, resource_group_name, loc, sku, create_rg): client = web_client_factory(cmd.cli_ctx) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index dfbc085bb4f..a96feec9003 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -68,6 +68,7 @@ def load_command_table(self, _): exception_handler=ex_handler_factory(creating_plan=True)) g.generic_update_command('update', custom_func_name='update_app_service_plan', setter_arg_name='app_service_plan', validator=validate_asp_sku, supports_no_wait=True) + g.custom_command('list', 'list_app_service_plans') with self.command_group('webapp') as g: g.custom_command('create', 'create_webapp', exception_handler=ex_handler_factory()) @@ -75,6 +76,9 @@ def load_command_table(self, _): validator=validate_app_or_slot_exists_in_rg) g.custom_command('up', 'webapp_up', exception_handler=ex_handler_factory()) + with self.command_group('webapp deployment source') as g: + g.custom_command('config-zip', 'enable_zip_deploy_webapp') + with self.command_group('functionapp') as g: g.custom_command('create', 'create_function', exception_handler=ex_handler_factory()) g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 13121fd211e..a82e7277647 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -28,13 +28,16 @@ from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient from azure.cli.core.util import get_az_user_agent +from azure.cli.core.azclierror import (ResourceNotFoundError, RequiredArgumentMissingError, ValidationError, + CLIInternalError, UnclassifiedUserFault, AzureResponseError, + ArgumentUsageError, MutuallyExclusiveArgumentError) from msrestazure.tools import is_valid_resource_id, parse_resource_id from six.moves.urllib.request import urlopen from ._constants import (FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION, FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION, - FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_VERSION_DEFAULT, + FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_VERSION_DEFAULT, NODE_EXACT_VERSION_DEFAULT, DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, KUBE_ASP_KIND, KUBE_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES, CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) @@ -42,9 +45,9 @@ from ._utils import (_normalize_sku, get_sku_name, validate_subnet_id, _generic_site_operation, _get_location_from_resource_group, validate_aks_id) from ._create_util import (zip_contents_from_dir, get_runtime_version_details, create_resource_group, get_app_details, - should_create_new_rg, set_location, does_app_already_exist, get_profile_username, + should_create_new_rg, set_location, get_site_availability, does_app_already_exist, get_profile_username, get_plan_to_use,get_kube_plan_to_use, get_lang_from_content, get_rg_to_use, get_sku_to_use, - detect_os_form_src) + detect_os_form_src, get_current_stack_from_runtime) from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory from .vsts_cd_provider import VstsContinuousDeliveryProvider @@ -107,6 +110,19 @@ def update_kube_environment(cmd, raise CLIError("Update is not yet supported for Kubernetes Environments.") +def list_app_service_plans(cmd, resource_group_name=None): + client = web_client_factory(cmd.cli_ctx) + if resource_group_name is None: + plans = list(client.app_service_plans.list(detailed=True)) # enables querying "numberOfSites" + else: + plans = list(client.app_service_plans.list_by_resource_group(resource_group_name)) + for plan in plans: + # prune a few useless fields + del plan.geo_region + del plan.subscription + return plans + + def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, app_service_environment=None, kube_environment=None, sku='B1', kube_sku=KUBE_DEFAULT_SKU, number_of_workers=None, location=None, tags=None, no_wait=False): @@ -115,20 +131,20 @@ def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, p sku = _normalize_sku(sku) _validate_asp_sku(app_service_environment, sku) if is_linux and hyper_v: - raise CLIError('usage error: --is-linux | --hyper-v') + raise MutuallyExclusiveArgumentError('Usage error: --is-linux and --hyper-v cannot be used together.') kind = None client = web_client_factory(cmd.cli_ctx) if app_service_environment: if hyper_v: - raise CLIError('Windows containers is not yet supported in app service environment') + raise ArgumentUsageError('Windows containers is not yet supported in app service environment') ase_id = _validate_app_service_environment_id(cmd.cli_ctx, app_service_environment, resource_group_name) ase_def = HostingEnvironmentProfile(id=ase_id) ase_list = client.app_service_environments.list() ase_found = False for ase in ase_list: - if ase.id.lower() == ase_id.lower(): + if ase.name.lower() == app_service_environment.lower() or ase.id.lower() == ase_id.lower(): location = ase.location ase_found = True break @@ -194,7 +210,7 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None, multicontainer_config_type=None, multicontainer_config_file=None, tags=None, - using_webapp_up=False, language=None, + using_webapp_up=False, language=None, assign_identities=None, role='Contributor', scope=None, min_worker_count=None, max_worker_count=None): SiteConfig, SkuDescription, Site, NameValuePair = cmd.get_models( 'SiteConfig', 'SkuDescription', 'Site', 'NameValuePair') @@ -210,13 +226,25 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi else: plan_info = client.app_service_plans.get(resource_group_name, plan) if not plan_info: - raise CLIError("The plan '{}' doesn't exist".format(plan)) + raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) is_linux = plan_info.reserved - node_default_version = NODE_VERSION_DEFAULT + node_default_version = NODE_EXACT_VERSION_DEFAULT location = plan_info.location # This is to keep the existing appsettings for a newly created webapp on existing webapp name. - name_validation = client.check_name_availability(name, 'Site') + name_validation = get_site_availability(cmd, name) if not name_validation.name_available: + if name_validation.reason == 'Invalid': + raise CLIError(name_validation.message) + logger.warning("Webapp '%s' already exists. The command will use the existing app's settings.", name) + app_details = get_app_details(cmd, name) + if app_details is None: + raise CLIError("Unable to retrieve details of the existing app '{}'. Please check that " + "the app is a part of the current subscription".format(name)) + current_rg = app_details.resource_group + if resource_group_name is not None and (resource_group_name.lower() != current_rg.lower()): + raise CLIError("The webapp '{}' exists in resource group '{}' and does not " + "match the value entered '{}'. Please re-run command with the " + "correct parameters.". format(name, current_rg, resource_group_name)) existing_app_settings = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'list_application_settings') settings = [] @@ -249,6 +277,8 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) helper = _StackRuntimeHelper(cmd, client, linux=(is_linux or is_kube)) + if runtime: + runtime = helper.remove_delimiters(runtime) if is_linux or is_kube: if not validate_container_app_create_options(runtime, deployment_container_image_name, @@ -274,7 +304,16 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi site_config.linux_fx_version = _format_fx_version(encoded_config_file, multicontainer_config_type) elif plan_info.is_xenon: # windows container webapp - site_config.windows_fx_version = _format_fx_version(deployment_container_image_name) + if deployment_container_image_name: + site_config.windows_fx_version = _format_fx_version(deployment_container_image_name) + # set the needed app settings for container image validation + if name_validation.name_available: + site_config.app_settings.append(NameValuePair(name="DOCKER_REGISTRY_SERVER_USERNAME", + value=docker_registry_server_user)) + site_config.app_settings.append(NameValuePair(name="DOCKER_REGISTRY_SERVER_PASSWORD", + value=docker_registry_server_password)) + site_config.app_settings.append(NameValuePair(name="DOCKER_REGISTRY_SERVER_URL", + value=docker_registry_server_url)) elif runtime: # windows webapp with runtime specified if any([startup_file, deployment_container_image_name, multicontainer_config_file, multicontainer_config_type]): @@ -283,15 +322,15 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi "only appliable on linux webapp") match = helper.resolve(runtime) if not match: - raise CLIError("Runtime '{}' is not supported. Please invoke 'list-runtimes' to cross check".format(runtime)) # pylint: disable=line-too-long + raise CLIError("Windows runtime '{}' is not supported. " + "Please invoke 'az webapp list-runtimes' to cross check".format(runtime)) match['setter'](cmd=cmd, stack=match, site_config=site_config) - # Be consistent with portal: any windows webapp should have this even it doesn't have node in the stack - if not match['displayName'].startswith('node'): - if name_validation.name_available: - site_config.app_settings.append(NameValuePair(name="WEBSITE_NODE_DEFAULT_VERSION", - value=node_default_version)) + + # portal uses the current_stack propety in metadata to display stack for windows apps + current_stack = get_current_stack_from_runtime(runtime) + else: # windows webapp without runtime specified - if name_validation.name_available: + if name_validation.name_available: # If creating new webapp site_config.app_settings.append(NameValuePair(name="WEBSITE_NODE_DEFAULT_VERSION", value=node_default_version)) @@ -314,6 +353,9 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi if is_kube: return webapp + if current_stack: + _update_webapp_current_stack_property_if_needed(cmd, resource_group_name, name, current_stack) + # Ensure SCC operations follow right after the 'create', no precedent appsetting update commands _set_remote_or_local_git(cmd, webapp, resource_group_name, name, deployment_source_url, deployment_source_branch, deployment_local_git) @@ -325,6 +367,11 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi deployment_container_image_name, docker_registry_server_user, docker_registry_server_password=docker_registry_server_password) + if assign_identities is not None: + identity = assign_identity(cmd, resource_group_name, name, assign_identities, + role, None, scope) + webapp.identity = identity + return webapp def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku=None, dryrun=False, logs=False, # pylint: disable=too-many-statements, @@ -502,12 +549,25 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku cmd.cli_ctx.config.set_value('defaults', 'web', name) return create_json + +def _update_webapp_current_stack_property_if_needed(cmd, resource_group, name, current_stack): + if not current_stack: + return + # portal uses this current_stack value to display correct runtime for windows webapps + client = web_client_factory(cmd.cli_ctx) + app_metadata = client.web_apps.list_metadata(resource_group, name) + if 'CURRENT_STACK' not in app_metadata.properties or app_metadata.properties["CURRENT_STACK"] != current_stack: + app_metadata.properties["CURRENT_STACK"] = current_stack + client.web_apps.update_metadata(resource_group, name, kind="app", properties=app_metadata.properties) + + def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): webapp = app_instance if not app_instance: # when the routine is invoked as a help method, not through commands webapp = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) if not webapp: raise CLIError("'{}' app doesn't exist".format(name)) + webapp.site_config = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get_configuration', slot) _rename_server_farm_props(webapp) # TODO: get rid of this conditional once the api's are implemented for kubapps @@ -940,17 +1000,30 @@ def update_site_configs(cmd, resource_group_name, name, slot=None, number_of_wor setattr(configs, arg, values[arg] if arg not in bool_flags else values[arg] == 'true') generic_configurations = generic_configurations or [] + + # https://github.com/Azure/azure-cli/issues/14857 + updating_ip_security_restrictions = False + result = {} for s in generic_configurations: try: - result.update(get_json_object(s)) + json_object = get_json_object(s) + for config_name in json_object: + if config_name.lower() == 'ip_security_restrictions': + updating_ip_security_restrictions = True + result.update(json_object) except CLIError: config_name, value = s.split('=', 1) result[config_name] = value for config_name, value in result.items(): + if config_name.lower() == 'ip_security_restrictions': + updating_ip_security_restrictions = True setattr(configs, config_name, value) + if not updating_ip_security_restrictions: + setattr(configs, 'ip_security_restrictions', None) + return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'update_configuration', slot, configs) @@ -1092,7 +1165,7 @@ def url_validator(url): return False -def list_publish_profiles(cmd, resource_group_name, name, slot=None): +def list_publish_profiles(cmd, resource_group_name, name, slot=None, xml=False): import xmltodict content = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, @@ -1101,20 +1174,22 @@ def list_publish_profiles(cmd, resource_group_name, name, slot=None): for f in content: full_xml += f.decode() - profiles = xmltodict.parse(full_xml, xml_attribs=True)['publishData']['publishProfile'] - converted = [] - - if type(profiles) is not list: - profiles = [profiles] + if not xml: + profiles = xmltodict.parse(full_xml, xml_attribs=True)['publishData']['publishProfile'] + converted = [] - for profile in profiles: - new = {} - for key in profile: - # strip the leading '@' xmltodict put in for attributes - new[key.lstrip('@')] = profile[key] - converted.append(new) + if type(profiles) is not list: + profiles = [profiles] - return converted + for profile in profiles: + new = {} + for key in profile: + # strip the leading '@' xmltodict put in for attributes + new[key.lstrip('@')] = profile[key] + converted.append(new) + return converted + cmd.cli_ctx.invocation.data['output'] = 'tsv' + return full_xml # private helpers @@ -1264,6 +1339,9 @@ def _validate_and_get_connection_string(cli_ctx, resource_group_name, storage_ac def _format_fx_version(custom_image_name, container_config_type=None): + lower_custom_image_name = custom_image_name.lower() + if "https://" in lower_custom_image_name or "http://" in lower_custom_image_name: + custom_image_name = lower_custom_image_name.replace("https://", "").replace("http://", "") fx_version = custom_image_name.strip() fx_version_lower = fx_version.lower() # handles case of only spaces @@ -1318,6 +1396,8 @@ def _get_acr_cred(cli_ctx, registry_name): def _add_fx_version(cmd, resource_group_name, name, custom_image_name, slot=None): fx_version = _format_fx_version(custom_image_name) web_app = get_webapp(cmd, resource_group_name, name, slot) + if not web_app: + raise CLIError("'{}' app doesn't exist in resource group {}".format(name, resource_group_name)) linux_fx = fx_version if web_app.reserved else None windows_fx = fx_version if web_app.is_xenon else None return update_site_configs(cmd, resource_group_name, name, @@ -1407,6 +1487,10 @@ def _rename_server_farm_props(webapp): return webapp +def enable_zip_deploy_webapp(cmd, resource_group_name, name, src, timeout=None, slot=None, is_kube=False): + return enable_zip_deploy(cmd, resource_group_name, name, src, timeout=timeout, slot=slot, is_kube=is_kube) + + def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=None, is_kube=False): logger.warning("Getting scm site credentials for zip deployment") user_name, password = _get_site_credential(cmd.cli_ctx, resource_group_name, name, slot) @@ -1427,6 +1511,7 @@ def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=No headers['Content-Type'] = 'application/octet-stream' headers['Cache-Control'] = 'no-cache' headers['User-Agent'] = get_az_user_agent() + import requests import os from azure.cli.core.util import should_disable_connection_verify @@ -1463,6 +1548,9 @@ def _get_scm_url(cmd, resource_group_name, name, slot=None): if host.host_type == HostType.repository: return "https://{}".format(host.name) + # this should not happen, but throw anyway + raise ValueError('Failed to retrieve Scm Uri') + def _get_site_credential(cli_ctx, resource_group_name, name, slot=None): creds = _generic_site_operation(cli_ctx, resource_group_name, name, 'list_publishing_credentials', slot) @@ -1529,6 +1617,18 @@ def __init__(self, cmd, client, linux=False): self._linux = linux self._stacks = [] + @staticmethod + def remove_delimiters(runtime): + import re + # delimiters allowed: '|', ':' + if '|' in runtime: + runtime = re.split('[|]', runtime) + elif ':' in runtime: + runtime = re.split('[:]', runtime) + else: + runtime = [runtime] + return '|'.join(filter(None, runtime)) + def resolve(self, display_name): self._load_stacks() return next((s for s in self._stacks if s['displayName'].lower() == display_name.lower()), @@ -1550,9 +1650,35 @@ def update_site_appsettings(cmd, stack, site_config): NameValuePair = cmd.get_models('NameValuePair') if site_config.app_settings is None: site_config.app_settings = [] - site_config.app_settings += [NameValuePair(name=k, value=v) for k, v in stack['configs'].items()] + + for k, v in stack['configs'].items(): + already_in_appsettings = False + for app_setting in site_config.app_settings: + if app_setting.name == k: + already_in_appsettings = True + app_setting.value = v + if not already_in_appsettings: + site_config.app_settings.append(NameValuePair(name=k, value=v)) return site_config + def _load_stacks_hardcoded(self): + if self._stacks: + return + result = [] + if self._linux: + result = get_file_json(RUNTIME_STACKS)['linux'] + for r in result: + r['setter'] = _StackRuntimeHelper.update_site_config + else: # Windows stacks + result = get_file_json(RUNTIME_STACKS)['windows'] + for r in result: + r['setter'] = (_StackRuntimeHelper.update_site_appsettings if 'node' in + r['displayName'] else _StackRuntimeHelper.update_site_config) + self._stacks = result + + # Currently using hardcoded values instead of this function. This function calls the stacks API; + # Stacks API is updated with Antares deployments, + # which are infrequent and don't line up with stacks EOL schedule. def _load_stacks(self): if self._stacks: return From bb83774ef96ca08fb0fa1e4f37ac5707f1d828da Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 30 Mar 2021 09:16:47 -0700 Subject: [PATCH 029/125] Bugfix: if ftp deployment profile doesn't exist, zip deploy fails --- src/appservice-kube/azext_appservice_kube/custom.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index a82e7277647..bac64bf994c 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -113,7 +113,7 @@ def update_kube_environment(cmd, def list_app_service_plans(cmd, resource_group_name=None): client = web_client_factory(cmd.cli_ctx) if resource_group_name is None: - plans = list(client.app_service_plans.list(detailed=True)) # enables querying "numberOfSites" + plans = list(client.app_service_plans.list()) else: plans = list(client.app_service_plans.list_by_resource_group(resource_group_name)) for plan in plans: @@ -1178,7 +1178,7 @@ def list_publish_profiles(cmd, resource_group_name, name, slot=None, xml=False): profiles = xmltodict.parse(full_xml, xml_attribs=True)['publishData']['publishProfile'] converted = [] - if type(profiles) is not list: + if not isinstance(profiles, list): profiles = [profiles] for profile in profiles: @@ -1593,9 +1593,12 @@ def _check_zip_deployment_status(cmd, rg_name, name, deployment_status_url, auth def _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot=None): profiles = list_publish_profiles(cmd, resource_group_name, name, slot) - url = next((p['publishUrl'] for p in profiles if p['publishMethod'] == 'FTP'), None) - if url: + try: + url = next((p['publishUrl'] for p in profiles if p['publishMethod'] == 'FTP'), None) setattr(webapp, 'ftpPublishingUrl', url) + except StopIteration as e: + pass + return webapp def _get_url(cmd, resource_group_name, name, slot=None): From bb3f860786ca7b220c68704ff894d9c4a0f5ad0c Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 30 Mar 2021 09:18:12 -0700 Subject: [PATCH 030/125] Bugfix: index.json had weird merge conflict --- src/index.json | 264 ------------------------------------------------- 1 file changed, 264 deletions(-) diff --git a/src/index.json b/src/index.json index 58ab3af4577..00ad8fdf22f 100644 --- a/src/index.json +++ b/src/index.json @@ -1197,272 +1197,8 @@ "summary": "Provides a preview for upcoming AKS features", "version": "0.4.47" }, -<<<<<<< HEAD "sha256Digest": "042b4acfecdc98059907abce1224c0865f1a61abd566fdc00e09a61436a52e27" }, -======= - "sha256Digest": "10fc3945a4c805617ee0e0de56112f35a50f769128e9d4829071682aa8db56a1" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.4-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.4-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.4" - }, - "sha256Digest": "743ab9c3aef88ccba22d5f61aa56cb6ed68feb885433d6c8f2b39c7f2e2d5d34" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.5-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.5-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.5" - }, - "sha256Digest": "4ce71979442759a7d3cfabdaafe4962556f0ab9130dee887f2938d888c5ee322" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.6-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.6-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.6" - }, - "sha256Digest": "2adaa4b4552cd8d32869969000ac07d12ee108a50c358c3081e76a2500a5aeec" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.7-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.7-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.7" - }, - "sha256Digest": "9070e0f440582c26148f4307b7752235c3f5034fe4fe56f82d13723c918afee6" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.8-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.8-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.8" - }, - "sha256Digest": "9530c1347525a91b62311a443e3df4d80f00e2cdb1d40e6326cbd90cf500cfea" - } - ], - "azure-batch-cli-extensions": [ ->>>>>>> 847cdac7... Adding version 0.1.4 { "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/aks_preview-0.4.49-py2.py3-none-any.whl", "filename": "aks_preview-0.4.49-py2.py3-none-any.whl", From b2293f63afb77a8c11dcfcf31d5e5e3508c93e3e Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 30 Mar 2021 09:22:53 -0700 Subject: [PATCH 031/125] Bugfix: webapp config container set wasn't setting --- src/appservice-kube/azext_appservice_kube/commands.py | 3 +++ src/appservice-kube/azext_appservice_kube/custom.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index a96feec9003..19628153d5b 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -76,6 +76,9 @@ def load_command_table(self, _): validator=validate_app_or_slot_exists_in_rg) g.custom_command('up', 'webapp_up', exception_handler=ex_handler_factory()) + with self.command_group('webapp config container') as g: + g.custom_command('set', 'update_container_settings') + with self.command_group('webapp deployment source') as g: g.custom_command('config-zip', 'enable_zip_deploy_webapp') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index bac64bf994c..f999b6c2940 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -1398,7 +1398,7 @@ def _add_fx_version(cmd, resource_group_name, name, custom_image_name, slot=None web_app = get_webapp(cmd, resource_group_name, name, slot) if not web_app: raise CLIError("'{}' app doesn't exist in resource group {}".format(name, resource_group_name)) - linux_fx = fx_version if web_app.reserved else None + linux_fx = fx_version if (web_app.reserved or not web_app.is_xenon) else None windows_fx = fx_version if web_app.is_xenon else None return update_site_configs(cmd, resource_group_name, name, linux_fx_version=linux_fx, windows_fx_version=windows_fx, slot=slot) From 5bd7f73623cb925691a56304e9a5175ac3b1664c Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 30 Mar 2021 17:24:36 -0700 Subject: [PATCH 032/125] Version 0.1.9 --- src/appservice-kube/HISTORY.rst | 5 + src/appservice-kube/setup.py | 2 +- src/index.json | 386 +++++++++++++++++--------------- 3 files changed, 215 insertions(+), 178 deletions(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index c4dfc5b6347..36e216e94c2 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.9 +++++++ +* Fix webapp zipdeploy command +* Fix webapp config container set command + 0.1.8 ++++++ * Remove azure-cli-core dependency diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 6845aba6d7b..e2b968905a7 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.8' +VERSION = '0.1.9' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 00ad8fdf22f..9025a67870e 100644 --- a/src/index.json +++ b/src/index.json @@ -3248,29 +3248,18 @@ "sha256Digest": "b1d5d31cfbd8a75595943d7248e585d63d0a1c6b43c69febbd7162239af98933" } ], - "arcappliance": [ + "appservice-kube": [ { - "downloadUrl": "https://arcplatformcliextprod.blob.core.windows.net/arcappliance/arcappliance-0.1.2-py2.py3-none-any.whl", - "filename": "arcappliance-0.1.2-py2.py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.0-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.0-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License" - ], "extensions": { "python.details": { "contacts": [ { - "email": "appliance@microsoft.com", + "email": "azpycli@microsoft.com", "name": "Microsoft Corporation", "role": "author" } @@ -3279,7 +3268,7 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://msazure.visualstudio.com/AzureArcPlatform/_git/arcappliance-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions" } } }, @@ -3287,23 +3276,22 @@ "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "arcappliance", + "name": "appservice-kube", "run_requires": [ { "requires": [ - "jsonschema (==3.2.0)", - "kubernetes (==11.0.0)" + "azure-cli-core" ] } ], - "summary": "Microsoft Azure Command-Line Tools Arcappliance Extension", - "version": "0.1.2" + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.0" }, - "sha256Digest": "80ef17a397fdd045850cbf7823c0eb8d7354290d409a095a5f708a1f837f2b09" + "sha256Digest": "a124af484f98d77e9f8bdb0b8944ab7bf9fec63b8ff94cddc3c2d20386116cda" }, { - "downloadUrl": "https://arcplatformcliextprod.blob.core.windows.net/arcappliance/arcappliance-0.1.3-py2.py3-none-any.whl", - "filename": "arcappliance-0.1.3-py2.py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.1-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.1-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67", @@ -3312,17 +3300,19 @@ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { "python.details": { "contacts": [ { - "email": "appliance@microsoft.com", + "email": "azpycli@microsoft.com", "name": "Microsoft Corporation", "role": "author" } @@ -3331,7 +3321,7 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://msazure.visualstudio.com/AzureArcPlatform/_git/arcappliance-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions" } } }, @@ -3339,37 +3329,36 @@ "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "arcappliance", + "name": "appservice-kube", "run_requires": [ { "requires": [ - "jsonschema (==3.2.0)", - "kubernetes (==11.0.0)" + "azure-cli-core" ] } ], - "summary": "Microsoft Azure Command-Line Tools Arcappliance Extension", - "version": "0.1.3" + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.1" }, - "sha256Digest": "926280c57deb20bdd570d53f6250f6b65a2e9708ba0dcf0734b654f5dc45ed44" - } - ], - "attestation": [ + "sha256Digest": "6e9184d7bc608aad51136528038c95a79dc8d4839c89716679a167fbf3d56784" + }, { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/attestation-0.1.0-py3-none-any.whl", - "filename": "attestation-0.1.0-py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.2-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.2-py2.py3-none-any.whl", "metadata": { - "azext.isExperimental": true, - "azext.minCliCoreVersion": "2.3.1", + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { @@ -3385,34 +3374,44 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/attestation" + "Home": "https://github.com/Azure/azure-cli-extensions" } } }, + "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "attestation", - "summary": "Microsoft Azure Command-Line Tools AttestationManagementClient Extension", - "version": "0.1.0" + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.2" }, - "sha256Digest": "1d4e9b832a3f50b33428d565478a2e655c81d49277c07dc909f1485b62ba5372" + "sha256Digest": "4d9fad5a646a414337cd261b2efd4eafd9c03923b8992312b9a32cab295e91e9" }, { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/attestation-0.2.0-py3-none-any.whl", - "filename": "attestation-0.2.0-py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.3-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.3-py2.py3-none-any.whl", "metadata": { - "azext.isExperimental": true, - "azext.minCliCoreVersion": "2.11.0", + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { @@ -3428,7 +3427,7 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/attestation" + "Home": "https://github.com/Azure/azure-cli-extensions" } } }, @@ -3436,36 +3435,36 @@ "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "attestation", + "name": "appservice-kube", "run_requires": [ { "requires": [ - "pyjwt (==1.7.1)" + "azure-cli-core" ] } ], - "summary": "Microsoft Azure Command-Line Tools AttestationManagementClient Extension", - "version": "0.2.0" + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.3" }, - "sha256Digest": "895328b45d8bcfe45e4937885572cd1f39d23bc49f88314713a462bf1a367cc9" - } - ], - "automation": [ + "sha256Digest": "10fc3945a4c805617ee0e0de56112f35a50f769128e9d4829071682aa8db56a1" + }, { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/automation-0.1.0-py3-none-any.whl", - "filename": "automation-0.1.0-py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.4-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.4-py2.py3-none-any.whl", "metadata": { - "azext.isExperimental": true, - "azext.minCliCoreVersion": "2.13.0", + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { @@ -3481,27 +3480,46 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/automation" + "Home": "https://github.com/Azure/azure-cli-extensions" } } }, + "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "automation", - "summary": "Microsoft Azure Command-Line Tools AutomationClient Extension", - "version": "0.1.0" + "name": "appservice-kube", + "run_requires": [ + { + "requires": [ + "azure-cli-core" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.4" }, - "sha256Digest": "779f996ffab9fd76438d8938216fcbeb6f9aecad3a23bd2097731182607e4d7a" - } - ], - "appservice-kube": [ + "sha256Digest": "743ab9c3aef88ccba22d5f61aa56cb6ed68feb885433d6c8f2b39c7f2e2d5d34" + }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.0-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.0-py2.py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.5-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.5-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], "extensions": { "python.details": { "contacts": [ @@ -3532,13 +3550,13 @@ } ], "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.0" + "version": "0.1.5" }, - "sha256Digest": "a124af484f98d77e9f8bdb0b8944ab7bf9fec63b8ff94cddc3c2d20386116cda" + "sha256Digest": "4ce71979442759a7d3cfabdaafe4962556f0ab9130dee887f2938d888c5ee322" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.1-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.1-py2.py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.6-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.6-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67", @@ -3585,13 +3603,13 @@ } ], "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.1" + "version": "0.1.6" }, - "sha256Digest": "6e9184d7bc608aad51136528038c95a79dc8d4839c89716679a167fbf3d56784" + "sha256Digest": "2adaa4b4552cd8d32869969000ac07d12ee108a50c358c3081e76a2500a5aeec" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.2-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.2-py2.py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.7-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.7-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67", @@ -3638,13 +3656,13 @@ } ], "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.2" + "version": "0.1.7" }, - "sha256Digest": "4d9fad5a646a414337cd261b2efd4eafd9c03923b8992312b9a32cab295e91e9" + "sha256Digest": "9070e0f440582c26148f4307b7752235c3f5034fe4fe56f82d13723c918afee6" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.3-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.3-py2.py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.8-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.8-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67", @@ -3678,26 +3696,52 @@ } } }, - "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.3" + "version": "0.1.8" }, - "sha256Digest": "10fc3945a4c805617ee0e0de56112f35a50f769128e9d4829071682aa8db56a1" + "sha256Digest": "9530c1347525a91b62311a443e3df4d80f00e2cdb1d40e6326cbd90cf500cfea" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.4-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.4-py2.py3-none-any.whl", + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.9-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.9-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.9" + }, + "sha256Digest": "42c94905f45cba8c36a110a23fb7f5aa66d401cf717169d317bd02250698b6df" + } + ], + "arcappliance": [ + { + "downloadUrl": "https://arcplatformcliextprod.blob.core.windows.net/arcappliance/arcappliance-0.1.2-py2.py3-none-any.whl", + "filename": "arcappliance-0.1.2-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67", @@ -3706,19 +3750,17 @@ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { "python.details": { "contacts": [ { - "email": "azpycli@microsoft.com", + "email": "appliance@microsoft.com", "name": "Microsoft Corporation", "role": "author" } @@ -3727,7 +3769,7 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://msazure.visualstudio.com/AzureArcPlatform/_git/arcappliance-cli-extensions" } } }, @@ -3735,22 +3777,23 @@ "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", + "name": "arcappliance", "run_requires": [ { "requires": [ - "azure-cli-core" + "jsonschema (==3.2.0)", + "kubernetes (==11.0.0)" ] } ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.4" + "summary": "Microsoft Azure Command-Line Tools Arcappliance Extension", + "version": "0.1.2" }, - "sha256Digest": "743ab9c3aef88ccba22d5f61aa56cb6ed68feb885433d6c8f2b39c7f2e2d5d34" + "sha256Digest": "80ef17a397fdd045850cbf7823c0eb8d7354290d409a095a5f708a1f837f2b09" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.5-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.5-py2.py3-none-any.whl", + "downloadUrl": "https://arcplatformcliextprod.blob.core.windows.net/arcappliance/arcappliance-0.1.3-py2.py3-none-any.whl", + "filename": "arcappliance-0.1.3-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67", @@ -3759,19 +3802,17 @@ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { "python.details": { "contacts": [ { - "email": "azpycli@microsoft.com", + "email": "appliance@microsoft.com", "name": "Microsoft Corporation", "role": "author" } @@ -3780,7 +3821,7 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://msazure.visualstudio.com/AzureArcPlatform/_git/arcappliance-cli-extensions" } } }, @@ -3788,36 +3829,37 @@ "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", + "name": "arcappliance", "run_requires": [ { "requires": [ - "azure-cli-core" + "jsonschema (==3.2.0)", + "kubernetes (==11.0.0)" ] } ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.5" + "summary": "Microsoft Azure Command-Line Tools Arcappliance Extension", + "version": "0.1.3" }, - "sha256Digest": "4ce71979442759a7d3cfabdaafe4962556f0ab9130dee887f2938d888c5ee322" - }, + "sha256Digest": "926280c57deb20bdd570d53f6250f6b65a2e9708ba0dcf0734b654f5dc45ed44" + } + ], + "attestation": [ { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.6-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.6-py2.py3-none-any.whl", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/attestation-0.1.0-py3-none-any.whl", + "filename": "attestation-0.1.0-py3-none-any.whl", "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.3.1", "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { @@ -3833,44 +3875,34 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/attestation" } } }, - "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.6" + "name": "attestation", + "summary": "Microsoft Azure Command-Line Tools AttestationManagementClient Extension", + "version": "0.1.0" }, - "sha256Digest": "2adaa4b4552cd8d32869969000ac07d12ee108a50c358c3081e76a2500a5aeec" + "sha256Digest": "1d4e9b832a3f50b33428d565478a2e655c81d49277c07dc909f1485b62ba5372" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.7-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.7-py2.py3-none-any.whl", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/attestation-0.2.0-py3-none-any.whl", + "filename": "attestation-0.2.0-py3-none-any.whl", "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.11.0", "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { @@ -3886,7 +3918,7 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/attestation" } } }, @@ -3894,36 +3926,36 @@ "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", + "name": "attestation", "run_requires": [ { "requires": [ - "azure-cli-core" + "pyjwt (==1.7.1)" ] } ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.7" + "summary": "Microsoft Azure Command-Line Tools AttestationManagementClient Extension", + "version": "0.2.0" }, - "sha256Digest": "9070e0f440582c26148f4307b7752235c3f5034fe4fe56f82d13723c918afee6" - }, + "sha256Digest": "895328b45d8bcfe45e4937885572cd1f39d23bc49f88314713a462bf1a367cc9" + } + ], + "automation": [ { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.8-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.8-py2.py3-none-any.whl", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/automation-0.1.0-py3-none-any.whl", + "filename": "automation-0.1.0-py3-none-any.whl", "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.13.0", "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License" ], "extensions": { @@ -3939,18 +3971,18 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/automation" } } }, "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.8" + "name": "automation", + "summary": "Microsoft Azure Command-Line Tools AutomationClient Extension", + "version": "0.1.0" }, - "sha256Digest": "9530c1347525a91b62311a443e3df4d80f00e2cdb1d40e6326cbd90cf500cfea" + "sha256Digest": "779f996ffab9fd76438d8938216fcbeb6f9aecad3a23bd2097731182607e4d7a" } ], "azure-batch-cli-extensions": [ From b83b2a2f870ca70855e42c98608f95ea6f648b4f Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 6 Apr 2021 08:31:57 -0700 Subject: [PATCH 033/125] Add functionapp config container set --- src/appservice-kube/azext_appservice_kube/commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 19628153d5b..9a14058f1a9 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -85,3 +85,6 @@ def load_command_table(self, _): with self.command_group('functionapp') as g: g.custom_command('create', 'create_function', exception_handler=ex_handler_factory()) g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output) + + with self.command_group('functionapp config container') as g: + g.custom_command('set', 'update_container_settings_functionapp') From db7a304f6e72afcdd7e20ace318a86e17bcee0aa Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 6 Apr 2021 08:47:32 -0700 Subject: [PATCH 034/125] Start referencing main cli --- .../azext_appservice_kube/custom.py | 512 ++---------------- 1 file changed, 31 insertions(+), 481 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index f999b6c2940..675ee4ce4ed 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -20,6 +20,37 @@ from knack.util import CLIError from knack.log import get_logger +from azure.cli.command_modules.appservice.custom import ( + list_webapp, + _rename_server_farm_props, + _generic_settings_operation, + _build_app_settings_output, + get_site_configs, + get_webapp, + _get_site_credential, + _mask_creds_related_appsettings, + _format_fx_version, + _get_extension_version_functionapp, + _validate_app_service_environment_id, + _validate_asp_sku, + _get_location_from_webapp, + validate_and_convert_to_int, + validate_range_of_int_flag, + get_app_settings, + get_app_insights_key, + _update_webapp_current_stack_property_if_needed, + validate_container_app_create_options, + parse_docker_image_name, + list_consumption_locations, + is_plan_elastic_premium, + enable_local_git, + _validate_and_get_connection_string, + _get_acr_cred, + _get_linux_multicontainer_encoded_config_from_file, + _filter_for_container_settings, + _get_url, + _StackRuntimeHelper) + from azure.cli.core.util import sdk_no_wait, shell_safe_json_parse, get_json_object, in_cloud_console from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands import LongRunningOperation @@ -550,17 +581,6 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku return create_json -def _update_webapp_current_stack_property_if_needed(cmd, resource_group, name, current_stack): - if not current_stack: - return - # portal uses this current_stack value to display correct runtime for windows webapps - client = web_client_factory(cmd.cli_ctx) - app_metadata = client.web_apps.list_metadata(resource_group, name) - if 'CURRENT_STACK' not in app_metadata.properties or app_metadata.properties["CURRENT_STACK"] != current_stack: - app_metadata.properties["CURRENT_STACK"] = current_stack - client.web_apps.update_metadata(resource_group, name, kind="app", properties=app_metadata.properties) - - def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): webapp = app_instance if not app_instance: # when the routine is invoked as a help method, not through commands @@ -829,46 +849,6 @@ def update_container_settings(cmd, resource_group_name, name, docker_registry_se slot=slot)) -def validate_container_app_create_options(runtime=None, deployment_container_image_name=None, - multicontainer_config_type=None, multicontainer_config_file=None): - if bool(multicontainer_config_type) != bool(multicontainer_config_file): - return False - opts = [runtime, deployment_container_image_name, multicontainer_config_type] - return len([x for x in opts if x]) == 1 # you can only specify one out the combinations - - -def parse_docker_image_name(deployment_container_image_name): - if not deployment_container_image_name: - return None - slash_ix = deployment_container_image_name.rfind('/') - docker_registry_server_url = deployment_container_image_name[0:slash_ix] - if slash_ix == -1 or ("." not in docker_registry_server_url and ":" not in docker_registry_server_url): - return None - return docker_registry_server_url - - -def list_consumption_locations(cmd): - client = web_client_factory(cmd.cli_ctx) - regions = client.list_geo_regions(sku='Dynamic') - return [{'name': x.name.lower().replace(' ', '')} for x in regions] - - -def is_plan_elastic_premium(cmd, plan_info): - SkuDescription, AppServicePlan = cmd.get_models('SkuDescription', 'AppServicePlan') - if isinstance(plan_info, AppServicePlan): - if isinstance(plan_info.sku, SkuDescription): - return plan_info.sku.tier == 'ElasticPremium' - return False - - -def get_app_insights_key(cli_ctx, resource_group, name): - appinsights_client = get_mgmt_service_client(cli_ctx, ApplicationInsightsManagementClient) - appinsights = appinsights_client.components.get(resource_group, name) - if appinsights is None or appinsights.instrumentation_key is None: - raise CLIError("App Insights {} under resource group {} was not found.".format(name, resource_group)) - return appinsights.instrumentation_key - - def try_create_application_insights(cmd, functionapp): creation_failed_warn = 'Unable to create the Application Insights for the Function App. ' \ 'Please use the Azure Portal to manually create and configure the Application Insights, ' \ @@ -950,13 +930,6 @@ def update_app_settings(cmd, resource_group_name, name, settings=None, slot=None return _build_app_settings_output(result.properties, app_settings_slot_cfg_names) -def get_app_settings(cmd, resource_group_name, name, slot=None): - result = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'list_application_settings', slot) - client = web_client_factory(cmd.cli_ctx) - slot_app_setting_names = client.web_apps.list_slot_configuration_names(resource_group_name, name).app_setting_names - return _build_app_settings_output(result.properties, slot_app_setting_names) - - # for any modifications to the non-optional parameters, adjust the reflection logic accordingly # in the method # pylint: disable=unused-argument @@ -1027,21 +1000,6 @@ def update_site_configs(cmd, resource_group_name, name, slot=None, number_of_wor return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'update_configuration', slot, configs) -def validate_range_of_int_flag(flag_name, value, min_val, max_val): - value = validate_and_convert_to_int(flag_name, value) - if min_val > value or value > max_val: - raise CLIError("Usage error: {} is expected to be between {} and {} (inclusive)".format(flag_name, min_val, - max_val)) - return value - - -def validate_and_convert_to_int(flag, val): - try: - return int(val) - except ValueError: - raise CLIError("Usage error: {} is expected to have an int value.".format(flag)) - - def delete_app_settings(cmd, resource_group_name, name, setting_names, slot=None): app_settings = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'list_application_settings', slot) client = web_client_factory(cmd.cli_ctx) @@ -1128,43 +1086,6 @@ def config_source_control(cmd, resource_group_name, name, repo_url, repository_t time.sleep(5) # retry in a moment -def list_webapp(cmd, resource_group_name=None): - result = _list_app(cmd.cli_ctx, resource_group_name) - return [r for r in result if 'function' not in r.kind] - - -def get_site_configs(cmd, resource_group_name, name, slot=None): - return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get_configuration', slot) - - -# for generic updater -def get_webapp(cmd, resource_group_name, name, slot=None): - return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) - - -def enable_local_git(cmd, resource_group_name, name, slot=None): - SiteConfigResource = cmd.get_models('SiteConfigResource') - client = web_client_factory(cmd.cli_ctx) - location = _get_location_from_webapp(client, resource_group_name, name) - site_config = SiteConfigResource(location=location) - site_config.scm_type = 'LocalGit' - if slot is None: - client.web_apps.create_or_update_configuration(resource_group_name, name, site_config) - else: - client.web_apps.create_or_update_configuration_slot(resource_group_name, name, - site_config, slot) - - return {'url': _get_local_git_url(cmd.cli_ctx, client, resource_group_name, name, slot)} - - -def url_validator(url): - try: - result = urlparse(url) - return all([result.scheme, result.netloc, result.path]) - except ValueError: - return False - - def list_publish_profiles(cmd, resource_group_name, name, slot=None, xml=False): import xmltodict @@ -1194,32 +1115,6 @@ def list_publish_profiles(cmd, resource_group_name, name, slot=None, xml=False): # private helpers -def _get_local_git_url(cli_ctx, client, resource_group_name, name, slot=None): - user = client.get_publishing_user() - result = _generic_site_operation(cli_ctx, resource_group_name, name, 'get_source_control', slot) - parsed = urlparse(result.repo_url) - return '{}://{}@{}/{}.git'.format(parsed.scheme, user.publishing_user_name, - parsed.netloc, name) - - -def _get_location_from_webapp(client, resource_group_name, webapp): - webapp = client.web_apps.get(resource_group_name, webapp) - if not webapp: - raise CLIError("'{}' app doesn't exist".format(webapp)) - return webapp.location - - -def _list_app(cli_ctx, resource_group_name=None): - client = web_client_factory(cli_ctx) - if resource_group_name: - result = list(client.web_apps.list_by_resource_group(resource_group_name)) - else: - result = list(client.web_apps.list()) - for webapp in result: - _rename_server_farm_props(webapp) - return result - - def _resolve_kube_environment_id(cli_ctx, kube_environment, resource_group_name): if is_valid_resource_id(kube_environment): return kube_environment @@ -1234,39 +1129,6 @@ def _resolve_kube_environment_id(cli_ctx, kube_environment, resource_group_name) name=kube_environment) -def _validate_asp_sku(app_service_environment, sku): - # Isolated SKU is supported only for ASE - if sku in ['I1', 'I2', 'I3']: - if not app_service_environment: - raise CLIError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " - "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") - else: - if app_service_environment: - raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " - "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") - - -def _validate_app_service_environment_id(cli_ctx, ase, resource_group_name): - ase_is_id = is_valid_resource_id(ase) - if ase_is_id: - return ase - - from msrestazure.tools import resource_id - from azure.cli.core.commands.client_factory import get_subscription_id - return resource_id( - subscription=get_subscription_id(cli_ctx), - resource_group=resource_group_name, - namespace='Microsoft.Web', - type='hostingEnvironments', - name=ase) - - -def _get_extension_version_functionapp(functions_version): - if functions_version is not None: - return '~{}'.format(functions_version) - return '~2' - - def _get_linux_fx_functionapp(functions_version, runtime, runtime_version): if runtime_version is None: runtime_version = FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION[functions_version][runtime] @@ -1299,62 +1161,6 @@ def _get_java_version_functionapp(functions_version, runtime_version): return runtime_version -def _validate_and_get_connection_string(cli_ctx, resource_group_name, storage_account): - sa_resource_group = resource_group_name - if is_valid_resource_id(storage_account): - sa_resource_group = parse_resource_id(storage_account)['resource_group'] - storage_account = parse_resource_id(storage_account)['name'] - storage_client = get_mgmt_service_client(cli_ctx, StorageManagementClient) - storage_properties = storage_client.storage_accounts.get_properties(sa_resource_group, - storage_account) - error_message = '' - endpoints = storage_properties.primary_endpoints - sku = storage_properties.sku.name - allowed_storage_types = ['Standard_GRS', 'Standard_RAGRS', 'Standard_LRS', 'Standard_ZRS', 'Premium_LRS'] - - for e in ['blob', 'queue', 'table']: - if not getattr(endpoints, e, None): - error_message = "Storage account '{}' has no '{}' endpoint. It must have table, queue, and blob endpoints all enabled".format(storage_account, e) # pylint: disable=line-too-long - if sku not in allowed_storage_types: - error_message += 'Storage type {} is not allowed'.format(sku) - - if error_message: - raise CLIError(error_message) - - obj = storage_client.storage_accounts.list_keys(sa_resource_group, storage_account) # pylint: disable=no-member - try: - keys = [obj.keys[0].value, obj.keys[1].value] # pylint: disable=no-member - except AttributeError: - # Older API versions have a slightly different structure - keys = [obj.key1, obj.key2] # pylint: disable=no-member - - endpoint_suffix = cli_ctx.cloud.suffixes.storage_endpoint - connection_string = 'DefaultEndpointsProtocol={};EndpointSuffix={};AccountName={};AccountKey={}'.format( - "https", - endpoint_suffix, - storage_account, - keys[0]) # pylint: disable=no-member - - return connection_string - - -def _format_fx_version(custom_image_name, container_config_type=None): - lower_custom_image_name = custom_image_name.lower() - if "https://" in lower_custom_image_name or "http://" in lower_custom_image_name: - custom_image_name = lower_custom_image_name.replace("https://", "").replace("http://", "") - fx_version = custom_image_name.strip() - fx_version_lower = fx_version.lower() - # handles case of only spaces - if fx_version: - if container_config_type: - fx_version = '{}|{}'.format(container_config_type, custom_image_name) - elif not fx_version_lower.startswith('docker|'): - fx_version = '{}|{}'.format('DOCKER', custom_image_name) - else: - fx_version = ' ' - return fx_version - - def _set_remote_or_local_git(cmd, webapp, resource_group_name, name, deployment_source_url=None, deployment_source_branch='master', deployment_local_git=None): if deployment_source_url: @@ -1372,27 +1178,6 @@ def _set_remote_or_local_git(cmd, webapp, resource_group_name, name, deployment_ setattr(webapp, 'deploymentLocalGitUrl', local_git_info['url']) -def _get_acr_cred(cli_ctx, registry_name): - from azure.mgmt.containerregistry import ContainerRegistryManagementClient - from azure.cli.core.commands.parameters import get_resources_in_subscription - client = get_mgmt_service_client(cli_ctx, ContainerRegistryManagementClient).registries - - result = get_resources_in_subscription(cli_ctx, 'Microsoft.ContainerRegistry/registries') - result = [item for item in result if item.name.lower() == registry_name] - if not result or len(result) > 1: - raise CLIError("No resource or more than one were found with name '{}'.".format(registry_name)) - resource_group_name = parse_resource_id(result[0].id)['resource_group'] - - registry = client.get(resource_group_name, registry_name) - - if registry.admin_user_enabled: # pylint: disable=no-member - cred = client.list_credentials(resource_group_name, registry_name) - return cred.username, cred.passwords[0].value - raise CLIError("Failed to retrieve container registry credentials. Please either provide the " - "credentials or run 'az acr update -n {} --admin-enabled true' to enable " - "admin first.".format(registry_name)) - - def _add_fx_version(cmd, resource_group_name, name, custom_image_name, slot=None): fx_version = _format_fx_version(custom_image_name) web_app = get_webapp(cmd, resource_group_name, name, slot) @@ -1404,89 +1189,6 @@ def _add_fx_version(cmd, resource_group_name, name, custom_image_name, slot=None linux_fx_version=linux_fx, windows_fx_version=windows_fx, slot=slot) -def _get_fx_version(cmd, resource_group_name, name, slot=None): - site_config = get_site_configs(cmd, resource_group_name, name, slot) - return site_config.linux_fx_version or site_config.windows_fx_version or '' - - -def _ssl_context(): - if sys.version_info < (3, 4) or (in_cloud_console() and platform.system() == 'Windows'): - try: - return ssl.SSLContext(ssl.PROTOCOL_TLS) # added in python 2.7.13 and 3.6 - except AttributeError: - return ssl.SSLContext(ssl.PROTOCOL_TLSv1) - - return ssl.create_default_context() - - -def _get_linux_multicontainer_encoded_config_from_file(file_name): - from base64 import b64encode - config_file_bytes = None - if url_validator(file_name): - response = urlopen(file_name, context=_ssl_context()) - config_file_bytes = response.read() - else: - with open(file_name, 'rb') as f: - config_file_bytes = f.read() - # Decode base64 encoded byte array into string - return b64encode(config_file_bytes).decode('utf-8') - - -def _get_linux_multicontainer_decoded_config(cmd, resource_group_name, name, slot=None): - from base64 import b64decode - linux_fx_version = _get_fx_version(cmd, resource_group_name, name, slot) - if not any([linux_fx_version.startswith(s) for s in MULTI_CONTAINER_TYPES]): - raise CLIError("Cannot decode config that is not one of the" - " following types: {}".format(','.join(MULTI_CONTAINER_TYPES))) - return b64decode(linux_fx_version.split('|')[1].encode('utf-8')) - - -# TODO: remove this when #3660(service tracking issue) is resolved -def _mask_creds_related_appsettings(settings): - for x in [x1 for x1 in settings if x1 in APPSETTINGS_TO_MASK]: - settings[x] = None - return settings - - -def _filter_for_container_settings(cmd, resource_group_name, name, settings, - show_multicontainer_config=None, slot=None): - result = [x for x in settings if x['name'] in CONTAINER_APPSETTING_NAMES] - fx_version = _get_fx_version(cmd, resource_group_name, name, slot).strip() - if fx_version: - added_image_name = {'name': 'DOCKER_CUSTOM_IMAGE_NAME', - 'value': fx_version} - result.append(added_image_name) - if show_multicontainer_config: - decoded_value = _get_linux_multicontainer_decoded_config(cmd, resource_group_name, name, slot) - decoded_image_name = {'name': 'DOCKER_CUSTOM_IMAGE_NAME_DECODED', - 'value': decoded_value} - result.append(decoded_image_name) - return result - - -def _generic_settings_operation(cli_ctx, resource_group_name, name, operation_name, - setting_properties, slot=None, client=None): - client = client or web_client_factory(cli_ctx) - operation = getattr(client.web_apps, operation_name if slot is None else operation_name + '_slot') - if slot is None: - return operation(resource_group_name, name, str, setting_properties) - - return operation(resource_group_name, name, slot, str, setting_properties) - - -def _build_app_settings_output(app_settings, slot_cfg_names): - slot_cfg_names = slot_cfg_names or [] - return [{'name': p, - 'value': app_settings[p], - 'slotSetting': p in slot_cfg_names} for p in _mask_creds_related_appsettings(app_settings)] - -def _rename_server_farm_props(webapp): - # Should be renamed in SDK in a future release - setattr(webapp, 'app_service_plan_id', webapp.server_farm_id) - del webapp.server_farm_id - return webapp - - def enable_zip_deploy_webapp(cmd, resource_group_name, name, src, timeout=None, slot=None, is_kube=False): return enable_zip_deploy(cmd, resource_group_name, name, src, timeout=timeout, slot=slot, is_kube=is_kube) @@ -1552,12 +1254,6 @@ def _get_scm_url(cmd, resource_group_name, name, slot=None): raise ValueError('Failed to retrieve Scm Uri') -def _get_site_credential(cli_ctx, resource_group_name, name, slot=None): - creds = _generic_site_operation(cli_ctx, resource_group_name, name, 'list_publishing_credentials', slot) - creds = creds.result() - return (creds.publishing_user_name, creds.publishing_password) - - def _check_zip_deployment_status(cmd, rg_name, name, deployment_status_url, authorization, timeout=None): import requests from azure.cli.core.util import should_disable_connection_verify @@ -1601,152 +1297,6 @@ def _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot=None): return webapp -def _get_url(cmd, resource_group_name, name, slot=None): - SslState = cmd.get_models('SslState') - site = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) - if not site: - raise CLIError("'{}' app doesn't exist".format(name)) - url = site.enabled_host_names[0] # picks the custom domain URL incase a domain is assigned - ssl_host = next((h for h in site.host_name_ssl_states - if h.ssl_state != SslState.disabled), None) - return ('https' if ssl_host else 'http') + '://' + url - -# help class handles runtime stack in format like 'node|6.1', 'php|5.5' -class _StackRuntimeHelper(object): - - def __init__(self, cmd, client, linux=False): - self._cmd = cmd - self._client = client - self._linux = linux - self._stacks = [] - - @staticmethod - def remove_delimiters(runtime): - import re - # delimiters allowed: '|', ':' - if '|' in runtime: - runtime = re.split('[|]', runtime) - elif ':' in runtime: - runtime = re.split('[:]', runtime) - else: - runtime = [runtime] - return '|'.join(filter(None, runtime)) - - def resolve(self, display_name): - self._load_stacks() - return next((s for s in self._stacks if s['displayName'].lower() == display_name.lower()), - None) - - @property - def stacks(self): - self._load_stacks() - return self._stacks - - @staticmethod - def update_site_config(stack, site_config, cmd=None): - for k, v in stack['configs'].items(): - setattr(site_config, k, v) - return site_config - - @staticmethod - def update_site_appsettings(cmd, stack, site_config): - NameValuePair = cmd.get_models('NameValuePair') - if site_config.app_settings is None: - site_config.app_settings = [] - - for k, v in stack['configs'].items(): - already_in_appsettings = False - for app_setting in site_config.app_settings: - if app_setting.name == k: - already_in_appsettings = True - app_setting.value = v - if not already_in_appsettings: - site_config.app_settings.append(NameValuePair(name=k, value=v)) - return site_config - - def _load_stacks_hardcoded(self): - if self._stacks: - return - result = [] - if self._linux: - result = get_file_json(RUNTIME_STACKS)['linux'] - for r in result: - r['setter'] = _StackRuntimeHelper.update_site_config - else: # Windows stacks - result = get_file_json(RUNTIME_STACKS)['windows'] - for r in result: - r['setter'] = (_StackRuntimeHelper.update_site_appsettings if 'node' in - r['displayName'] else _StackRuntimeHelper.update_site_config) - self._stacks = result - - # Currently using hardcoded values instead of this function. This function calls the stacks API; - # Stacks API is updated with Antares deployments, - # which are infrequent and don't line up with stacks EOL schedule. - def _load_stacks(self): - if self._stacks: - return - os_type = ('Linux' if self._linux else 'Windows') - raw_stacks = self._client.provider.get_available_stacks(os_type_selected=os_type, raw=True) - bytes_value = raw_stacks._get_next().content # pylint: disable=protected-access - json_value = bytes_value.decode('utf8') - json_stacks = json.loads(json_value) - stacks = json_stacks['value'] - result = [] - if self._linux: - for properties in [(s['properties']) for s in stacks]: - for major in properties['majorVersions']: - default_minor = next((m for m in (major['minorVersions'] or []) if m['isDefault']), - None) - result.append({ - 'displayName': (default_minor['runtimeVersion'] - if default_minor else major['runtimeVersion']) - }) - else: # Windows stacks - config_mappings = { - 'node': 'WEBSITE_NODE_DEFAULT_VERSION', - 'python': 'python_version', - 'php': 'php_version', - 'aspnet': 'net_framework_version' - } - - # get all stack version except 'java' - for stack in stacks: - if stack['name'] not in config_mappings: - continue - name, properties = stack['name'], stack['properties'] - for major in properties['majorVersions']: - default_minor = next((m for m in (major['minorVersions'] or []) if m['isDefault']), - None) - result.append({ - 'displayName': name + '|' + major['displayVersion'], - 'configs': { - config_mappings[name]: (default_minor['runtimeVersion'] - if default_minor else major['runtimeVersion']) - } - }) - - # deal with java, which pairs with java container version - java_stack = next((s for s in stacks if s['name'] == 'java')) - java_container_stack = next((s for s in stacks if s['name'] == 'javaContainers')) - for java_version in java_stack['properties']['majorVersions']: - for fx in java_container_stack['properties']['frameworks']: - for fx_version in fx['majorVersions']: - result.append({ - 'displayName': 'java|{}|{}|{}'.format(java_version['displayVersion'], - fx['display'], - fx_version['displayVersion']), - 'configs': { - 'java_version': java_version['runtimeVersion'], - 'java_container': fx['name'], - 'java_container_version': fx_version['runtimeVersion'] - } - }) - - for r in result: - r['setter'] = (_StackRuntimeHelper.update_site_appsettings if 'node' in - r['displayName'] else _StackRuntimeHelper.update_site_config) - self._stacks = result - class DockerHelper: def docker_login(self, registryName, userName, password): From 3bf52156a53d82fa77edb919b81f3df2fcf01521 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 6 Apr 2021 11:24:23 -0700 Subject: [PATCH 035/125] Functionapp deployment source config-zip command fix (copy over from main CLI for now) --- .../azext_appservice_kube/commands.py | 3 + .../azext_appservice_kube/custom.py | 169 +++++++++++++++++- 2 files changed, 171 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 9a14058f1a9..af093f4f34c 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -88,3 +88,6 @@ def load_command_table(self, _): with self.command_group('functionapp config container') as g: g.custom_command('set', 'update_container_settings_functionapp') + + with self.command_group('functionapp deployment source') as g: + g.custom_command('config-zip', 'enable_zip_deploy_functionapp') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 675ee4ce4ed..a3349589aa3 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -49,7 +49,11 @@ _get_linux_multicontainer_encoded_config_from_file, _filter_for_container_settings, _get_url, - _StackRuntimeHelper) + _StackRuntimeHelper, + upload_zip_to_storage, + is_plan_consumption) + +from azure.cli.command_modules.appservice.utils import retryable_method from azure.cli.core.util import sdk_no_wait, shell_safe_json_parse, get_json_object, in_cloud_console from azure.cli.core.commands.client_factory import get_mgmt_service_client @@ -1189,6 +1193,169 @@ def _add_fx_version(cmd, resource_group_name, name, custom_image_name, slot=None linux_fx_version=linux_fx, windows_fx_version=windows_fx, slot=slot) +@retryable_method(3, 5) +def _get_app_settings_from_scm(cmd, resource_group_name, name, slot=None): + scm_url = _get_scm_url(cmd, resource_group_name, name, slot) + settings_url = '{}/api/settings'.format(scm_url) + username, password = _get_site_credential(cmd.cli_ctx, resource_group_name, name, slot) + headers = { + 'Content-Type': 'application/octet-stream', + 'Cache-Control': 'no-cache', + 'User-Agent': get_az_user_agent() + } + + import requests + response = requests.get(settings_url, headers=headers, auth=(username, password), timeout=3) + + return response.json() or {} + + +# Check if the app setting is propagated to the Kudu site correctly by calling api/settings endpoint +# should_have [] is a list of app settings which are expected to be set +# should_not_have [] is a list of app settings which are expected to be absent +# should_contain {} is a dictionary of app settings which are expected to be set with precise values +# Return True if validation succeeded +def validate_app_settings_in_scm(cmd, resource_group_name, name, slot=None, + should_have=None, should_not_have=None, should_contain=None): + scm_settings = _get_app_settings_from_scm(cmd, resource_group_name, name, slot) + scm_setting_keys = set(scm_settings.keys()) + + if should_have and not set(should_have).issubset(scm_setting_keys): + return False + + if should_not_have and set(should_not_have).intersection(scm_setting_keys): + return False + + temp_setting = scm_settings.copy() + temp_setting.update(should_contain or {}) + if temp_setting != scm_settings: + return False + + return True + + +def remove_remote_build_app_settings(cmd, resource_group_name, name, slot): + settings = get_app_settings(cmd, resource_group_name, name, slot) + scm_do_build_during_deployment = None + + app_settings_should_contain = {} + + for keyval in settings: + value = keyval['value'].lower() + if keyval['name'] == 'SCM_DO_BUILD_DURING_DEPLOYMENT': + scm_do_build_during_deployment = value in ('true', '1') + + if scm_do_build_during_deployment is not False: + logger.warning("Setting SCM_DO_BUILD_DURING_DEPLOYMENT to false") + update_app_settings(cmd, resource_group_name, name, [ + "SCM_DO_BUILD_DURING_DEPLOYMENT=false" + ], slot) + app_settings_should_contain['SCM_DO_BUILD_DURING_DEPLOYMENT'] = 'false' + + # Wait for scm site to get the latest app settings + if app_settings_should_contain: + logger.warning("Waiting SCM site to be updated with the latest app settings") + scm_is_up_to_date = False + retries = 10 + while not scm_is_up_to_date and retries >= 0: + scm_is_up_to_date = validate_app_settings_in_scm( + cmd, resource_group_name, name, slot, + should_contain=app_settings_should_contain) + retries -= 1 + time.sleep(5) + + if retries < 0: + logger.warning("App settings may not be propagated to the SCM site") + + +def add_remote_build_app_settings(cmd, resource_group_name, name, slot): + settings = get_app_settings(cmd, resource_group_name, name, slot) + scm_do_build_during_deployment = None + website_run_from_package = None + enable_oryx_build = None + + app_settings_should_not_have = [] + app_settings_should_contain = {} + + for keyval in settings: + value = keyval['value'].lower() + if keyval['name'] == 'SCM_DO_BUILD_DURING_DEPLOYMENT': + scm_do_build_during_deployment = value in ('true', '1') + if keyval['name'] == 'WEBSITE_RUN_FROM_PACKAGE': + website_run_from_package = value + if keyval['name'] == 'ENABLE_ORYX_BUILD': + enable_oryx_build = value + + if scm_do_build_during_deployment is not True: + logger.warning("Setting SCM_DO_BUILD_DURING_DEPLOYMENT to true") + update_app_settings(cmd, resource_group_name, name, [ + "SCM_DO_BUILD_DURING_DEPLOYMENT=true" + ], slot) + app_settings_should_contain['SCM_DO_BUILD_DURING_DEPLOYMENT'] = 'true' + + if website_run_from_package: + logger.warning("Removing WEBSITE_RUN_FROM_PACKAGE app setting") + delete_app_settings(cmd, resource_group_name, name, [ + "WEBSITE_RUN_FROM_PACKAGE" + ], slot) + app_settings_should_not_have.append('WEBSITE_RUN_FROM_PACKAGE') + + if enable_oryx_build: + logger.warning("Removing ENABLE_ORYX_BUILD app setting") + delete_app_settings(cmd, resource_group_name, name, [ + "ENABLE_ORYX_BUILD" + ], slot) + app_settings_should_not_have.append('ENABLE_ORYX_BUILD') + + # Wait for scm site to get the latest app settings + if app_settings_should_not_have or app_settings_should_contain: + logger.warning("Waiting SCM site to be updated with the latest app settings") + scm_is_up_to_date = False + retries = 10 + while not scm_is_up_to_date and retries >= 0: + scm_is_up_to_date = validate_app_settings_in_scm( + cmd, resource_group_name, name, slot, + should_contain=app_settings_should_contain, + should_not_have=app_settings_should_not_have) + retries -= 1 + time.sleep(5) + + if retries < 0: + logger.warning("App settings may not be propagated to the SCM site.") + + +def enable_zip_deploy_functionapp(cmd, resource_group_name, name, src, build_remote=False, timeout=None, slot=None): + client = web_client_factory(cmd.cli_ctx) + app = client.web_apps.get(resource_group_name, name) + if app is None: + raise CLIError('The function app \'{}\' was not found in resource group \'{}\'. ' + 'Please make sure these values are correct.'.format(name, resource_group_name)) + parse_plan_id = parse_resource_id(app.server_farm_id) + plan_info = None + retry_delay = 10 # seconds + # We need to retry getting the plan because sometimes if the plan is created as part of function app, + # it can take a couple of tries before it gets the plan + for _ in range(5): + plan_info = client.app_service_plans.get(parse_plan_id['resource_group'], + parse_plan_id['name']) + if plan_info is not None: + break + time.sleep(retry_delay) + + if build_remote and not app.reserved: + raise CLIError('Remote build is only available on Linux function apps') + + is_consumption = is_plan_consumption(cmd, plan_info) + if (not build_remote) and is_consumption and app.reserved: + return upload_zip_to_storage(cmd, resource_group_name, name, src, slot) + if build_remote: + add_remote_build_app_settings(cmd, resource_group_name, name, slot) + else: + remove_remote_build_app_settings(cmd, resource_group_name, name, slot) + + return enable_zip_deploy(cmd, resource_group_name, name, src, timeout, slot) + + def enable_zip_deploy_webapp(cmd, resource_group_name, name, src, timeout=None, slot=None, is_kube=False): return enable_zip_deploy(cmd, resource_group_name, name, src, timeout=timeout, slot=slot, is_kube=is_kube) From 6ead0730b83f9f83724c7d8445945cd781c327a7 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Thu, 8 Apr 2021 17:43:48 -0700 Subject: [PATCH 036/125] Functions CLI should not pull docker image --- .../azext_appservice_kube/custom.py | 130 ------------------ 1 file changed, 130 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index a3349589aa3..10ba8017e1f 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -729,8 +729,6 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, value=deployment_container_image_name)) site_config.app_settings.append(NameValuePair(name='FUNCTION_APP_EDIT_MODE', value='readOnly')) site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) - function_triggers_json = retrieve_update_function_triggers(deployment_container_image_name, site_config, docker_registry_server_user, docker_registry_server_password) - site_config.app_settings.append(NameValuePair(name='K8SE_FUNCTIONS_TRIGGERS', value=function_triggers_json)) site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) if docker_registry_server_user is not None and docker_registry_server_password is not None: site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) @@ -1463,131 +1461,3 @@ def _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot=None): pass return webapp - - -class DockerHelper: - def docker_login(self, registryName, userName, password): - command = ["docker", "login", registryName, "-u", userName, "-p", password] - popen = self.run_command(command) - error = popen.stderr.read().decode("utf-8") - if error != "" and not error.startswith("WARNING!"): - error = error.replace("\n", "") - raise CLIError("An error occurred logging to image registry :" + registryName +", error:\n" + error) - - def pull_container_image(self, containerImage): - command = ["docker", "pull", containerImage] - popen = self.run_command(command) - error = popen.stderr.read().decode("utf-8") - if error != "": - error = error.replace("\n", "") - raise CLIError("An error occurred pulling image :" + containerImage +", error:\n" + error) - else: - logger.info("Pulled image " + containerImage) - - def run_container(self, containerImage, entryPoint=None): - command = ["docker", "run", "-d"] - if entryPoint is not None: - command = ["docker", "run", "--rm", "-d", "-it", "--entrypoint", entryPoint] - command.append(containerImage) - popen = self.run_command(command) - error = popen.stderr.read().decode("utf-8") - if error != "": - error = error.replace("\n", "") - raise CLIError("An error occurred trying to run container image:" + containerImage +", error:\n" + error) - else: - cont_id = popen.stdout.readline().decode("utf-8") - cont_id = cont_id.replace("\n", "") - logger.info(('The new container id: %s' % (cont_id))) - return cont_id - - def exec_container(self, containerId, args): - command = ["docker", "exec", "-t", containerId] - if not args: - command = ["docker", "exec", "-t", containerId, "/bin/sh"] - else: - command.extend(args) - popen = self.run_command(command) - error = popen.stderr.read().decode("utf-8") - if error != "": - error = error.replace("\n", "") - raise CLIError("An error occurred executing container :" + containerId +", error:\n" + error) - else: - result = popen.stdout.read().decode("utf-8") - return result - - def copy_file_folder_to_container(self, containerid, source, destination): - command = ["docker", "cp", source, containerid + ":" + destination] - popen = self.run_command(command) - error = popen.stderr.read().decode("utf-8") - if error != "": - error = error.replace("\n", "") - raise CLIError("An error occurred copying get function json shell script file %s to container :" + containerid +", error:\n" + error % (source)) - - def remove_container(self, containerName): - command = ["docker", "rm", "-f", containerName] - popen = self.run_command(command) - error = popen.stderr.read().decode("utf-8") - if error != "": - error = error.replace("\n", "") - raise CLIError("An error occurred removing image :" + containerName +", error:\n" + error) - logger.info(('The container %s has been removed' % (containerName))) - - def remove_image(self, imageName): - command = ["docker", "image", "rm", "-f", imageName] - popen = self.run_command(command) - error = popen.stderr.read().decode("utf-8") - if error != "": - error = error.replace("\n", "") - raise CLIError("An error occurred removing image :" + imageName +", error:\n" + error) - logger.info("The image %s has been successfully removed" % (imageName)) - - def run_command(self, command): - debugcommand = " - {0}".format(" ".join(command)) - logger.info("Executing docker command => " + debugcommand) - openedProcess = subprocess.Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE) - openedProcess.wait(500) - return openedProcess - - -def retrieve_update_function_triggers(container_image_name, - site_config, - docker_registry_user_name=None, - docker_registry_password=None): - image_registry_url = parse_docker_image_name(container_image_name) - dockerHelper = DockerHelper() - if docker_registry_user_name is not None and docker_registry_password is not None: - dockerHelper.docker_login(image_registry_url, docker_registry_user_name, docker_registry_password) - - dockerHelper.pull_container_image(container_image_name) - container_id = dockerHelper.run_container(container_image_name, "/bin/sh") - - #copy the getfunctionsjson.sh in the function image container - dir_path = os.path.dirname(os.path.realpath(__file__)) - get_function_sh_script_file_path = os.path.join(dir_path, "getfunctionsjson.sh") - if os.path.exists(get_function_sh_script_file_path) == False: - get_function_sh_script_file_path = os.path.join(dir_path, "..", "bin", "getfunctionsjson.sh") - - try: - tmp_dir = tempfile.mkdtemp() - temp_filename = "getfunctionsjson.sh" - temp_file_path = os.path.join(tmp_dir, temp_filename) - - with open(get_function_sh_script_file_path, 'rb') as open_file: - content = open_file.read() - content = content.replace(b'\r\n', b'\n') - - with open(temp_file_path, 'wb') as open_file: - open_file.write(content) - - dockerHelper.copy_file_folder_to_container(container_id, temp_file_path, '/getfunctionsjson.sh') - dockerHelper.exec_container(container_id, ["chmod", "+x", "/getfunctionsjson.sh"]) - functionJson = dockerHelper.exec_container(container_id, ["/getfunctionsjson.sh"]) - functionJson = functionJson.replace("\r", "").replace("\n", "").replace(" ", "").replace(",}}", "}}") - json.loads(functionJson) - except ValueError as e: - raise CLIError('No function in the image: ' + container_image_name + ' ,functionjson: ' + functionJson + ' ,error: ' + e.__doc__) - finally: - shutil.rmtree(tmp_dir) - dockerHelper.remove_container(container_id) - dockerHelper.remove_image(container_image_name) - return functionJson From 6ee2fb576549a6a362b200bcfca2574758e073ab Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 9 Apr 2021 19:41:40 -0700 Subject: [PATCH 037/125] Plan creation should drop --kube-environment and --kube-sku --- .../azext_appservice_kube/_constants.py | 1 + .../azext_appservice_kube/_params.py | 16 ++-- .../azext_appservice_kube/_utils.py | 3 + .../azext_appservice_kube/_validators.py | 2 +- .../azext_appservice_kube/commands.py | 2 +- .../azext_appservice_kube/custom.py | 74 ++++++++++++++++--- 6 files changed, 79 insertions(+), 19 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py index 3d5ec27ece4..0fb7976ed4f 100644 --- a/src/appservice-kube/azext_appservice_kube/_constants.py +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -5,6 +5,7 @@ KUBE_DEFAULT_SKU = "ANY" +KUBE_SKUS = ['ANY', 'ELASTICANY'] KUBE_ASP_KIND = "K8SE" KUBE_APP_KIND = "kubeapp" diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 6f94e5c638d..7ef0463877b 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -20,8 +20,8 @@ def load_arguments(self, _): # pylint: disable=too-many-statements # pylint: disable=line-too-long name_arg_type = CLIArgumentType(options_list=['--name', '-n'], metavar='NAME') - sku_arg_type = CLIArgumentType(help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large)', - arg_type=get_enum_type(['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3'])) + sku_arg_type = CLIArgumentType(help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), Any, ElasticAny', + arg_type=get_enum_type(['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'ANY', 'ELASTICANY'])) webapp_name_arg_type = CLIArgumentType(configured_default='web', options_list=['--name', '-n'], metavar='NAME', completer=get_resource_name_completion_list('Microsoft.Web/sites'), id_part='name', help="name of the web app. You can configure the default using `az configure --defaults web=`") @@ -65,6 +65,7 @@ def load_arguments(self, _): c.ignore('language') c.ignore('using_webapp_up') + ''' with self.argument_context('webapp up') as c: c.argument('name', arg_type=webapp_name_arg_type) c.argument('plan', options_list=['--plan', '-p'], configured_default='appserviceplan', @@ -77,6 +78,7 @@ def load_arguments(self, _): c.argument('logs', help="Configure default logging required to enable viewing log stream immediately after launching the webapp", default=False, action='store_true') c.argument('html', help="Ignore app detection and deploy as an html app", default=False, action='store_true') c.argument('environment', help="Name of the kube environment, if app is to be deployed to a k8 cluster", options_list=['--environment', '-e']) + ''' with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) @@ -135,8 +137,9 @@ def load_arguments(self, _): validator=validate_asp_create) c.argument('app_service_environment', options_list=['--app-service-environment', '-e'], help="Name or ID of the app service environment") - c.argument('kube_environment', options_list=['--kube-environment', '-k'], help='Name or ID of the kubernetes environment', is_preview=True) - c.argument('sku', arg_type=sku_arg_type) + c.argument('custom_location', options_list=['--custom-location', '-c'], help="ID of the custom location") + c.argument('sku', + help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), Any, ElasticAny') c.argument('kube_sku', required=False, help='VM size or ANY', default=KUBE_DEFAULT_SKU, completer=get_kube_sku_completion_list, is_preview=True) c.argument('is_linux', action='store_true', required=False, help='host web app on Linux worker') c.argument('hyper_v', action='store_true', required=False, help='Host web app on Windows container', is_preview=True) @@ -147,8 +150,9 @@ def load_arguments(self, _): c.argument('tags', arg_type=tags_type) with self.argument_context('appservice plan update') as c: - c.argument('sku', arg_type=sku_arg_type) - c.argument('kube_sku', required=False, help='VM size or ANY', completer=get_kube_sku_completion_list, is_preview=True) + c.argument('sku', + help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), Any, ElasticAny', + arg_type=sku_arg_type) c.ignore('allow_pending_state') # App Service on Kubernetes Commands diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index 6300eb7a48d..45dd1de853d 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -6,6 +6,7 @@ from knack.util import CLIError from ._client_factory import web_client_factory, cf_resource_groups +from ._constants import KUBE_SKUS def _normalize_sku(sku): @@ -37,6 +38,8 @@ def get_sku_name(tier): # pylint: disable=too-many-return-statements return 'ElasticPremium' if tier in ['I1', 'I2', 'I3']: return 'Isolated' + if tier in KUBE_SKUS: + return tier raise CLIError("Invalid sku(pricing tier), please refer to command help for valid values") diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py index 13b1bd49064..5f8928efa56 100644 --- a/src/appservice-kube/azext_appservice_kube/_validators.py +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -52,7 +52,7 @@ def validate_asp_create(cmd, namespace): "type": "Microsoft.Web/serverfarms", "location": location, "properties": { - "skuName": _normalize_sku(namespace.sku) or 'B1', + "skuName": _normalize_sku(namespace.sku) if namespace.sku else None, "capacity": namespace.number_of_workers or 1, "needLinuxWorkers": namespace.is_linux, "isXenon": namespace.hyper_v diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index af093f4f34c..6c86372f5ca 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -74,7 +74,7 @@ def load_command_table(self, _): g.custom_command('create', 'create_webapp', exception_handler=ex_handler_factory()) g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output, validator=validate_app_or_slot_exists_in_rg) - g.custom_command('up', 'webapp_up', exception_handler=ex_handler_factory()) + # g.custom_command('up', 'webapp_up', exception_handler=ex_handler_factory()) with self.command_group('webapp config container') as g: g.custom_command('set', 'update_container_settings') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 10ba8017e1f..44da8c05ac9 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -32,7 +32,6 @@ _format_fx_version, _get_extension_version_functionapp, _validate_app_service_environment_id, - _validate_asp_sku, _get_location_from_webapp, validate_and_convert_to_int, validate_range_of_int_flag, @@ -73,7 +72,7 @@ from ._constants import (FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION, FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_VERSION_DEFAULT, NODE_EXACT_VERSION_DEFAULT, - DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, + DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, KUBE_SKUS, KUBE_ASP_KIND, KUBE_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES, CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) @@ -158,19 +157,76 @@ def list_app_service_plans(cmd, resource_group_name=None): return plans -def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, - app_service_environment=None, kube_environment=None, sku='B1', kube_sku=KUBE_DEFAULT_SKU, +def _validate_asp_sku(app_service_environment, custom_location, sku): + # Isolated SKU is supported only for ASE + if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'ANY', 'ELASTICANY']: + raise CLIError('Invalid sku entered: {}', sku) + + if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: + if not app_service_environment: + raise CLIError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + elif app_service_environment: + raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + elif custom_location: + # Custom Location only supports Any and ElasticAny + if sku.upper() not in KUBE_SKUS: + raise CLIError("Only pricing tier 'Any' or 'ElasticAny' is allowed in this app service plan.") + + +def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, + app_service_environment=None, sku=None, kube_sku=KUBE_DEFAULT_SKU, + number_of_workers=None, location=None, tags=None, no_wait=False): + if not sku: + sku = 'B1' if not custom_location else KUBE_DEFAULT_SKU + + if custom_location: + if not per_site_scaling: + raise ArgumentUsageError('Per Site Scaling must be true when using Custom Location') + if app_service_environment: + raise ArgumentUsageError('App Service Environment is not supported with using Custom Location') + if hyper_v: + raise ArgumentUsageError('Hyper V is not supported with using Custom Location') + if not is_linux: + raise ArgumentUsageError('Only Linux is supported with using Custom Location') + + return create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling, custom_location, + app_service_environment, sku, number_of_workers, location, tags, no_wait) + + +def get_vm_sizes(cli_ctx, location): + from ._client_factory import cf_compute_service + + return cf_compute_service(cli_ctx).virtual_machine_sizes.list(location) + + +def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, + app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): HostingEnvironmentProfile, SkuDescription, AppServicePlan, KubeEnvironmentProfile = cmd.get_models( 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan', 'KubeEnvironmentProfile') sku = _normalize_sku(sku) - _validate_asp_sku(app_service_environment, sku) + _validate_asp_sku(app_service_environment, custom_location, sku) + if is_linux and hyper_v: raise MutuallyExclusiveArgumentError('Usage error: --is-linux and --hyper-v cannot be used together.') + kube_environment = None kind = None client = web_client_factory(cmd.cli_ctx) + + if custom_location: + kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() + for kube in kube_envs: + if kube.extended_location and kube.extended_location.custom_location: + if kube.extended_location.custom_location.lower() == custom_location.lower(): + kube_environment = kube.id + break + if not kube_environment: + raise CLIError('Unable to find Kube Environment associated to the Custom Location') + if app_service_environment: if hyper_v: raise ArgumentUsageError('Windows containers is not yet supported in app service environment') @@ -208,7 +264,7 @@ def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, p location = _get_location_from_resource_group(cmd.cli_ctx, resource_group_name) if kube_environment: - sku_def = SkuDescription(tier=kube_sku, name="KUBE", capacity=number_of_workers) + sku_def = SkuDescription(tier=get_sku_name(sku), name=sku, capacity=number_of_workers) else: # the api is odd on parameter naming, have to live with it for now sku_def = SkuDescription(tier=get_sku_name(sku), name=sku, capacity=number_of_workers) @@ -221,7 +277,7 @@ def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, p resource_group_name=resource_group_name, app_service_plan=plan_def) -def update_app_service_plan(instance, sku=None, number_of_workers=None, kube_sku=KUBE_DEFAULT_SKU): +def update_app_service_plan(instance, sku=None, number_of_workers=None): if number_of_workers is None and sku is None: logger.warning( 'No update is done. Specify --sku and/or --kube-sku and/or --number-of-workers.') @@ -231,13 +287,9 @@ def update_app_service_plan(instance, sku=None, number_of_workers=None, kube_sku sku_def.tier = get_sku_name(sku) sku_def.name = sku - if kube_sku is not None: - sku_def.tier = kube_sku - if number_of_workers is not None: sku_def.capacity = number_of_workers instance.sku = sku_def - return instance From f03a04cb43151f279af788accf4afbd52b041215 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 9 Apr 2021 19:42:13 -0700 Subject: [PATCH 038/125] Change kind to 'linux,kubernetes' --- src/appservice-kube/azext_appservice_kube/_constants.py | 6 ++++-- src/appservice-kube/azext_appservice_kube/custom.py | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py index 0fb7976ed4f..0948566918a 100644 --- a/src/appservice-kube/azext_appservice_kube/_constants.py +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -6,8 +6,10 @@ KUBE_DEFAULT_SKU = "ANY" KUBE_SKUS = ['ANY', 'ELASTICANY'] -KUBE_ASP_KIND = "K8SE" -KUBE_APP_KIND = "kubeapp" +KUBE_ASP_KIND = "linux,kubernetes" +KUBE_APP_KIND = "linux,kubernetes,app" +KUBE_FUNCTION_APP_KIND = 'linux,kubernetes,functionapp' +KUBE_FUNCTION_CONTAINER_APP_KIND = 'linux,kubernetes,functionapp,container' LINUX_RUNTIMES = ['dotnet', 'node', 'python', 'java'] WINDOWS_RUNTIMES = ['dotnet', 'node', 'java', 'powershell'] diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 44da8c05ac9..92ab77a3e06 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -73,8 +73,8 @@ from ._constants import (FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION, FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_VERSION_DEFAULT, NODE_EXACT_VERSION_DEFAULT, DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, KUBE_SKUS, - KUBE_ASP_KIND, KUBE_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES, - CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) + KUBE_ASP_KIND, KUBE_APP_KIND, KUBE_FUNCTION_APP_KIND, KUBE_FUNCTION_CONTAINER_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES, + MULTI_CONTAINER_TYPES,CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) from ._utils import (_normalize_sku, get_sku_name, validate_subnet_id, _generic_site_operation, _get_location_from_resource_group, validate_aks_id) @@ -770,13 +770,13 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if deployment_container_image_name is None: site_config.linux_fx_version = _get_linux_fx_functionapp(functions_version, runtime, runtime_version) elif is_kube: - functionapp_def.kind = 'kubeapp,functionapp,linux' + functionapp_def.kind = KUBE_FUNCTION_APP_KIND functionapp_def.reserved = False site_config.app_settings.append(NameValuePair(name='WEBSITES_PORT', value='80')) site_config.app_settings.append(NameValuePair(name='MACHINEKEY_DecryptionKey', value=str(hexlify(urandom(32)).decode()).upper())) if deployment_container_image_name: - functionapp_def.kind = 'kubeapp,functionapp,linux,container' + functionapp_def.kind = KUBE_FUNCTION_CONTAINER_APP_KIND site_config.app_settings.append(NameValuePair(name='DOCKER_CUSTOM_IMAGE_NAME', value=deployment_container_image_name)) site_config.app_settings.append(NameValuePair(name='FUNCTION_APP_EDIT_MODE', value='readOnly')) From 20966578bb1cf0a23e7d91d40f40f8e449ed8ef6 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 9 Apr 2021 20:36:44 -0700 Subject: [PATCH 039/125] Help text changes --- src/appservice-kube/azext_appservice_kube/_help.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index 2691f47d8ef..d0bfb92b1ec 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -25,7 +25,7 @@ - name: Create an app service plan for a kubernetes environment. text: > az appservice plan create -g MyResourceGroup -n MyPlan \\ - --kube-environment MyKubeEnvironment --kube-sku ANY + --custom-location /subscriptions//resourceGroups//providers/Microsoft.ExtendedLocation/customLocations/ --sku ANY """ helps['appservice plan update'] = """ @@ -38,7 +38,7 @@ - name: Update a kubernetes app service plan. text: > az appservice plan update --name MyAppServicePlan --resource-group MyResourceGroup \\ - --kube-sku Standard_DS2_v2 --number-of-workers 3 + --sku ANY --number-of-workers 3 """ helps['appservice kube'] = """ From 7cda49f2434fcb70532a9e24421639a9ef5182c1 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 12 Apr 2021 10:15:52 -0700 Subject: [PATCH 040/125] Publish extension v 0.1.10 --- src/appservice-kube/HISTORY.rst | 7 +++++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 36e216e94c2..848ac20c0cc 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,13 @@ Release History =============== +0.1.10 +++++++ +* Functions should not pull docker image +* Functionapp deployment source config-zip command +* AppService plan create should drop --kube-environment and --kube-sku +* Change kind to 'linux,kubernetes' + 0.1.9 ++++++ * Fix webapp zipdeploy command diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index e2b968905a7..9ac44ccb595 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.9' +VERSION = '0.1.10' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 9025a67870e..4fe69371569 100644 --- a/src/index.json +++ b/src/index.json @@ -3736,6 +3736,38 @@ "version": "0.1.9" }, "sha256Digest": "42c94905f45cba8c36a110a23fb7f5aa66d401cf717169d317bd02250698b6df" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.10-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.10-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.10" + }, + "sha256Digest": "f2ed3a01136fd73c1f0012724472877be668c5c4703cb6d9d21b7ab3355937ad" } ], "arcappliance": [ From 5d1d5e6148170a621bfbbcf837d1a08fb3397c4f Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 12 Apr 2021 14:50:21 -0700 Subject: [PATCH 041/125] Version 0.1.11, since broke appservice plan create for non-k8se plans --- src/appservice-kube/HISTORY.rst | 4 +++ .../azext_appservice_kube/custom.py | 4 +-- src/appservice-kube/setup.py | 2 +- src/index.json | 32 +++++++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 848ac20c0cc..b0e29dd6a3b 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.11 +++++++ +* Oops broke AppService plan create for non-k8se + 0.1.10 ++++++ * Functions should not pull docker image diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 92ab77a3e06..c6534871fdf 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -224,8 +224,8 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype if kube.extended_location.custom_location.lower() == custom_location.lower(): kube_environment = kube.id break - if not kube_environment: - raise CLIError('Unable to find Kube Environment associated to the Custom Location') + if not kube_environment: + raise CLIError('Unable to find Kube Environment associated to the Custom Location') if app_service_environment: if hyper_v: diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 9ac44ccb595..08b0fc3ba8e 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.10' +VERSION = '0.1.11' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 4fe69371569..629de97fcaa 100644 --- a/src/index.json +++ b/src/index.json @@ -3768,6 +3768,38 @@ "version": "0.1.10" }, "sha256Digest": "f2ed3a01136fd73c1f0012724472877be668c5c4703cb6d9d21b7ab3355937ad" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.11-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.11-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.11" + }, + "sha256Digest": "22070b7f92bfdbca9cf0dc74d530d5092d6ddc0c479921e68984c06b860bde30" } ], "arcappliance": [ From fa243d70b1f25f0ebe879be6a89075ff507e86bc Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 13 Apr 2021 10:16:26 -0700 Subject: [PATCH 042/125] Allow specifying custom location by name rather than resource ID --- src/appservice-kube/azext_appservice_kube/_params.py | 2 +- src/appservice-kube/azext_appservice_kube/custom.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 7ef0463877b..254fd0757f9 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -137,7 +137,7 @@ def load_arguments(self, _): validator=validate_asp_create) c.argument('app_service_environment', options_list=['--app-service-environment', '-e'], help="Name or ID of the app service environment") - c.argument('custom_location', options_list=['--custom-location', '-c'], help="ID of the custom location") + c.argument('custom_location', options_list=['--custom-location', '-c'], help="Name or ID of the custom location") c.argument('sku', help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), Any, ElasticAny') c.argument('kube_sku', required=False, help='VM size or ANY', default=KUBE_DEFAULT_SKU, completer=get_kube_sku_completion_list, is_preview=True) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index c6534871fdf..ec4af421b41 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -218,10 +218,17 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype client = web_client_factory(cmd.cli_ctx) if custom_location: + custom_location_rg = resource_group_name + if is_valid_resource_id(custom_location): + parsed_custom_location = parse_resource_id(custom_location) + custom_location_rg = parsed_custom_location.get("resource_group") + custom_location = parsed_custom_location.get("name") + kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() for kube in kube_envs: if kube.extended_location and kube.extended_location.custom_location: - if kube.extended_location.custom_location.lower() == custom_location.lower(): + parsed_custom_location_2 = parse_resource_id(kube.extended_location.custom_location) + if (parsed_custom_location_2.get("name").lower() == custom_location.lower()) and (parsed_custom_location_2.get("resource_group").lower() == custom_location_rg.lower()): kube_environment = kube.id break if not kube_environment: From e2322a40fca5dd5f617ba98b538d289b406e18c5 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 13 Apr 2021 12:31:04 -0700 Subject: [PATCH 043/125] az appservice kube create command --- .../azext_appservice_kube/_params.py | 17 +------ .../azext_appservice_kube/custom.py | 48 +++++++++++-------- 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 254fd0757f9..ccfc98bbb41 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -158,25 +158,12 @@ def load_arguments(self, _): # App Service on Kubernetes Commands with self.argument_context('appservice kube create') as c: c.argument('kube_name', arg_type=name_arg_type, help='Name of the kubernetes environment.') - c.argument('node_count', type=int, help='Number of nodes in the default node pool.', validator=validate_nodes_count) - c.argument('max_count', type=int, help='Maximum number of nodes for autoscaling.', validator=validate_nodes_count) - c.argument('nodepool_name', help='Name of the cluster\'s default node pool.', validator=validate_nodepool_name) - c.argument('node_vm_size', help='Size of the default node pool\'s VMs.', - completer=get_vm_size_completion_list) - c.argument('client_id', help='Service principal client id.') - c.argument('client_secret', help='Service principal client secret.') + c.argument('custom_location', options_list=['--custom-location', '-c'], help="ID of the custom location") c.argument('internal_load_balancing', arg_type=get_three_state_flag(), help='Whether the Kube Environment is only visible within Vnet/Subnet.') - c.argument('network_plugin', default='kubenet', arg_type=get_enum_type(K8SENetworkPlugin), help='If vnet subnet is not specified, only kubenet is supported') - c.argument('subnet', help='Name or ID of existing subnet. To create vnet and/or subnet \ - use `az network vnet [subnet] create`') - c.argument('vnet_name', help='Name of the vnet. Mandatory if only subnet name is specified.') - c.argument('dns_service_ip', help='Kubernetes Dns Service IP within service_cidr (commonly, .10 address). This is required if a vnet subnet is specified.') - c.argument('service_cidr', help='Address space to be used by services (nodeport/clusterip/loadbalancer). It must be within the vnet but not used by subnet. This is required if a vnet subnet is specified.') - c.argument('docker_bridge_cidr', help='This lets the cluster nodes communicate with the underlying management platform. This IP address must NOT be within the virtual network IP address range of your cluster, and shouldn\'t overlap with other address ranges in use on your network. Default (by AKS) is 172.17.0.1/16. If your VNET overlapped with this, you must specify others.') - c.argument('workspace_id', help='Log analytics workspace ID') c.argument('tags', arg_type=tags_type) c.argument('aks', help='AKS name or resource ID') c.argument('static_ip', help='Static IP Address. This is required if an AKS resource ID is specified.') + c.argument('no_wait', help='Do not wait for the create to complete, and return immediately after queuing the create.') with self.argument_context('appservice kube update') as c: c.argument('kube_name', arg_type=name_arg_type, help='Name of the kubernetes environment.') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index ec4af421b41..f66def038cc 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -96,38 +96,44 @@ # pylint: disable=too-many-locals,too-many-lines -def create_kube_environment(cmd, - client, - kube_name, - resource_group_name, - aks=None, - static_ip=None, - location=None, - internal_load_balancing=False, - tags=None, - no_wait=False): +def create_kube_environment(cmd, client, kube_name, resource_group_name, custom_location, aks=None, static_ip=None, + location=None, internal_load_balancing=False, tags=None, no_wait=False): + KubeEnvironment, ExtendedLocation, ArcConfiguration, FrontEndConfiguration = cmd.get_models('KubeEnvironment', + 'ExtendedLocation', 'ArcConfiguration', 'FrontEndConfiguration') + + if not is_valid_resource_id(custom_location): + raise CLIError('Invalid custom location') + + if not internal_load_balancing and not static_ip: + raise CLIError('Usage error: --static-ip must be specified when not using --internal_load_balancing') - KubeEnvironment = cmd.get_models('KubeEnvironment') - location = location or _get_location_from_resource_group(cmd.cli_ctx, resource_group_name) + parsed_custom_location = parse_resource_id(custom_location) + if parsed_custom_location['resource_type'].lower() != 'customlocations': + raise CLIError('Invalid custom location') if aks is not None: aks_id = validate_aks_id(cmd.cli_ctx, aks, resource_group_name) else: aks_id = None - if not internal_load_balancing and not static_ip: - raise CLIError('Usage error: --static-ip must be specified when not using --internal_load_balancing') - - # TODO: add some verifications - - kube_def = KubeEnvironment( + if not location: + location = _get_location_from_resource_group(cmd.cli_ctx, parsed_custom_location['resource_group']) + front_end_configuration = FrontEndConfiguration(kind="LoadBalancer") + extended_location = ExtendedLocation(custom_location=custom_location) + arc_configuration = ArcConfiguration( + artifacts_storage_type="NetworkFileSystem", artifact_storage_class_name="default", front_end_service_configuration=front_end_configuration) + kube_environment = KubeEnvironment( + name=kube_name, location=location, + kind="null", tags=tags, - internal_load_balancer_enabled=internal_load_balancing, + plan=None, + extended_location=extended_location, + static_ip=static_ip, aks_resource_id=aks_id, - static_ip=static_ip) + arc_configuration=arc_configuration) - return sdk_no_wait(no_wait, client.create, resource_group_name, kube_name, kube_def) + return sdk_no_wait(no_wait, client.create, resource_group_name=resource_group_name, name=kube_name, kube_environment_envelope=kube_environment) def list_kube_environments(client, resource_group_name=None): From 18a95f329bafdf629a72dd19e2052ede434af61d Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 13 Apr 2021 13:22:51 -0700 Subject: [PATCH 044/125] Change ASP kind back to K8SE, reserved to None --- src/appservice-kube/azext_appservice_kube/_constants.py | 2 +- src/appservice-kube/azext_appservice_kube/custom.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py index 0948566918a..fcb0e47b3a4 100644 --- a/src/appservice-kube/azext_appservice_kube/_constants.py +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -6,7 +6,7 @@ KUBE_DEFAULT_SKU = "ANY" KUBE_SKUS = ['ANY', 'ELASTICANY'] -KUBE_ASP_KIND = "linux,kubernetes" +KUBE_ASP_KIND = "K8SE" KUBE_APP_KIND = "linux,kubernetes,app" KUBE_FUNCTION_APP_KIND = 'linux,kubernetes,functionapp' KUBE_FUNCTION_CONTAINER_APP_KIND = 'linux,kubernetes,functionapp,container' diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index f66def038cc..2cd66c78714 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -283,7 +283,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype sku_def = SkuDescription(tier=get_sku_name(sku), name=sku, capacity=number_of_workers) plan_def = AppServicePlan(location=location, tags=tags, sku=sku_def, kind=kind, - reserved=(is_linux or None), hyper_v=(hyper_v or None), name=name, + reserved=((is_linux and not kube_environment) or None), hyper_v=(hyper_v or None), name=name, per_site_scaling=per_site_scaling, hosting_environment_profile=ase_def, kube_environment_profile=kube_def) return sdk_no_wait(no_wait, client.app_service_plans.create_or_update, name=name, From 34992e753a0f8165bee806e5a80f6ec5359974cc Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 14 Apr 2021 10:55:34 -0700 Subject: [PATCH 045/125] Publish 0.1.12 whl --- src/appservice-kube/HISTORY.rst | 6 ++++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index b0e29dd6a3b..9bd4c325d9c 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,12 @@ Release History =============== +0.1.12 +++++++ +* Allow specifying custom location by name as well, in appservice plan create +* az appservice kube create command +* Change ASP "kind" back to "K8SE", reserved to None so that "kind" is saved properly + 0.1.11 ++++++ * Oops broke AppService plan create for non-k8se diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 08b0fc3ba8e..106c7b02ffb 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.11' +VERSION = '0.1.12' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 629de97fcaa..b3e2b1d25f5 100644 --- a/src/index.json +++ b/src/index.json @@ -3800,6 +3800,38 @@ "version": "0.1.11" }, "sha256Digest": "22070b7f92bfdbca9cf0dc74d530d5092d6ddc0c479921e68984c06b860bde30" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.12-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.12-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.12" + }, + "sha256Digest": "8d9b597be01c0d350452ff658d8b3cb5bdf68778438d94e5188242450a2ef2df" } ], "arcappliance": [ From 2be983a5fe84c5a8bec21a7ee59f5c39fd674f51 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 19 Apr 2021 17:57:57 -0700 Subject: [PATCH 046/125] az webapp create doesn't require plan for k8se --- .../azext_appservice_kube/_create_util.py | 8 ++ .../azext_appservice_kube/_params.py | 1 + .../azext_appservice_kube/custom.py | 85 ++++++++++++------- 3 files changed, 63 insertions(+), 31 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py index 231fd97e745..c5719aa5063 100644 --- a/src/appservice-kube/azext_appservice_kube/_create_util.py +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -416,3 +416,11 @@ def should_create_new_app(cmd, rg_name, app_name): # this is currently referenc return False return True + +def generate_default_app_service_plan_name(webapp_name): + import uuid + random_uuid = str(uuid.uuid4().hex) + webapp_name = webapp_name[:222] # max length for app service plan name is 260 + + return '{}_plan_{}'.format(webapp_name, random_uuid) + diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index ccfc98bbb41..3f28ddedbb8 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -53,6 +53,7 @@ def load_arguments(self, _): with self.argument_context('webapp create') as c: c.argument('name', options_list=['--name', '-n'], help='name of the new web app', validator=validate_site_create) + c.argument('custom_location', options_list=['--custom-location', '-c'], help="Name or ID of the custom location") c.argument('startup_file', help="Linux only. The web's startup file") c.argument('docker_registry_server_user', options_list=['--docker-registry-server-user', '-s'], help='the container registry server username') c.argument('docker_registry_server_password', options_list=['--docker-registry-server-password', '-w'], help='The container registry server password. Required for private registries.') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 2cd66c78714..313879cfdd0 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -81,7 +81,7 @@ from ._create_util import (zip_contents_from_dir, get_runtime_version_details, create_resource_group, get_app_details, should_create_new_rg, set_location, get_site_availability, does_app_already_exist, get_profile_username, get_plan_to_use,get_kube_plan_to_use, get_lang_from_content, get_rg_to_use, get_sku_to_use, - detect_os_form_src, get_current_stack_from_runtime) + detect_os_form_src, get_current_stack_from_runtime, generate_default_app_service_plan_name) from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory from .vsts_cd_provider import VstsContinuousDeliveryProvider @@ -178,7 +178,7 @@ def _validate_asp_sku(app_service_environment, custom_location, sku): elif custom_location: # Custom Location only supports Any and ElasticAny if sku.upper() not in KUBE_SKUS: - raise CLIError("Only pricing tier 'Any' or 'ElasticAny' is allowed in this app service plan.") + raise CLIError("Only pricing tier 'Any' or 'ElasticAny' is allowed for this type of app service plan.") def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, @@ -207,6 +207,29 @@ def get_vm_sizes(cli_ctx, location): return cf_compute_service(cli_ctx).virtual_machine_sizes.list(location) +def _get_kube_env_from_custom_location(cmd, custom_location, resource_group_name=None): + kube_environment_id = None + custom_location_rg = resource_group_name + + if is_valid_resource_id(custom_location): + parsed_custom_location = parse_resource_id(custom_location) + custom_location_rg = parsed_custom_location.get("resource_group") + custom_location = parsed_custom_location.get("name") + + kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() + for kube in kube_envs: + if kube.extended_location and kube.extended_location.custom_location: + parsed_custom_location_2 = parse_resource_id(kube.extended_location.custom_location) + if (parsed_custom_location_2.get("name").lower() == custom_location.lower()) and (parsed_custom_location_2.get("resource_group").lower() == custom_location_rg.lower()): + kube_environment_id = kube.id + break + + if not kube_environment_id: + raise ResourceNotFoundError('Unable to find Kube Environment associated to the Custom Location') + + return kube_environment_id + + def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): @@ -224,21 +247,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype client = web_client_factory(cmd.cli_ctx) if custom_location: - custom_location_rg = resource_group_name - if is_valid_resource_id(custom_location): - parsed_custom_location = parse_resource_id(custom_location) - custom_location_rg = parsed_custom_location.get("resource_group") - custom_location = parsed_custom_location.get("name") - - kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() - for kube in kube_envs: - if kube.extended_location and kube.extended_location.custom_location: - parsed_custom_location_2 = parse_resource_id(kube.extended_location.custom_location) - if (parsed_custom_location_2.get("name").lower() == custom_location.lower()) and (parsed_custom_location_2.get("resource_group").lower() == custom_location_rg.lower()): - kube_environment = kube.id - break - if not kube_environment: - raise CLIError('Unable to find Kube Environment associated to the Custom Location') + kube_environment = _get_kube_env_from_custom_location(cmd, custom_location, resource_group_name) if app_service_environment: if hyper_v: @@ -306,7 +315,7 @@ def update_app_service_plan(instance, sku=None, number_of_workers=None): return instance -def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches +def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custom_location=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None, multicontainer_config_type=None, multicontainer_config_file=None, tags=None, @@ -317,19 +326,9 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi if deployment_source_url and deployment_local_git: raise CLIError('usage error: --deployment-source-url | --deployment-local-git') - docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) + if not plan and not custom_location: + raise RequiredArgumentMissingError("Either Plan or Custom Location must be specified") - client = web_client_factory(cmd.cli_ctx) - if is_valid_resource_id(plan): - parse_result = parse_resource_id(plan) - plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) - else: - plan_info = client.app_service_plans.get(resource_group_name, plan) - if not plan_info: - raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) - is_linux = plan_info.reserved - node_default_version = NODE_EXACT_VERSION_DEFAULT - location = plan_info.location # This is to keep the existing appsettings for a newly created webapp on existing webapp name. name_validation = get_site_availability(cmd, name) if not name_validation.name_available: @@ -353,6 +352,29 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi site_config = SiteConfig(app_settings=settings) else: site_config = SiteConfig(app_settings=[]) + + if custom_location and not plan: + plan = generate_default_app_service_plan_name(name) + logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) + create_app_service_plan(cmd=cmd, resource_group_name=resource_group_name, + name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True) + + docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) + + client = web_client_factory(cmd.cli_ctx) + if is_valid_resource_id(plan): + parse_result = parse_resource_id(plan) + plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) + else: + plan_info = client.app_service_plans.get(resource_group_name, plan) + if not plan_info: + raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) + if custom_location: + _validate_asp_sku(app_service_environment=None, custom_location=custom_location, sku=plan_info.sku.tier) + is_linux = plan_info.reserved + node_default_version = NODE_EXACT_VERSION_DEFAULT + location = plan_info.location + if isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() not in ['F1', 'FREE', 'SHARED', 'D1', 'B1', 'B2', 'B3', 'BASIC']: site_config.always_on = True @@ -360,7 +382,7 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi https_only=using_webapp_up) is_kube = False - if plan_info.kind.upper() == KUBE_ASP_KIND: + if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper(): webapp_def.kind = KUBE_APP_KIND is_kube = True @@ -380,6 +402,7 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi if runtime: runtime = helper.remove_delimiters(runtime) + current_stack = None if is_linux or is_kube: if not validate_container_app_create_options(runtime, deployment_container_image_name, multicontainer_config_type, multicontainer_config_file): From 42e83d07c9b0908d698d6e386eb06bb32e5addcf Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 20 Apr 2021 09:01:02 -0700 Subject: [PATCH 047/125] Change app service plan kind to 'linux,kubernetes' and reserved=true if linux --- src/appservice-kube/azext_appservice_kube/_constants.py | 2 +- src/appservice-kube/azext_appservice_kube/custom.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py index fcb0e47b3a4..0948566918a 100644 --- a/src/appservice-kube/azext_appservice_kube/_constants.py +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -6,7 +6,7 @@ KUBE_DEFAULT_SKU = "ANY" KUBE_SKUS = ['ANY', 'ELASTICANY'] -KUBE_ASP_KIND = "K8SE" +KUBE_ASP_KIND = "linux,kubernetes" KUBE_APP_KIND = "linux,kubernetes,app" KUBE_FUNCTION_APP_KIND = 'linux,kubernetes,functionapp' KUBE_FUNCTION_CONTAINER_APP_KIND = 'linux,kubernetes,functionapp,container' diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 313879cfdd0..b00ce98394f 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -292,7 +292,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype sku_def = SkuDescription(tier=get_sku_name(sku), name=sku, capacity=number_of_workers) plan_def = AppServicePlan(location=location, tags=tags, sku=sku_def, kind=kind, - reserved=((is_linux and not kube_environment) or None), hyper_v=(hyper_v or None), name=name, + reserved=(is_linux or None), hyper_v=(hyper_v or None), name=name, per_site_scaling=per_site_scaling, hosting_environment_profile=ase_def, kube_environment_profile=kube_def) return sdk_no_wait(no_wait, client.app_service_plans.create_or_update, name=name, From 0eac695dc9e7fa26d18624807db52d8350bf2774 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 20 Apr 2021 09:28:16 -0700 Subject: [PATCH 048/125] Webapp create should pass with ASP kind=linux if SKU is a kube sku --- src/appservice-kube/azext_appservice_kube/custom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index b00ce98394f..87571e8ae87 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -369,8 +369,13 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo plan_info = client.app_service_plans.get(resource_group_name, plan) if not plan_info: raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) + if custom_location: + sku_tier = None + if isinstance(plan_info.sku, SkuDescription): + sku_tier = plan_info.sku.tier _validate_asp_sku(app_service_environment=None, custom_location=custom_location, sku=plan_info.sku.tier) + is_linux = plan_info.reserved node_default_version = NODE_EXACT_VERSION_DEFAULT location = plan_info.location @@ -382,7 +387,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo https_only=using_webapp_up) is_kube = False - if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper(): + if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.tier.upper() in KUBE_SKUS): webapp_def.kind = KUBE_APP_KIND is_kube = True From 687877302a2d6dabb17bd41c656d98209f6f0e18 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 20 Apr 2021 13:11:04 -0700 Subject: [PATCH 049/125] az functionapp create without plan --- .../azext_appservice_kube/_constants.py | 1 + .../azext_appservice_kube/_params.py | 3 +- .../azext_appservice_kube/custom.py | 73 +++++++++++-------- 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py index 0948566918a..81e8aeea81c 100644 --- a/src/appservice-kube/azext_appservice_kube/_constants.py +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -8,6 +8,7 @@ KUBE_SKUS = ['ANY', 'ELASTICANY'] KUBE_ASP_KIND = "linux,kubernetes" KUBE_APP_KIND = "linux,kubernetes,app" +KUBE_CONTAINER_APP_KIND = 'linux,kubernetes,app,container' KUBE_FUNCTION_APP_KIND = 'linux,kubernetes,functionapp' KUBE_FUNCTION_CONTAINER_APP_KIND = 'linux,kubernetes,functionapp,container' diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 3f28ddedbb8..38eaf752775 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -53,7 +53,7 @@ def load_arguments(self, _): with self.argument_context('webapp create') as c: c.argument('name', options_list=['--name', '-n'], help='name of the new web app', validator=validate_site_create) - c.argument('custom_location', options_list=['--custom-location', '-c'], help="Name or ID of the custom location") + c.argument('custom_location', options_list=['--custom-location'], help="Name or ID of the custom location") c.argument('startup_file', help="Linux only. The web's startup file") c.argument('docker_registry_server_user', options_list=['--docker-registry-server-user', '-s'], help='the container registry server username') c.argument('docker_registry_server_password', options_list=['--docker-registry-server-password', '-w'], help='The container registry server password. Required for private registries.') @@ -95,6 +95,7 @@ def load_arguments(self, _): completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), help="name or resource id of the function app service plan. Use 'appservice plan create' to get one") c.argument('new_app_name', options_list=['--name', '-n'], help='name of the new function app') + c.argument('custom_location', options_list=['--custom-location'], help="Name or ID of the custom location") c.argument('storage_account', options_list=['--storage-account', '-s'], help='Provide a string value of a Storage Account in the provided Resource Group. Or Resource ID of a Storage Account in a different Resource Group') c.argument('consumption_plan_location', options_list=['--consumption-plan-location', '-c'], diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 87571e8ae87..d2d24c535bc 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -73,8 +73,8 @@ from ._constants import (FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION, FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_VERSION_DEFAULT, NODE_EXACT_VERSION_DEFAULT, DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, KUBE_SKUS, - KUBE_ASP_KIND, KUBE_APP_KIND, KUBE_FUNCTION_APP_KIND, KUBE_FUNCTION_CONTAINER_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES, - MULTI_CONTAINER_TYPES,CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) + KUBE_ASP_KIND, KUBE_APP_KIND, KUBE_FUNCTION_APP_KIND, KUBE_FUNCTION_CONTAINER_APP_KIND, KUBE_CONTAINER_APP_KIND, + LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES,CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) from ._utils import (_normalize_sku, get_sku_name, validate_subnet_id, _generic_site_operation, _get_location_from_resource_group, validate_aks_id) @@ -388,7 +388,10 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo is_kube = False if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.tier.upper() in KUBE_SKUS): - webapp_def.kind = KUBE_APP_KIND + if deployment_container_image_name: + webapp_def.kind = KUBE_CONTAINER_APP_KIND + else: + webapp_def.kind = KUBE_APP_KIND is_kube = True if is_kube: @@ -694,7 +697,7 @@ def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): return webapp -def create_function(cmd, resource_group_name, name, storage_account, plan=None, +def create_function(cmd, resource_group_name, name, storage_account, plan=None, custom_location=None, os_type=None, functions_version=None, runtime=None, runtime_version=None, consumption_plan_location=None, app_insights=None, app_insights_key=None, disable_app_insights=None, deployment_source_url=None, @@ -703,14 +706,20 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, deployment_container_image_name=None, tags=None, min_worker_count=None, max_worker_count=None): # pylint: disable=too-many-statements, too-many-branches + SkuDescription = cmd.get_models('SkuDescription') if functions_version is None: logger.warning("No functions version specified so defaulting to 2. In the future, specifying a version will " "be required. To create a 2.x function you would pass in the flag `--functions-version 2`") functions_version = '2' if deployment_source_url and deployment_local_git: raise CLIError('usage error: --deployment-source-url | --deployment-local-git') - if bool(plan) == bool(consumption_plan_location): - raise CLIError("usage error: --plan NAME_OR_ID | --consumption-plan-location LOCATION") + + if not plan and not consumption_plan_location and not custom_location: + raise RequiredArgumentMissingError("Either Plan, Consumption Plan or Custom Location must be specified") + + if consumption_plan_location and custom_location: + raise MutuallyExclusiveArgumentError("Consumption Plan and Custom Location cannot be used together") + SiteConfig, Site, NameValuePair = cmd.get_models('SiteConfig', 'Site', 'NameValuePair') docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) @@ -732,6 +741,12 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, is_linux = os_type and os_type.lower() == 'linux' else: # apps with SKU based plan + if custom_location and not plan: + plan = generate_default_app_service_plan_name(name) + logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) + create_app_service_plan(cmd=cmd, resource_group_name=resource_group_name, + name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True) + if is_valid_resource_id(plan): parse_result = parse_resource_id(plan) plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) @@ -741,14 +756,14 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, raise CLIError("The plan '{}' doesn't exist".format(plan)) location = plan_info.location is_linux = plan_info.reserved - functionapp_def.server_farm_id = plan + functionapp_def.server_farm_id = plan_info.id functionapp_def.location = location + is_kube = False - if plan_info.kind.upper() == KUBE_ASP_KIND: + if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.tier.upper() in KUBE_SKUS): is_kube = True if is_kube: - functionapp_def.server_farm_id = plan_info.id if min_worker_count is not None: site_config.number_of_workers = min_worker_count @@ -787,7 +802,26 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) - if is_linux: + if is_kube: + functionapp_def.kind = KUBE_FUNCTION_APP_KIND + functionapp_def.reserved = True + site_config.app_settings.append(NameValuePair(name='WEBSITES_PORT', value='80')) + site_config.app_settings.append(NameValuePair(name='MACHINEKEY_DecryptionKey', + value=str(hexlify(urandom(32)).decode()).upper())) + if deployment_container_image_name: + functionapp_def.kind = KUBE_FUNCTION_CONTAINER_APP_KIND + site_config.app_settings.append(NameValuePair(name='DOCKER_CUSTOM_IMAGE_NAME', + value=deployment_container_image_name)) + site_config.app_settings.append(NameValuePair(name='FUNCTION_APP_EDIT_MODE', value='readOnly')) + site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) + if docker_registry_server_user is not None and docker_registry_server_password is not None: + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) + else: + site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', value='true')) + site_config.linux_fx_version = _get_linux_fx_kube_functionapp(runtime, runtime_version) + elif is_linux: functionapp_def.kind = 'functionapp,linux' functionapp_def.reserved = True is_consumption = consumption_plan_location is not None @@ -810,25 +844,6 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, "functions_version: '{}' was not found".format(runtime, functions_version)) if deployment_container_image_name is None: site_config.linux_fx_version = _get_linux_fx_functionapp(functions_version, runtime, runtime_version) - elif is_kube: - functionapp_def.kind = KUBE_FUNCTION_APP_KIND - functionapp_def.reserved = False - site_config.app_settings.append(NameValuePair(name='WEBSITES_PORT', value='80')) - site_config.app_settings.append(NameValuePair(name='MACHINEKEY_DecryptionKey', - value=str(hexlify(urandom(32)).decode()).upper())) - if deployment_container_image_name: - functionapp_def.kind = KUBE_FUNCTION_CONTAINER_APP_KIND - site_config.app_settings.append(NameValuePair(name='DOCKER_CUSTOM_IMAGE_NAME', - value=deployment_container_image_name)) - site_config.app_settings.append(NameValuePair(name='FUNCTION_APP_EDIT_MODE', value='readOnly')) - site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) - if docker_registry_server_user is not None and docker_registry_server_password is not None: - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) - else: - site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', value='true')) - site_config.linux_fx_version = _get_linux_fx_kube_functionapp(runtime, runtime_version) else: functionapp_def.kind = 'functionapp' if runtime == "java": From fe960bb221a05cfa9dad92a76cd615bbef064d72 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 20 Apr 2021 14:11:33 -0700 Subject: [PATCH 050/125] Fix bug where if webapp/functionapp create called to update, if --plan isnt specified it creates new plan --- .../azext_appservice_kube/custom.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index d2d24c535bc..a05c230117e 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -353,6 +353,11 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo else: site_config = SiteConfig(app_settings=[]) + if not plan: + app_details = get_app_details(cmd, name) + if app_details is not None: + plan = app_details.server_farm_id + if custom_location and not plan: plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) @@ -481,6 +486,11 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo poller = client.web_apps.create_or_update(resource_group_name, name, webapp_def) webapp = LongRunningOperation(cmd.cli_ctx)(poller) + if deployment_container_image_name: + update_container_settings(cmd, resource_group_name, name, docker_registry_server_url, + deployment_container_image_name, docker_registry_server_user, + docker_registry_server_password=docker_registry_server_password) + if is_kube: return webapp @@ -493,11 +503,6 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name) - if deployment_container_image_name: - update_container_settings(cmd, resource_group_name, name, docker_registry_server_url, - deployment_container_image_name, docker_registry_server_user, - docker_registry_server_password=docker_registry_server_password) - if assign_identities is not None: identity = assign_identity(cmd, resource_group_name, name, assign_identities, role, None, scope) @@ -741,6 +746,10 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, is_linux = os_type and os_type.lower() == 'linux' else: # apps with SKU based plan + if not plan: + app_details = get_app_details(cmd, name) + if app_details is not None: + plan = app_details.server_farm_id if custom_location and not plan: plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) From 81aa8dbc6add0dbccee01452343e1b8dbeef22e4 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 21 Apr 2021 13:33:26 -0700 Subject: [PATCH 051/125] fix webapp/functionapp create, if calling create again with new custom location/plan edge cases --- .../azext_appservice_kube/commands.py | 1 + .../azext_appservice_kube/custom.py | 78 +++++++++++++++---- 2 files changed, 62 insertions(+), 17 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 6c86372f5ca..3eb88f7a5ba 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -68,6 +68,7 @@ def load_command_table(self, _): exception_handler=ex_handler_factory(creating_plan=True)) g.generic_update_command('update', custom_func_name='update_app_service_plan', setter_arg_name='app_service_plan', validator=validate_asp_sku, supports_no_wait=True) + g.show_command('show', 'get') g.custom_command('list', 'list_app_service_plans') with self.command_group('webapp') as g: diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index a05c230117e..954d47c1d16 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -207,20 +207,18 @@ def get_vm_sizes(cli_ctx, location): return cf_compute_service(cli_ctx).virtual_machine_sizes.list(location) -def _get_kube_env_from_custom_location(cmd, custom_location, resource_group_name=None): - kube_environment_id = None - custom_location_rg = resource_group_name +def _get_kube_env_from_custom_location(cmd, custom_location): + kube_environment_id = "" if is_valid_resource_id(custom_location): parsed_custom_location = parse_resource_id(custom_location) - custom_location_rg = parsed_custom_location.get("resource_group") custom_location = parsed_custom_location.get("name") kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() for kube in kube_envs: if kube.extended_location and kube.extended_location.custom_location: parsed_custom_location_2 = parse_resource_id(kube.extended_location.custom_location) - if (parsed_custom_location_2.get("name").lower() == custom_location.lower()) and (parsed_custom_location_2.get("resource_group").lower() == custom_location_rg.lower()): + if parsed_custom_location_2.get("name").lower() == custom_location.lower(): kube_environment_id = kube.id break @@ -247,7 +245,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype client = web_client_factory(cmd.cli_ctx) if custom_location: - kube_environment = _get_kube_env_from_custom_location(cmd, custom_location, resource_group_name) + kube_environment = _get_kube_env_from_custom_location(cmd, custom_location) if app_service_environment: if hyper_v: @@ -315,6 +313,40 @@ def update_app_service_plan(instance, sku=None, number_of_workers=None): return instance +def _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): + client = web_client_factory(cmd.cli_ctx) + if is_valid_resource_id(plan): + parse_result = parse_resource_id(plan) + plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) + else: + plan_info = client.app_service_plans.get(resource_group_name, plan) + if not plan_info: + raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) + + plan_kube_env_id = "" + custom_location_kube_env_id = _get_kube_env_from_custom_location(cmd, custom_location) + if plan_info.kube_environment_profile: + plan_kube_env_id = plan_info.kube_environment_profile.id + + return plan_kube_env_id.lower() == custom_location_kube_env_id.lower() + + +def _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan): + if custom_location and plan: + return False + elif custom_location: + existing_app_details = get_app_details(cmd, name) + if not existing_app_details: + return True + else: + if _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, existing_app_details.server_farm_id): # existing app and kube environments match + return False + else: # existing app but new custom location + return True + else: # plan is not None + return False + + def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custom_location=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None, @@ -353,17 +385,21 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo else: site_config = SiteConfig(app_settings=[]) - if not plan: - app_details = get_app_details(cmd, name) - if app_details is not None: - plan = app_details.server_farm_id - - if custom_location and not plan: + _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan) + if _should_create_new_plan: plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) create_app_service_plan(cmd=cmd, resource_group_name=resource_group_name, name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True) + if custom_location and plan: + if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): + raise ValidationError("Custom location's kube environment and App Service Plan's kube environment don't match") + elif custom_location and not plan: + app_details = get_app_details(cmd, name) + if app_details is not None: + plan = app_details.server_farm_id + docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) client = web_client_factory(cmd.cli_ctx) @@ -725,6 +761,9 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if consumption_plan_location and custom_location: raise MutuallyExclusiveArgumentError("Consumption Plan and Custom Location cannot be used together") + if consumption_plan_location and plan: + raise MutuallyExclusiveArgumentError("Consumption Plan and Plan cannot be used together") + SiteConfig, Site, NameValuePair = cmd.get_models('SiteConfig', 'Site', 'NameValuePair') docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) @@ -746,16 +785,21 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, is_linux = os_type and os_type.lower() == 'linux' else: # apps with SKU based plan - if not plan: - app_details = get_app_details(cmd, name) - if app_details is not None: - plan = app_details.server_farm_id - if custom_location and not plan: + _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan) + if _should_create_new_plan: plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) create_app_service_plan(cmd=cmd, resource_group_name=resource_group_name, name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True) + if custom_location and plan: + if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): + raise ValidationError("Custom location's kube environment and App Service Plan's kube environment don't match") + elif custom_location and not plan: + app_details = get_app_details(cmd, name) + if app_details is not None: + plan = app_details.server_farm_id + if is_valid_resource_id(plan): parse_result = parse_resource_id(plan) plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) From b48e04d79a14341c81e75d654414fc0c9e90be05 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 21 Apr 2021 13:42:38 -0700 Subject: [PATCH 052/125] Version 0.1.13 --- src/appservice-kube/HISTORY.rst | 5 +++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 9bd4c325d9c..74c786509f7 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.13 +++++++ +* az webapp/functionapp create without --plan for k8se apps +* Change ASP "kind" back to "linux,kubernetes..." and detect k8se apps in webapp/functionapp create using customlocation/plan sku + 0.1.12 ++++++ * Allow specifying custom location by name as well, in appservice plan create diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 106c7b02ffb..a8708cbe6ae 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.12' +VERSION = '0.1.13' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index b3e2b1d25f5..1289d96294f 100644 --- a/src/index.json +++ b/src/index.json @@ -3832,6 +3832,38 @@ "version": "0.1.12" }, "sha256Digest": "8d9b597be01c0d350452ff658d8b3cb5bdf68778438d94e5188242450a2ef2df" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.13-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.13-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.13" + }, + "sha256Digest": "d093990522776ab7f1a8a251c7d729384b8fcac1c865c86f82642c7af6c22188" } ], "arcappliance": [ From 7d96f27df2a02f98eb1b32f76b51c442dd8977d9 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 26 Apr 2021 15:09:58 -0700 Subject: [PATCH 053/125] Version 0.1.14 temporary change to stop doing the list in web/func app creates --- src/appservice-kube/HISTORY.rst | 4 +++ .../azext_appservice_kube/_create_util.py | 5 ++- .../azext_appservice_kube/custom.py | 16 +++++----- src/appservice-kube/setup.py | 2 +- src/index.json | 32 +++++++++++++++++++ 5 files changed, 49 insertions(+), 10 deletions(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 74c786509f7..5d3256b7d61 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.14 +++++++ +* Stop using webapp list in creates - temporary fix for demo + 0.1.13 ++++++ * az webapp/functionapp create without --plan for k8se apps diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py index c5719aa5063..500d97c7f84 100644 --- a/src/appservice-kube/azext_appservice_kube/_create_util.py +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -308,13 +308,16 @@ def does_app_already_exist(cmd, name): return site_availability.name_available -def get_app_details(cmd, name): +def get_app_details(cmd, name, resource_group): client = web_client_factory(cmd.cli_ctx) + return client.web_apps.get(resource_group, name) + ''' data = (list(filter(lambda x: name.lower() in x.name.lower(), client.web_apps.list()))) _num_items = len(data) if _num_items > 0: return data[0] return None + ''' def get_rg_to_use(cmd, user, loc, os_name, rg_name=None): diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 954d47c1d16..0c719e24a34 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -331,11 +331,11 @@ def _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, return plan_kube_env_id.lower() == custom_location_kube_env_id.lower() -def _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan): +def _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan, resource_group_name): if custom_location and plan: return False elif custom_location: - existing_app_details = get_app_details(cmd, name) + existing_app_details = get_app_details(cmd, name, resource_group_name) if not existing_app_details: return True else: @@ -367,7 +367,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo if name_validation.reason == 'Invalid': raise CLIError(name_validation.message) logger.warning("Webapp '%s' already exists. The command will use the existing app's settings.", name) - app_details = get_app_details(cmd, name) + app_details = get_app_details(cmd, name, resource_group_name) if app_details is None: raise CLIError("Unable to retrieve details of the existing app '{}'. Please check that " "the app is a part of the current subscription".format(name)) @@ -385,7 +385,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo else: site_config = SiteConfig(app_settings=[]) - _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan) + _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan, resource_group_name) if _should_create_new_plan: plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) @@ -396,7 +396,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): raise ValidationError("Custom location's kube environment and App Service Plan's kube environment don't match") elif custom_location and not plan: - app_details = get_app_details(cmd, name) + app_details = get_app_details(cmd, name, resource_group_name) if app_details is not None: plan = app_details.server_farm_id @@ -587,7 +587,7 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku if not _create_new_app: # App exists # Get the ASP & RG info, if the ASP & RG parameters are provided we use those else we need to find those logger.warning("Webapp %s already exists. The command will deploy contents to the existing app.", name) - app_details = get_app_details(cmd, name) + app_details = get_app_details(cmd, name, resource_group_name) if app_details is None: raise CLIError("Unable to retrieve details of the existing app {}. Please check that the app is a part of " "the current subscription".format(name)) @@ -785,7 +785,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, is_linux = os_type and os_type.lower() == 'linux' else: # apps with SKU based plan - _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan) + _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan, resource_group_name) if _should_create_new_plan: plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) @@ -796,7 +796,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): raise ValidationError("Custom location's kube environment and App Service Plan's kube environment don't match") elif custom_location and not plan: - app_details = get_app_details(cmd, name) + app_details = get_app_details(cmd, name, resource_group_name) if app_details is not None: plan = app_details.server_farm_id diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index a8708cbe6ae..dd06f6b4039 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.13' +VERSION = '0.1.14' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 1289d96294f..c9e178884ff 100644 --- a/src/index.json +++ b/src/index.json @@ -3864,6 +3864,38 @@ "version": "0.1.13" }, "sha256Digest": "d093990522776ab7f1a8a251c7d729384b8fcac1c865c86f82642c7af6c22188" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.14-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.14-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.14" + }, + "sha256Digest": "99b2ddefbb9f413fe9ee545bb9d6e46568d312d0c97d1158bee5004bac61e5c1" } ], "arcappliance": [ From 7fff6b22522d42279a909fb706327b6a3a0684d7 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Thu, 29 Apr 2021 17:10:20 -0700 Subject: [PATCH 054/125] Add better help text for appservice create with custom location --- src/appservice-kube/azext_appservice_kube/_help.py | 3 ++- src/appservice-kube/azext_appservice_kube/custom.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index d0bfb92b1ec..0dbc2c58de9 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -25,7 +25,8 @@ - name: Create an app service plan for a kubernetes environment. text: > az appservice plan create -g MyResourceGroup -n MyPlan \\ - --custom-location /subscriptions//resourceGroups//providers/Microsoft.ExtendedLocation/customLocations/ --sku ANY + --custom-location /subscriptions//resourceGroups//providers/Microsoft.ExtendedLocation/customLocations/ \\ + --per-site-scaling --is-linux --sku ANY """ helps['appservice plan update'] = """ diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 0c719e24a34..98cfb0822b1 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -189,13 +189,13 @@ def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, p if custom_location: if not per_site_scaling: - raise ArgumentUsageError('Per Site Scaling must be true when using Custom Location') + raise ArgumentUsageError('Per Site Scaling must be true when using Custom Location. Please re-run with --per-site-scaling flag') if app_service_environment: raise ArgumentUsageError('App Service Environment is not supported with using Custom Location') if hyper_v: raise ArgumentUsageError('Hyper V is not supported with using Custom Location') if not is_linux: - raise ArgumentUsageError('Only Linux is supported with using Custom Location') + raise ArgumentUsageError('Only Linux is supported with using Custom Location. Please re-run with --is-linux flag.') return create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling, custom_location, app_service_environment, sku, number_of_workers, location, tags, no_wait) From 03cc4c8020e9155993a20b35e0d1257301c7787a Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Thu, 29 Apr 2021 17:33:17 -0700 Subject: [PATCH 055/125] Update appservice SDK for kube extension to 2020-12-01 --- .../azext_appservice_kube/__init__.py | 2 +- .../vendored_sdks/azure_mgmt_web/__init__.py | 2 +- .../azure_mgmt_web/_configuration.py | 2 +- .../azure_mgmt_web/_operations_mixin.py | 176 +- .../vendored_sdks/azure_mgmt_web/_version.py | 9 + .../_web_site_management_client.py | 132 +- .../vendored_sdks/azure_mgmt_web/models.py | 2 +- .../vendored_sdks/azure_mgmt_web/py.typed | 1 + .../operations/_domains_operations.py | 8 +- .../operations/_domains_operations.py | 8 +- .../operations/_domains_operations.py | 8 +- .../_web_site_management_client.py | 5 - .../v2020_06_01/models/__init__.py | 29 - .../v2020_06_01/models/_models.py | 264 +- .../v2020_06_01/models/_models_py3.py | 268 +- .../v2020_06_01/models/_paged_models.py | 13 - .../_web_site_management_client_enums.py | 26 - .../v2020_06_01/operations/__init__.py | 2 - .../operations/_domains_operations.py | 8 +- .../azure_mgmt_web/v2020_09_01/__init__.py | 19 + .../v2020_09_01/_configuration.py | 49 + .../_web_site_management_client.py | 121 + .../v2020_09_01/models/__init__.py | 1146 + .../v2020_09_01/models/_models.py | 15503 +++++++++ .../v2020_09_01/models/_models_py3.py | 15503 +++++++++ .../v2020_09_01/models/_paged_models.py | 781 + .../_web_site_management_client_enums.py | 628 + .../v2020_09_01/operations/__init__.py | 46 + ...p_service_certificate_orders_operations.py | 1423 + .../_app_service_environments_operations.py | 2858 ++ .../_app_service_plans_operations.py | 1946 ++ ...ficate_registration_provider_operations.py | 104 + .../operations/_certificates_operations.py} | 311 +- .../_deleted_web_apps_operations.py | 238 + .../operations/_diagnostics_operations.py | 1713 + ...domain_registration_provider_operations.py | 104 + .../operations/_domains_operations.py | 1086 + .../operations/_provider_operations.py | 246 + .../operations/_recommendations_operations.py | 1070 + .../_resource_health_metadata_operations.py | 468 + .../operations/_static_sites_operations.py | 1878 + .../_top_level_domains_operations.py | 251 + .../operations/_web_apps_operations.py | 27447 +++++++++++++++ .../_web_site_management_client_operations.py | 1124 + .../{ => v2020_09_01}/version.py | 2 +- .../azure_mgmt_web/v2020_12_01/__init__.py | 19 + .../v2020_12_01/_configuration.py | 49 + .../_web_site_management_client.py | 136 + .../v2020_12_01/models/__init__.py | 1304 + .../v2020_12_01/models/_models.py | 16860 +++++++++ .../v2020_12_01/models/_models_py3.py | 16860 +++++++++ .../v2020_12_01/models/_paged_models.py | 859 + .../_web_site_management_client_enums.py | 725 + .../v2020_12_01/operations/__init__.py | 52 + ...p_service_certificate_orders_operations.py | 1423 + .../_app_service_environments_operations.py | 3425 ++ .../_app_service_plans_operations.py | 1946 ++ ...rtificate_orders_diagnostics_operations.py | 197 + ...ficate_registration_provider_operations.py | 104 + .../operations/_certificates_operations.py | 442 + .../_deleted_web_apps_operations.py | 238 + .../operations/_diagnostics_operations.py | 1713 + ...domain_registration_provider_operations.py | 104 + .../operations/_domains_operations.py | 1090 + .../operations/_global_model_operations.py | 211 + .../_kube_environments_operations.py | 43 +- .../operations/_provider_operations.py | 533 + .../operations/_recommendations_operations.py | 1070 + .../_resource_health_metadata_operations.py | 468 + .../operations/_static_sites_operations.py | 3803 +++ .../_top_level_domains_operations.py | 251 + .../operations/_web_apps_operations.py | 28441 ++++++++++++++++ .../_web_site_management_client_operations.py | 1125 + .../azure_mgmt_web/v2020_12_01/version.py | 13 + 74 files changed, 159631 insertions(+), 903 deletions(-) create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_version.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/py.typed create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_certificate_orders_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_environments_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_plans_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificate_registration_provider_operations.py rename src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/{v2019_08_01/operations/_kube_environments_operations.py => v2020_09_01/operations/_certificates_operations.py} (57%) create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_deleted_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_diagnostics_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domain_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_recommendations_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_resource_health_metadata_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_static_sites_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_top_level_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_site_management_client_operations.py rename src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/{ => v2020_09_01}/version.py (96%) create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_configuration.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_web_site_management_client.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_paged_models.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_web_site_management_client_enums.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/__init__.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_certificate_orders_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_environments_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_plans_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificates_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_deleted_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_diagnostics_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domain_registration_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_global_model_operations.py rename src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/{v2020_06_01 => v2020_12_01}/operations/_kube_environments_operations.py (93%) create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_provider_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_recommendations_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_resource_health_metadata_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_static_sites_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_top_level_domains_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_site_management_client_operations.py create mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/version.py diff --git a/src/appservice-kube/azext_appservice_kube/__init__.py b/src/appservice-kube/azext_appservice_kube/__init__.py index 506bc2168d3..261efc73108 100644 --- a/src/appservice-kube/azext_appservice_kube/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/__init__.py @@ -14,7 +14,7 @@ class AppserviceCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - register_resource_type('latest', CUSTOM_MGMT_APPSERVICE, '2020-06-01') + register_resource_type('latest', CUSTOM_MGMT_APPSERVICE, '2020-12-01') appservice_kube_custom = CliCommandType( operations_tmpl='azext_appservice_kube.custom#{}') diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py index 55c66f839cf..52fd452901f 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py @@ -13,7 +13,7 @@ from ._web_site_management_client import WebSiteManagementClient __all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] -from .version import VERSION +from ._version import VERSION __version__ = VERSION diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py index b96e0933169..53c93356cb9 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py @@ -10,7 +10,7 @@ # -------------------------------------------------------------------------- from msrestazure import AzureConfiguration -from .version import VERSION +from ._version import VERSION class WebSiteManagementClientConfiguration(AzureConfiguration): diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py index 07323c7ed2d..392c53afb7a 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py @@ -26,7 +26,7 @@ def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' :type type: str or - ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes + ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes :param is_fqdn: Is fully qualified domain name. :type is_fqdn: bool :param dict custom_headers: headers that will be added to the request @@ -35,10 +35,10 @@ def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, :param operation_config: :ref:`Operation configuration overrides`. :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability or + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('check_name_availability') @@ -50,6 +50,10 @@ def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -60,6 +64,43 @@ def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, mixin_instance.api_version = api_version return mixin_instance.check_name_availability(name, type, is_fqdn, custom_headers, raw, **operation_config) + def generate_github_access_token_for_appservice_cli_async(self, code, state, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppserviceGithubToken or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + + """ + 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 NotImplementedError("APIVersion {} is not available".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance.config = self.config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + mixin_instance.api_version = api_version + return mixin_instance.generate_github_access_token_for_appservice_cli_async(code, state, custom_headers, raw, **operation_config) + def get_publishing_user(self, custom_headers=None, raw=False, **operation_config): """Gets publishing user. @@ -71,10 +112,10 @@ def get_publishing_user(self, custom_headers=None, raw=False, **operation_config :param operation_config: :ref:`Operation configuration overrides`. :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.User or + :rtype: ~azure.mgmt.web.v2020_12_01.models.User or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('get_publishing_user') @@ -86,6 +127,10 @@ def get_publishing_user(self, custom_headers=None, raw=False, **operation_config from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -109,10 +154,10 @@ def get_source_control(self, source_control_type, custom_headers=None, raw=False :param operation_config: :ref:`Operation configuration overrides`. :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl or + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('get_source_control') @@ -124,6 +169,10 @@ def get_source_control(self, source_control_type, custom_headers=None, raw=False from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -145,10 +194,10 @@ def get_subscription_deployment_locations(self, custom_headers=None, raw=False, :param operation_config: :ref:`Operation configuration overrides`. :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations or + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('get_subscription_deployment_locations') @@ -160,6 +209,10 @@ def get_subscription_deployment_locations(self, custom_headers=None, raw=False, from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -186,9 +239,9 @@ def list_billing_meters(self, billing_location=None, os_type=None, custom_header overrides`. :return: An iterator like instance of BillingMeter :rtype: - ~azure.mgmt.web.v2020_06_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeter] + ~azure.mgmt.web.v2020_12_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeter] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_billing_meters') @@ -198,6 +251,10 @@ def list_billing_meters(self, billing_location=None, os_type=None, custom_header from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -215,8 +272,9 @@ def list_geo_regions(self, sku=None, linux_workers_enabled=None, xenon_workers_e :param sku: Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' - :type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName + 'Isolated', 'IsolatedV2', 'PremiumV2', 'PremiumV3', + 'PremiumContainer', 'ElasticPremium', 'ElasticIsolated' + :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName :param linux_workers_enabled: Specify true if you want to filter to only regions that support Linux workers. :type linux_workers_enabled: bool @@ -233,9 +291,9 @@ def list_geo_regions(self, sku=None, linux_workers_enabled=None, xenon_workers_e overrides`. :return: An iterator like instance of GeoRegion :rtype: - ~azure.mgmt.web.v2020_06_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegion] + ~azure.mgmt.web.v2020_12_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegion] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_geo_regions') @@ -247,6 +305,10 @@ def list_geo_regions(self, sku=None, linux_workers_enabled=None, xenon_workers_e from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -269,9 +331,9 @@ def list_premier_add_on_offers(self, custom_headers=None, raw=False, **operation overrides`. :return: An iterator like instance of PremierAddOnOffer :rtype: - ~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOffer] + ~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOffer] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_premier_add_on_offers') @@ -283,6 +345,10 @@ def list_premier_add_on_offers(self, custom_headers=None, raw=False, **operation from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -307,9 +373,9 @@ def list_site_identifiers_assigned_to_host_name(self, name=None, custom_headers= overrides`. :return: An iterator like instance of Identifier :rtype: - ~azure.mgmt.web.v2020_06_01.models.IdentifierPaged[~azure.mgmt.web.v2020_06_01.models.Identifier] + ~azure.mgmt.web.v2020_12_01.models.IdentifierPaged[~azure.mgmt.web.v2020_12_01.models.Identifier] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_site_identifiers_assigned_to_host_name') @@ -321,6 +387,10 @@ def list_site_identifiers_assigned_to_host_name(self, name=None, custom_headers= from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -342,10 +412,10 @@ def list_skus(self, custom_headers=None, raw=False, **operation_config): :param operation_config: :ref:`Operation configuration overrides`. :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos or + :rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_skus') @@ -357,6 +427,10 @@ def list_skus(self, custom_headers=None, raw=False, **operation_config): from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -379,9 +453,9 @@ def list_source_controls(self, custom_headers=None, raw=False, **operation_confi overrides`. :return: An iterator like instance of SourceControl :rtype: - ~azure.mgmt.web.v2020_06_01.models.SourceControlPaged[~azure.mgmt.web.v2020_06_01.models.SourceControl] + ~azure.mgmt.web.v2020_12_01.models.SourceControlPaged[~azure.mgmt.web.v2020_12_01.models.SourceControl] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('list_source_controls') @@ -393,6 +467,10 @@ def list_source_controls(self, custom_headers=None, raw=False, **operation_confi from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -423,7 +501,7 @@ def move(self, resource_group_name, target_resource_group=None, resources=None, :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('move') @@ -435,6 +513,10 @@ def move(self, resource_group_name, target_resource_group=None, resources=None, from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -451,17 +533,17 @@ def update_publishing_user(self, user_details, custom_headers=None, raw=False, * Description for Updates publishing user. :param user_details: Details of publishing user - :type user_details: ~azure.mgmt.web.v2020_06_01.models.User + :type user_details: ~azure.mgmt.web.v2020_12_01.models.User :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.User or + :rtype: ~azure.mgmt.web.v2020_12_01.models.User or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('update_publishing_user') @@ -473,6 +555,10 @@ def update_publishing_user(self, user_details, custom_headers=None, raw=False, * from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -492,17 +578,17 @@ def update_source_control(self, source_control_type, request_message, custom_hea :type source_control_type: str :param request_message: Source control token information :type request_message: - ~azure.mgmt.web.v2020_06_01.models.SourceControl + ~azure.mgmt.web.v2020_12_01.models.SourceControl :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl or + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('update_source_control') @@ -514,6 +600,10 @@ def update_source_control(self, source_control_type, request_message, custom_hea from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -534,17 +624,17 @@ def validate(self, resource_group_name, validate_request, custom_headers=None, r :type resource_group_name: str :param validate_request: Request with the resources to validate. :type validate_request: - ~azure.mgmt.web.v2020_06_01.models.ValidateRequest + ~azure.mgmt.web.v2020_12_01.models.ValidateRequest :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse or + :rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('validate') @@ -556,6 +646,10 @@ def validate(self, resource_group_name, validate_request, custom_headers=None, r from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -621,7 +715,7 @@ def validate_move(self, resource_group_name, target_resource_group=None, resourc :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('validate_move') @@ -633,6 +727,10 @@ def validate_move(self, resource_group_name, target_resource_group=None, resourc from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() @@ -651,7 +749,7 @@ def verify_hosting_environment_vnet(self, parameters, custom_headers=None, raw=F Environment by analyzing the Network Security Group rules. :param parameters: VNET information - :type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters + :type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -659,10 +757,10 @@ def verify_hosting_environment_vnet(self, parameters, custom_headers=None, raw=F overrides`. :return: VnetValidationFailureDetails or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails or + ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ api_version = self._get_api_version('verify_hosting_environment_vnet') @@ -674,6 +772,10 @@ def verify_hosting_environment_vnet(self, parameters, custom_headers=None, raw=F from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) mixin_instance = OperationClass() diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_version.py new file mode 100644 index 00000000000..48944bf3938 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_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 = "2.0.0" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py index ebc80b3b123..90fa76f1ff7 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py @@ -46,7 +46,7 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiCl :type profile: azure.profiles.KnownProfiles """ - DEFAULT_API_VERSION = '2020-06-01' + DEFAULT_API_VERSION = '2020-12-01' _PROFILE_TAG = "azure.mgmt.web.WebSiteManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -83,6 +83,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2018-11-01: :mod:`v2018_11_01.models` * 2019-08-01: :mod:`v2019_08_01.models` * 2020-06-01: :mod:`v2020_06_01.models` + * 2020-09-01: :mod:`v2020_09_01.models` + * 2020-12-01: :mod:`v2020_12_01.models` """ if api_version == '2015-04-01': from .v2015_04_01 import models @@ -111,6 +113,12 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-06-01': from .v2020_06_01 import models return models + elif api_version == '2020-09-01': + from .v2020_09_01 import models + return models + elif api_version == '2020-12-01': + from .v2020_12_01 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -121,6 +129,8 @@ def app_service_certificate_orders(self): * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` * 2019-08-01: :class:`AppServiceCertificateOrdersOperations` * 2020-06-01: :class:`AppServiceCertificateOrdersOperations` + * 2020-09-01: :class:`AppServiceCertificateOrdersOperations` + * 2020-12-01: :class:`AppServiceCertificateOrdersOperations` """ api_version = self._get_api_version('app_service_certificate_orders') if api_version == '2015-08-01': @@ -131,6 +141,10 @@ def app_service_certificate_orders(self): from .v2019_08_01.operations import AppServiceCertificateOrdersOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import AppServiceCertificateOrdersOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import AppServiceCertificateOrdersOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import AppServiceCertificateOrdersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -143,6 +157,8 @@ def app_service_environments(self): * 2018-02-01: :class:`AppServiceEnvironmentsOperations` * 2019-08-01: :class:`AppServiceEnvironmentsOperations` * 2020-06-01: :class:`AppServiceEnvironmentsOperations` + * 2020-09-01: :class:`AppServiceEnvironmentsOperations` + * 2020-12-01: :class:`AppServiceEnvironmentsOperations` """ api_version = self._get_api_version('app_service_environments') if api_version == '2016-09-01': @@ -153,6 +169,10 @@ def app_service_environments(self): from .v2019_08_01.operations import AppServiceEnvironmentsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import AppServiceEnvironmentsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import AppServiceEnvironmentsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import AppServiceEnvironmentsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -165,6 +185,8 @@ def app_service_plans(self): * 2018-02-01: :class:`AppServicePlansOperations` * 2019-08-01: :class:`AppServicePlansOperations` * 2020-06-01: :class:`AppServicePlansOperations` + * 2020-09-01: :class:`AppServicePlansOperations` + * 2020-12-01: :class:`AppServicePlansOperations` """ api_version = self._get_api_version('app_service_plans') if api_version == '2016-09-01': @@ -175,6 +197,10 @@ def app_service_plans(self): from .v2019_08_01.operations import AppServicePlansOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import AppServicePlansOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import AppServicePlansOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import AppServicePlansOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -192,6 +218,19 @@ def billing_meters(self): raise NotImplementedError("APIVersion {} is not available".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 NotImplementedError("APIVersion {} is not available".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: @@ -200,6 +239,8 @@ def certificate_registration_provider(self): * 2018-02-01: :class:`CertificateRegistrationProviderOperations` * 2019-08-01: :class:`CertificateRegistrationProviderOperations` * 2020-06-01: :class:`CertificateRegistrationProviderOperations` + * 2020-09-01: :class:`CertificateRegistrationProviderOperations` + * 2020-12-01: :class:`CertificateRegistrationProviderOperations` """ api_version = self._get_api_version('certificate_registration_provider') if api_version == '2015-08-01': @@ -210,6 +251,10 @@ def certificate_registration_provider(self): from .v2019_08_01.operations import CertificateRegistrationProviderOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import CertificateRegistrationProviderOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import CertificateRegistrationProviderOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import CertificateRegistrationProviderOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -223,6 +268,8 @@ def certificates(self): * 2018-11-01: :class:`CertificatesOperations` * 2019-08-01: :class:`CertificatesOperations` * 2020-06-01: :class:`CertificatesOperations` + * 2020-09-01: :class:`CertificatesOperations` + * 2020-12-01: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2016-03-01': @@ -235,6 +282,10 @@ def certificates(self): from .v2019_08_01.operations import CertificatesOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import CertificatesOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import CertificatesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import CertificatesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -247,6 +298,8 @@ def deleted_web_apps(self): * 2018-02-01: :class:`DeletedWebAppsOperations` * 2019-08-01: :class:`DeletedWebAppsOperations` * 2020-06-01: :class:`DeletedWebAppsOperations` + * 2020-09-01: :class:`DeletedWebAppsOperations` + * 2020-12-01: :class:`DeletedWebAppsOperations` """ api_version = self._get_api_version('deleted_web_apps') if api_version == '2016-03-01': @@ -257,6 +310,10 @@ def deleted_web_apps(self): from .v2019_08_01.operations import DeletedWebAppsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import DeletedWebAppsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import DeletedWebAppsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import DeletedWebAppsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -269,6 +326,8 @@ def diagnostics(self): * 2018-02-01: :class:`DiagnosticsOperations` * 2019-08-01: :class:`DiagnosticsOperations` * 2020-06-01: :class:`DiagnosticsOperations` + * 2020-09-01: :class:`DiagnosticsOperations` + * 2020-12-01: :class:`DiagnosticsOperations` """ api_version = self._get_api_version('diagnostics') if api_version == '2016-03-01': @@ -279,6 +338,10 @@ def diagnostics(self): from .v2019_08_01.operations import DiagnosticsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import DiagnosticsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import DiagnosticsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import DiagnosticsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -291,6 +354,8 @@ def domain_registration_provider(self): * 2018-02-01: :class:`DomainRegistrationProviderOperations` * 2019-08-01: :class:`DomainRegistrationProviderOperations` * 2020-06-01: :class:`DomainRegistrationProviderOperations` + * 2020-09-01: :class:`DomainRegistrationProviderOperations` + * 2020-12-01: :class:`DomainRegistrationProviderOperations` """ api_version = self._get_api_version('domain_registration_provider') if api_version == '2015-04-01': @@ -301,6 +366,10 @@ def domain_registration_provider(self): from .v2019_08_01.operations import DomainRegistrationProviderOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import DomainRegistrationProviderOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import DomainRegistrationProviderOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import DomainRegistrationProviderOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -313,6 +382,8 @@ def domains(self): * 2018-02-01: :class:`DomainsOperations` * 2019-08-01: :class:`DomainsOperations` * 2020-06-01: :class:`DomainsOperations` + * 2020-09-01: :class:`DomainsOperations` + * 2020-12-01: :class:`DomainsOperations` """ api_version = self._get_api_version('domains') if api_version == '2015-04-01': @@ -323,6 +394,23 @@ def domains(self): from .v2019_08_01.operations import DomainsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import DomainsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import DomainsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import DomainsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".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:`GlobalModelOperations` + """ + api_version = self._get_api_version('global_model') + if api_version == '2020-12-01': + from .v2020_12_01.operations import GlobalModelOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -331,11 +419,11 @@ def domains(self): def kube_environments(self): """Instance depends on the API version: - * 2020-06-01: :class:`KubeEnvironmentsOperations` + * 2020-12-01: :class:`KubeEnvironmentsOperations` """ api_version = self._get_api_version('kube_environments') - if api_version == '2020-06-01': - from .v2020_06_01.operations import KubeEnvironmentsOperations as OperationClass + if api_version == '2020-12-01': + from .v2020_12_01.operations import KubeEnvironmentsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -348,6 +436,8 @@ def provider(self): * 2018-02-01: :class:`ProviderOperations` * 2019-08-01: :class:`ProviderOperations` * 2020-06-01: :class:`ProviderOperations` + * 2020-09-01: :class:`ProviderOperations` + * 2020-12-01: :class:`ProviderOperations` """ api_version = self._get_api_version('provider') if api_version == '2016-03-01': @@ -358,6 +448,10 @@ def provider(self): from .v2019_08_01.operations import ProviderOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import ProviderOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import ProviderOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import ProviderOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -370,6 +464,8 @@ def recommendations(self): * 2018-02-01: :class:`RecommendationsOperations` * 2019-08-01: :class:`RecommendationsOperations` * 2020-06-01: :class:`RecommendationsOperations` + * 2020-09-01: :class:`RecommendationsOperations` + * 2020-12-01: :class:`RecommendationsOperations` """ api_version = self._get_api_version('recommendations') if api_version == '2016-03-01': @@ -380,6 +476,10 @@ def recommendations(self): from .v2019_08_01.operations import RecommendationsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import RecommendationsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import RecommendationsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import RecommendationsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -392,6 +492,8 @@ def resource_health_metadata(self): * 2018-02-01: :class:`ResourceHealthMetadataOperations` * 2019-08-01: :class:`ResourceHealthMetadataOperations` * 2020-06-01: :class:`ResourceHealthMetadataOperations` + * 2020-09-01: :class:`ResourceHealthMetadataOperations` + * 2020-12-01: :class:`ResourceHealthMetadataOperations` """ api_version = self._get_api_version('resource_health_metadata') if api_version == '2016-03-01': @@ -402,6 +504,10 @@ def resource_health_metadata(self): from .v2019_08_01.operations import ResourceHealthMetadataOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import ResourceHealthMetadataOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import ResourceHealthMetadataOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import ResourceHealthMetadataOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -412,12 +518,18 @@ 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': from .v2019_08_01.operations import StaticSitesOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import StaticSitesOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import StaticSitesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import StaticSitesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -430,6 +542,8 @@ def top_level_domains(self): * 2018-02-01: :class:`TopLevelDomainsOperations` * 2019-08-01: :class:`TopLevelDomainsOperations` * 2020-06-01: :class:`TopLevelDomainsOperations` + * 2020-09-01: :class:`TopLevelDomainsOperations` + * 2020-12-01: :class:`TopLevelDomainsOperations` """ api_version = self._get_api_version('top_level_domains') if api_version == '2015-04-01': @@ -440,6 +554,10 @@ def top_level_domains(self): from .v2019_08_01.operations import TopLevelDomainsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import TopLevelDomainsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import TopLevelDomainsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import TopLevelDomainsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -452,6 +570,8 @@ def web_apps(self): * 2018-02-01: :class:`WebAppsOperations` * 2019-08-01: :class:`WebAppsOperations` * 2020-06-01: :class:`WebAppsOperations` + * 2020-09-01: :class:`WebAppsOperations` + * 2020-12-01: :class:`WebAppsOperations` """ api_version = self._get_api_version('web_apps') if api_version == '2016-08-01': @@ -462,6 +582,10 @@ def web_apps(self): from .v2019_08_01.operations import WebAppsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import WebAppsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import WebAppsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import WebAppsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py index 6424d4e4638..f0f487c4400 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py @@ -6,4 +6,4 @@ # -------------------------------------------------------------------------- from .v2016_03_01.models import * from .v2018_02_01.models import * -from .v2020_06_01.models import * +from .v2020_12_01.models import * diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/py.typed b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py index 921f7bcf808..ff0a257aa46 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py @@ -834,10 +834,10 @@ def get_ownership_identifier( def create_or_update_ownership_identifier( self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): """Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -972,10 +972,10 @@ def delete_ownership_identifier( def update_ownership_identifier( self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): """Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py index 3dcb3a8654d..8aa46a7a4e7 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py @@ -824,10 +824,10 @@ def get_ownership_identifier( def create_or_update_ownership_identifier( self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): """Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -961,10 +961,10 @@ def delete_ownership_identifier( def update_ownership_identifier( self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): """Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py index d14df260f87..8932a5abf48 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py @@ -823,10 +823,10 @@ def get_ownership_identifier( def create_or_update_ownership_identifier( self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): """Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. Description for Creates an ownership identifier for a domain or updates - identifier details for an existing identifer. + identifier details for an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -959,10 +959,10 @@ def delete_ownership_identifier( def update_ownership_identifier( self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): """Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. Description for Creates an ownership identifier for a domain or updates - identifier details for an existing identifer. + identifier details for an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py index 17dafedeb44..cdf4ed97614 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py @@ -22,7 +22,6 @@ from .operations import CertificatesOperations from .operations import DeletedWebAppsOperations from .operations import DiagnosticsOperations -from .operations import KubeEnvironmentsOperations from .operations import ProviderOperations from .operations import RecommendationsOperations from .operations import WebAppsOperations @@ -55,8 +54,6 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient) :vartype deleted_web_apps: azure.mgmt.web.v2020_06_01.operations.DeletedWebAppsOperations :ivar diagnostics: Diagnostics operations :vartype diagnostics: azure.mgmt.web.v2020_06_01.operations.DiagnosticsOperations - :ivar kube_environments: KubeEnvironments operations - :vartype kube_environments: azure.mgmt.web.v2020_06_01.operations.KubeEnvironmentsOperations :ivar provider: Provider operations :vartype provider: azure.mgmt.web.v2020_06_01.operations.ProviderOperations :ivar recommendations: Recommendations operations @@ -108,8 +105,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.diagnostics = DiagnosticsOperations( self._client, self.config, self._serialize, self._deserialize) - self.kube_environments = KubeEnvironmentsOperations( - self._client, self.config, self._serialize, self._deserialize) self.provider = ProviderOperations( self._client, self.config, self._serialize, self._deserialize) self.recommendations = RecommendationsOperations( diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py index 40088a7dceb..157dfd37127 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py @@ -21,7 +21,6 @@ from ._models_py3 import ApplicationLogsConfig from ._models_py3 import ApplicationStack from ._models_py3 import ApplicationStackResource - from ._models_py3 import AppLogsConfiguration from ._models_py3 import AppRegistration from ._models_py3 import AppServiceCertificate from ._models_py3 import AppServiceCertificateOrder @@ -33,7 +32,6 @@ from ._models_py3 import AppServiceEnvironmentResource from ._models_py3 import AppServicePlan from ._models_py3 import AppServicePlanPatchResource - from ._models_py3 import ArcConfiguration from ._models_py3 import ArmIdWrapper from ._models_py3 import AuthPlatform from ._models_py3 import AutoHealActions @@ -121,13 +119,11 @@ from ._models_py3 import EndpointDetail from ._models_py3 import ErrorEntity from ._models_py3 import Experiments - from ._models_py3 import ExtendedLocation 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 FrontEndConfiguration from ._models_py3 import FunctionEnvelope from ._models_py3 import FunctionSecrets from ._models_py3 import GeoRegion @@ -155,10 +151,7 @@ from ._models_py3 import IpSecurityRestriction from ._models_py3 import JwtClaimChecks from ._models_py3 import KeyInfo - from ._models_py3 import KubeEnvironment - from ._models_py3 import KubeEnvironmentProfile from ._models_py3 import LocalizableString - from ._models_py3 import LogAnalyticsConfiguration from ._models_py3 import Login from ._models_py3 import LoginRoutes from ._models_py3 import LoginScopes @@ -314,7 +307,6 @@ from ._models import ApplicationLogsConfig from ._models import ApplicationStack from ._models import ApplicationStackResource - from ._models import AppLogsConfiguration from ._models import AppRegistration from ._models import AppServiceCertificate from ._models import AppServiceCertificateOrder @@ -326,7 +318,6 @@ from ._models import AppServiceEnvironmentResource from ._models import AppServicePlan from ._models import AppServicePlanPatchResource - from ._models import ArcConfiguration from ._models import ArmIdWrapper from ._models import AuthPlatform from ._models import AutoHealActions @@ -414,13 +405,11 @@ from ._models import EndpointDetail from ._models import ErrorEntity from ._models import Experiments - from ._models import ExtendedLocation from ._models import Facebook from ._models import FileSystemApplicationLogsConfig from ._models import FileSystemHttpLogsConfig from ._models import FileSystemTokenStore from ._models import ForwardProxy - from ._models import FrontEndConfiguration from ._models import FunctionEnvelope from ._models import FunctionSecrets from ._models import GeoRegion @@ -448,10 +437,7 @@ from ._models import IpSecurityRestriction from ._models import JwtClaimChecks from ._models import KeyInfo - from ._models import KubeEnvironment - from ._models import KubeEnvironmentProfile from ._models import LocalizableString - from ._models import LogAnalyticsConfiguration from ._models import Login from ._models import LoginRoutes from ._models import LoginScopes @@ -620,7 +606,6 @@ from ._paged_models import HybridConnectionPaged from ._paged_models import IdentifierPaged from ._paged_models import InboundEnvironmentEndpointPaged -from ._paged_models import KubeEnvironmentPaged from ._paged_models import NameIdentifierPaged from ._paged_models import OutboundEnvironmentEndpointPaged from ._paged_models import PerfMonResponsePaged @@ -693,9 +678,6 @@ IssueType, SolutionType, RenderingType, - StorageType, - FrontEndServiceType, - KubeEnvironmentProvisioningState, ResourceScopeType, NotificationLevel, Channels, @@ -745,7 +727,6 @@ 'ApplicationLogsConfig', 'ApplicationStack', 'ApplicationStackResource', - 'AppLogsConfiguration', 'AppRegistration', 'AppServiceCertificate', 'AppServiceCertificateOrder', @@ -757,7 +738,6 @@ 'AppServiceEnvironmentResource', 'AppServicePlan', 'AppServicePlanPatchResource', - 'ArcConfiguration', 'ArmIdWrapper', 'AuthPlatform', 'AutoHealActions', @@ -845,13 +825,11 @@ 'EndpointDetail', 'ErrorEntity', 'Experiments', - 'ExtendedLocation', 'Facebook', 'FileSystemApplicationLogsConfig', 'FileSystemHttpLogsConfig', 'FileSystemTokenStore', 'ForwardProxy', - 'FrontEndConfiguration', 'FunctionEnvelope', 'FunctionSecrets', 'GeoRegion', @@ -879,10 +857,7 @@ 'IpSecurityRestriction', 'JwtClaimChecks', 'KeyInfo', - 'KubeEnvironment', - 'KubeEnvironmentProfile', 'LocalizableString', - 'LogAnalyticsConfiguration', 'Login', 'LoginRoutes', 'LoginScopes', @@ -1040,7 +1015,6 @@ 'DiagnosticCategoryPaged', 'AnalysisDefinitionPaged', 'DetectorDefinitionPaged', - 'KubeEnvironmentPaged', 'ApplicationStackResourcePaged', 'RecommendationPaged', 'SourceControlPaged', @@ -1123,9 +1097,6 @@ 'IssueType', 'SolutionType', 'RenderingType', - 'StorageType', - 'FrontEndServiceType', - 'KubeEnvironmentProvisioningState', 'ResourceScopeType', 'NotificationLevel', 'Channels', diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py index 644509cc847..582a49ef321 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py @@ -437,27 +437,6 @@ def __init__(self, **kwargs): self.frameworks = kwargs.get('frameworks', None) -class AppLogsConfiguration(Model): - """AppLogsConfiguration. - - :param destination: - :type destination: str - :param log_analytics_configuration: - :type log_analytics_configuration: - ~azure.mgmt.web.v2020_06_01.models.LogAnalyticsConfiguration - """ - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'str'}, - 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, - } - - def __init__(self, **kwargs): - super(AppLogsConfiguration, self).__init__(**kwargs) - self.destination = kwargs.get('destination', None) - self.log_analytics_configuration = kwargs.get('log_analytics_configuration', None) - - class AppRegistration(ProxyOnlyResource): """AppRegistration. @@ -1819,10 +1798,6 @@ class AppServicePlan(Resource): 'InProgress', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.web.v2020_06_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_06_01.models.KubeEnvironmentProfile :param sku: :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription """ @@ -1867,7 +1842,6 @@ class AppServicePlan(Resource): 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } @@ -1892,7 +1866,6 @@ def __init__(self, **kwargs): 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) self.sku = kwargs.get('sku', None) @@ -1948,8 +1921,10 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :type free_offer_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . + :param reserved: This needs to set to true when creating a + Linux App Service Plan, along with kind set to + Linux. It should be false otherwise. Default + value: False . :type reserved: bool :param is_xenon: Obsolete: If Hyper-V container app service plan true, false otherwise. Default value: False . @@ -1961,15 +1936,11 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :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' + :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_06_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_06_01.models.KubeEnvironmentProfile """ _validation = { @@ -2009,7 +1980,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, } def __init__(self, **kwargs): @@ -2033,55 +2003,6 @@ def __init__(self, **kwargs): 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 ArcConfiguration(Model): - """ArcConfiguration. - - :param artifacts_storage_type: Possible values include: 'LocalNode', - 'NetworkFileSystem' - :type artifacts_storage_type: str or - ~azure.mgmt.web.v2020_06_01.models.StorageType - :param artifact_storage_class_name: - :type artifact_storage_class_name: str - :param artifact_storage_mount_path: - :type artifact_storage_mount_path: str - :param artifact_storage_node_name: - :type artifact_storage_node_name: str - :param artifact_storage_access_mode: - :type artifact_storage_access_mode: str - :param front_end_service_configuration: - :type front_end_service_configuration: - ~azure.mgmt.web.v2020_06_01.models.FrontEndConfiguration - :param app_logs_configuration: - :type app_logs_configuration: - ~azure.mgmt.web.v2020_06_01.models.AppLogsConfiguration - :param kube_config: - :type kube_config: str - """ - - _attribute_map = { - 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, - 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, - 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, - 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, - 'artifact_storage_access_mode': {'key': 'artifactStorageAccessMode', 'type': 'str'}, - 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, - 'app_logs_configuration': {'key': 'appLogsConfiguration', 'type': 'AppLogsConfiguration'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArcConfiguration, self).__init__(**kwargs) - self.artifacts_storage_type = kwargs.get('artifacts_storage_type', None) - self.artifact_storage_class_name = kwargs.get('artifact_storage_class_name', None) - self.artifact_storage_mount_path = kwargs.get('artifact_storage_mount_path', None) - self.artifact_storage_node_name = kwargs.get('artifact_storage_node_name', None) - self.artifact_storage_access_mode = kwargs.get('artifact_storage_access_mode', None) - self.front_end_service_configuration = kwargs.get('front_end_service_configuration', None) - self.app_logs_configuration = kwargs.get('app_logs_configuration', None) - self.kube_config = kwargs.get('kube_config', None) class ArmIdWrapper(Model): @@ -5963,22 +5884,6 @@ def __init__(self, **kwargs): self.ramp_up_rules = kwargs.get('ramp_up_rules', None) -class ExtendedLocation(Model): - """ExtendedLocation. - - :param custom_location: - :type custom_location: str - """ - - _attribute_map = { - 'custom_location': {'key': 'customLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedLocation, self).__init__(**kwargs) - self.custom_location = kwargs.get('custom_location', None) - - class Facebook(ProxyOnlyResource): """Facebook. @@ -6163,22 +6068,6 @@ def __init__(self, **kwargs): self.custom_proto_header_name = kwargs.get('custom_proto_header_name', None) -class FrontEndConfiguration(Model): - """FrontEndConfiguration. - - :param kind: Possible values include: 'NodePort', 'LoadBalancer' - :type kind: str or ~azure.mgmt.web.v2020_06_01.models.FrontEndServiceType - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, - } - - def __init__(self, **kwargs): - super(FrontEndConfiguration, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - - class FunctionEnvelope(ProxyOnlyResource): """Function information. @@ -7336,125 +7225,6 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) -class KubeEnvironment(Resource): - """A Kubernetes cluster specialized for web workloads by Azure App Service. - - 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: Resource tags. - :type tags: dict[str, str] - :param extended_location: - :type extended_location: - ~azure.mgmt.web.v2020_06_01.models.ExtendedLocation - :ivar provisioning_state: Provisioning state of the Kubernetes - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Waiting', 'InitializationInProgress', 'InfrastructureSetupInProgress', - 'InfrastructureSetupComplete', 'ScheduledForDelete', 'UpgradeRequested', - 'UpgradeFailed' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_06_01.models.KubeEnvironmentProvisioningState - :ivar deployment_errors: Any errors that occurred during deployment or - deployment validation - :vartype deployment_errors: str - :param internal_load_balancer_enabled: Only visible within Vnet/Subnet - :type internal_load_balancer_enabled: bool - :param static_ip: Static IP of the KubeEnvironment - :type static_ip: str - :param namespace: - :type namespace: str - :param arc_configuration: Cluster configuration which determines the ARC - cluster - components types. Eg: Choosing between BuildService kind, - FrontEnd Service ArtifactsStorageType etc. - :type arc_configuration: - ~azure.mgmt.web.v2020_06_01.models.ArcConfiguration - :param aks_resource_id: - :type aks_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'deployment_errors': {'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}'}, - 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KubeEnvironmentProvisioningState'}, - 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, - 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, - 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, - 'namespace': {'key': 'properties.namespace', 'type': 'str'}, - 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, - 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KubeEnvironment, self).__init__(**kwargs) - self.extended_location = kwargs.get('extended_location', None) - self.provisioning_state = None - self.deployment_errors = None - self.internal_load_balancer_enabled = kwargs.get('internal_load_balancer_enabled', None) - self.static_ip = kwargs.get('static_ip', None) - self.namespace = kwargs.get('namespace', None) - self.arc_configuration = kwargs.get('arc_configuration', None) - self.aks_resource_id = kwargs.get('aks_resource_id', None) - - -class KubeEnvironmentProfile(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 LocalizableString(Model): """Localizable string object containing the name and a localized value. @@ -7475,26 +7245,6 @@ def __init__(self, **kwargs): self.localized_value = kwargs.get('localized_value', None) -class LogAnalyticsConfiguration(Model): - """LogAnalyticsConfiguration. - - :param customer_id: - :type customer_id: str - :param shared_key: - :type shared_key: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'shared_key': {'key': 'sharedKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsConfiguration, self).__init__(**kwargs) - self.customer_id = kwargs.get('customer_id', None) - self.shared_key = kwargs.get('shared_key', None) - - class Login(ProxyOnlyResource): """Login. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py index 7ee96120d6b..e8a2e342f8b 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py @@ -437,27 +437,6 @@ def __init__(self, *, kind: str=None, application_stack_resource_name: str=None, self.frameworks = frameworks -class AppLogsConfiguration(Model): - """AppLogsConfiguration. - - :param destination: - :type destination: str - :param log_analytics_configuration: - :type log_analytics_configuration: - ~azure.mgmt.web.v2020_06_01.models.LogAnalyticsConfiguration - """ - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'str'}, - 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, - } - - def __init__(self, *, destination: str=None, log_analytics_configuration=None, **kwargs) -> None: - super(AppLogsConfiguration, self).__init__(**kwargs) - self.destination = destination - self.log_analytics_configuration = log_analytics_configuration - - class AppRegistration(ProxyOnlyResource): """AppRegistration. @@ -1819,10 +1798,6 @@ class AppServicePlan(Resource): 'InProgress', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.web.v2020_06_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_06_01.models.KubeEnvironmentProfile :param sku: :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription """ @@ -1867,11 +1842,10 @@ class AppServicePlan(Resource): 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, sku=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.worker_tier_name = worker_tier_name self.status = None @@ -1892,7 +1866,6 @@ def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name 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 self.sku = sku @@ -1948,8 +1921,10 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :type free_offer_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . + :param reserved: This needs to set to true when creating a + Linux App Service Plan, along with kind set to + Linux. It should be false otherwise. Default + value: False . :type reserved: bool :param is_xenon: Obsolete: If Hyper-V container app service plan true, false otherwise. Default value: False . @@ -1961,15 +1936,11 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :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' + :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_06_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_06_01.models.KubeEnvironmentProfile """ _validation = { @@ -2009,10 +1980,9 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, } - def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: super(AppServicePlanPatchResource, self).__init__(kind=kind, **kwargs) self.worker_tier_name = worker_tier_name self.status = None @@ -2033,55 +2003,6 @@ def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_enviro 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 ArcConfiguration(Model): - """ArcConfiguration. - - :param artifacts_storage_type: Possible values include: 'LocalNode', - 'NetworkFileSystem' - :type artifacts_storage_type: str or - ~azure.mgmt.web.v2020_06_01.models.StorageType - :param artifact_storage_class_name: - :type artifact_storage_class_name: str - :param artifact_storage_mount_path: - :type artifact_storage_mount_path: str - :param artifact_storage_node_name: - :type artifact_storage_node_name: str - :param artifact_storage_access_mode: - :type artifact_storage_access_mode: str - :param front_end_service_configuration: - :type front_end_service_configuration: - ~azure.mgmt.web.v2020_06_01.models.FrontEndConfiguration - :param app_logs_configuration: - :type app_logs_configuration: - ~azure.mgmt.web.v2020_06_01.models.AppLogsConfiguration - :param kube_config: - :type kube_config: str - """ - - _attribute_map = { - 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, - 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, - 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, - 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, - 'artifact_storage_access_mode': {'key': 'artifactStorageAccessMode', 'type': 'str'}, - 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, - 'app_logs_configuration': {'key': 'appLogsConfiguration', 'type': 'AppLogsConfiguration'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - } - - def __init__(self, *, artifacts_storage_type=None, artifact_storage_class_name: str=None, artifact_storage_mount_path: str=None, artifact_storage_node_name: str=None, artifact_storage_access_mode: str=None, front_end_service_configuration=None, app_logs_configuration=None, kube_config: str=None, **kwargs) -> None: - super(ArcConfiguration, self).__init__(**kwargs) - self.artifacts_storage_type = artifacts_storage_type - self.artifact_storage_class_name = artifact_storage_class_name - self.artifact_storage_mount_path = artifact_storage_mount_path - self.artifact_storage_node_name = artifact_storage_node_name - self.artifact_storage_access_mode = artifact_storage_access_mode - self.front_end_service_configuration = front_end_service_configuration - self.app_logs_configuration = app_logs_configuration - self.kube_config = kube_config class ArmIdWrapper(Model): @@ -5963,22 +5884,6 @@ def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: self.ramp_up_rules = ramp_up_rules -class ExtendedLocation(Model): - """ExtendedLocation. - - :param custom_location: - :type custom_location: str - """ - - _attribute_map = { - 'custom_location': {'key': 'customLocation', 'type': 'str'}, - } - - def __init__(self, *, custom_location: str=None, **kwargs) -> None: - super(ExtendedLocation, self).__init__(**kwargs) - self.custom_location = custom_location - - class Facebook(ProxyOnlyResource): """Facebook. @@ -6163,22 +6068,6 @@ def __init__(self, *, kind: str=None, convention=None, custom_host_header_name: self.custom_proto_header_name = custom_proto_header_name -class FrontEndConfiguration(Model): - """FrontEndConfiguration. - - :param kind: Possible values include: 'NodePort', 'LoadBalancer' - :type kind: str or ~azure.mgmt.web.v2020_06_01.models.FrontEndServiceType - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(FrontEndConfiguration, self).__init__(**kwargs) - self.kind = kind - - class FunctionEnvelope(ProxyOnlyResource): """Function information. @@ -7336,125 +7225,6 @@ def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: self.value = value -class KubeEnvironment(Resource): - """A Kubernetes cluster specialized for web workloads by Azure App Service. - - 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: Resource tags. - :type tags: dict[str, str] - :param extended_location: - :type extended_location: - ~azure.mgmt.web.v2020_06_01.models.ExtendedLocation - :ivar provisioning_state: Provisioning state of the Kubernetes - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Waiting', 'InitializationInProgress', 'InfrastructureSetupInProgress', - 'InfrastructureSetupComplete', 'ScheduledForDelete', 'UpgradeRequested', - 'UpgradeFailed' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_06_01.models.KubeEnvironmentProvisioningState - :ivar deployment_errors: Any errors that occurred during deployment or - deployment validation - :vartype deployment_errors: str - :param internal_load_balancer_enabled: Only visible within Vnet/Subnet - :type internal_load_balancer_enabled: bool - :param static_ip: Static IP of the KubeEnvironment - :type static_ip: str - :param namespace: - :type namespace: str - :param arc_configuration: Cluster configuration which determines the ARC - cluster - components types. Eg: Choosing between BuildService kind, - FrontEnd Service ArtifactsStorageType etc. - :type arc_configuration: - ~azure.mgmt.web.v2020_06_01.models.ArcConfiguration - :param aks_resource_id: - :type aks_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'deployment_errors': {'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}'}, - 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KubeEnvironmentProvisioningState'}, - 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, - 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, - 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, - 'namespace': {'key': 'properties.namespace', 'type': 'str'}, - 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, - 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, extended_location=None, internal_load_balancer_enabled: bool=None, static_ip: str=None, namespace: str=None, arc_configuration=None, aks_resource_id: str=None, **kwargs) -> None: - super(KubeEnvironment, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.extended_location = extended_location - self.provisioning_state = None - self.deployment_errors = None - self.internal_load_balancer_enabled = internal_load_balancer_enabled - self.static_ip = static_ip - self.namespace = namespace - self.arc_configuration = arc_configuration - self.aks_resource_id = aks_resource_id - - -class KubeEnvironmentProfile(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: str=None, **kwargs) -> None: - super(KubeEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - class LocalizableString(Model): """Localizable string object containing the name and a localized value. @@ -7475,26 +7245,6 @@ def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> N self.localized_value = localized_value -class LogAnalyticsConfiguration(Model): - """LogAnalyticsConfiguration. - - :param customer_id: - :type customer_id: str - :param shared_key: - :type shared_key: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'shared_key': {'key': 'sharedKey', 'type': 'str'}, - } - - def __init__(self, *, customer_id: str=None, shared_key: str=None, **kwargs) -> None: - super(LogAnalyticsConfiguration, self).__init__(**kwargs) - self.customer_id = customer_id - self.shared_key = shared_key - - class Login(ProxyOnlyResource): """Login. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py index 18cfd9b17b3..beed9cc177b 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py @@ -194,19 +194,6 @@ class DetectorDefinitionPaged(Paged): def __init__(self, *args, **kwargs): super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) -class KubeEnvironmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`KubeEnvironment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KubeEnvironment]'} - } - - def __init__(self, *args, **kwargs): - - super(KubeEnvironmentPaged, self).__init__(*args, **kwargs) class ApplicationStackResourcePaged(Paged): """ A paging container for iterating over a list of :class:`ApplicationStackResource ` object diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py index e06bfb981ad..08e3271c0e8 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py @@ -345,32 +345,6 @@ class RenderingType(str, Enum): time_series_per_instance = "TimeSeriesPerInstance" -class StorageType(str, Enum): - - local_node = "LocalNode" - network_file_system = "NetworkFileSystem" - - -class FrontEndServiceType(str, Enum): - - node_port = "NodePort" - load_balancer = "LoadBalancer" - - -class KubeEnvironmentProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - waiting = "Waiting" - initialization_in_progress = "InitializationInProgress" - infrastructure_setup_in_progress = "InfrastructureSetupInProgress" - infrastructure_setup_complete = "InfrastructureSetupComplete" - scheduled_for_delete = "ScheduledForDelete" - upgrade_requested = "UpgradeRequested" - upgrade_failed = "UpgradeFailed" - - class ResourceScopeType(str, Enum): server_farm = "ServerFarm" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py index bf42bd594b1..b6a3c15dcb7 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py @@ -17,7 +17,6 @@ from ._certificates_operations import CertificatesOperations from ._deleted_web_apps_operations import DeletedWebAppsOperations from ._diagnostics_operations import DiagnosticsOperations -from ._kube_environments_operations import KubeEnvironmentsOperations from ._provider_operations import ProviderOperations from ._recommendations_operations import RecommendationsOperations from ._web_apps_operations import WebAppsOperations @@ -36,7 +35,6 @@ 'CertificatesOperations', 'DeletedWebAppsOperations', 'DiagnosticsOperations', - 'KubeEnvironmentsOperations', 'ProviderOperations', 'RecommendationsOperations', 'WebAppsOperations', diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py index a210462fa9d..5f5e6513c8d 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py @@ -823,10 +823,10 @@ def get_ownership_identifier( def create_or_update_ownership_identifier( self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): """Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. Description for Creates an ownership identifier for a domain or updates - identifier details for an existing identifer. + identifier details for an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -959,10 +959,10 @@ def delete_ownership_identifier( def update_ownership_identifier( self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): """Creates an ownership identifier for a domain or updates identifier - details for an existing identifer. + details for an existing identifier. Description for Creates an ownership identifier for a domain or updates - identifier details for an existing identifer. + identifier details for an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_web_site_management_client.py new file mode 100644 index 00000000000..5b6463b1e27 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_web_site_management_client.py @@ -0,0 +1,121 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import WebSiteManagementClientOperationsMixin +from .operations import AppServiceCertificateOrdersOperations +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 ProviderOperations +from .operations import RecommendationsOperations +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, SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar app_service_certificate_orders: AppServiceCertificateOrders operations + :vartype app_service_certificate_orders: azure.mgmt.web.v2020_09_01.operations.AppServiceCertificateOrdersOperations + :ivar certificate_registration_provider: CertificateRegistrationProvider operations + :vartype certificate_registration_provider: azure.mgmt.web.v2020_09_01.operations.CertificateRegistrationProviderOperations + :ivar domains: Domains operations + :vartype domains: azure.mgmt.web.v2020_09_01.operations.DomainsOperations + :ivar top_level_domains: TopLevelDomains operations + :vartype top_level_domains: azure.mgmt.web.v2020_09_01.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProvider operations + :vartype domain_registration_provider: azure.mgmt.web.v2020_09_01.operations.DomainRegistrationProviderOperations + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.web.v2020_09_01.operations.CertificatesOperations + :ivar deleted_web_apps: DeletedWebApps operations + :vartype deleted_web_apps: azure.mgmt.web.v2020_09_01.operations.DeletedWebAppsOperations + :ivar diagnostics: Diagnostics operations + :vartype diagnostics: azure.mgmt.web.v2020_09_01.operations.DiagnosticsOperations + :ivar provider: Provider operations + :vartype provider: azure.mgmt.web.v2020_09_01.operations.ProviderOperations + :ivar recommendations: Recommendations operations + :vartype recommendations: azure.mgmt.web.v2020_09_01.operations.RecommendationsOperations + :ivar web_apps: WebApps operations + :vartype web_apps: azure.mgmt.web.v2020_09_01.operations.WebAppsOperations + :ivar static_sites: StaticSites operations + :vartype static_sites: azure.mgmt.web.v2020_09_01.operations.StaticSitesOperations + :ivar app_service_environments: AppServiceEnvironments operations + :vartype app_service_environments: azure.mgmt.web.v2020_09_01.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlans operations + :vartype app_service_plans: azure.mgmt.web.v2020_09_01.operations.AppServicePlansOperations + :ivar resource_health_metadata: ResourceHealthMetadata operations + :vartype resource_health_metadata: azure.mgmt.web.v2020_09_01.operations.ResourceHealthMetadataOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-09-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( + 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.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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/__init__.py new file mode 100644 index 00000000000..363b29d7ec4 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/__init__.py @@ -0,0 +1,1146 @@ +# 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 ApiManagementConfig + from ._models_py3 import ApplicationLogsConfig + from ._models_py3 import ApplicationStack + from ._models_py3 import ApplicationStackResource + from ._models_py3 import AppRegistration + from ._models_py3 import AppServiceCertificate + from ._models_py3 import AppServiceCertificateOrder + from ._models_py3 import AppServiceCertificateOrderPatchResource + from ._models_py3 import AppServiceCertificatePatchResource + from ._models_py3 import AppServiceCertificateResource + from ._models_py3 import AppServiceEnvironment + from ._models_py3 import AppServiceEnvironmentPatchResource + from ._models_py3 import AppServiceEnvironmentResource + from ._models_py3 import AppserviceGithubToken + from ._models_py3 import AppserviceGithubTokenRequest + from ._models_py3 import AppServicePlan + from ._models_py3 import AppServicePlanPatchResource + from ._models_py3 import ArmIdWrapper + 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 AzureStorageInfoValue + from ._models_py3 import AzureStoragePropertyDictionaryResource + from ._models_py3 import AzureTableStorageApplicationLogsConfig + from ._models_py3 import BackupItem + from ._models_py3 import BackupRequest + from ._models_py3 import BackupSchedule + from ._models_py3 import BillingMeter + from ._models_py3 import BlobStorageTokenStore + from ._models_py3 import Capability + from ._models_py3 import Certificate + from ._models_py3 import CertificateDetails + from ._models_py3 import CertificateEmail + from ._models_py3 import CertificateOrderAction + from ._models_py3 import CertificatePatchResource + from ._models_py3 import ClientRegistration + from ._models_py3 import CloningInfo + from ._models_py3 import ConnectionStringDictionary + from ._models_py3 import ConnStringInfo + from ._models_py3 import ConnStringValueTypePair + 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 CookieExpiration + from ._models_py3 import CorsSettings + from ._models_py3 import CsmCopySlotEntity + from ._models_py3 import CsmMoveResourceEnvelope + 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 CustomHostnameAnalysisResult + from ._models_py3 import CustomOpenIdConnectProvider + from ._models_py3 import DatabaseBackupSetting + from ._models_py3 import DataSource + from ._models_py3 import DataTableResponseColumn + from ._models_py3 import DataTableResponseObject + from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException + from ._models_py3 import DefaultErrorResponseError + from ._models_py3 import DefaultErrorResponseErrorDetailsItem + from ._models_py3 import DeletedAppRestoreRequest + from ._models_py3 import DeletedSite + from ._models_py3 import Deployment + 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 DiagnosticAnalysis + from ._models_py3 import DiagnosticCategory + from ._models_py3 import DiagnosticData + 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 DomainControlCenterSsoRequest + from ._models_py3 import DomainOwnershipIdentifier + 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 FunctionEnvelope + from ._models_py3 import FunctionSecrets + from ._models_py3 import GeoRegion + from ._models_py3 import GitHub + from ._models_py3 import GlobalCsmSkuDescription + from ._models_py3 import GlobalValidation + from ._models_py3 import Google + from ._models_py3 import HandlerMapping + from ._models_py3 import HostingEnvironmentDeploymentInfo + from ._models_py3 import HostingEnvironmentDiagnostics + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostKeys + from ._models_py3 import HostName + from ._models_py3 import HostNameBinding + from ._models_py3 import HostNameSslState + from ._models_py3 import HttpLogsConfig + from ._models_py3 import HttpSettings + from ._models_py3 import HttpSettingsRoutes + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import HybridConnectionLimits + from ._models_py3 import Identifier + from ._models_py3 import IdentityProviders + from ._models_py3 import InboundEnvironmentEndpoint + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import JwtClaimChecks + from ._models_py3 import KeyInfo + from ._models_py3 import LocalizableString + from ._models_py3 import Login + from ._models_py3 import LoginRoutes + from ._models_py3 import LoginScopes + from ._models_py3 import LogSpecification + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricSpecification + from ._models_py3 import MigrateMySqlRequest + from ._models_py3 import MigrateMySqlStatus + from ._models_py3 import MSDeploy + from ._models_py3 import MSDeployLog + from ._models_py3 import MSDeployLogEntry + from ._models_py3 import MSDeployStatus + from ._models_py3 import NameIdentifier + from ._models_py3 import NameValuePair + from ._models_py3 import NetworkAccessControlEntry + 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 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 PremierAddOnPatchResource + from ._models_py3 import PrivateAccess + from ._models_py3 import PrivateAccessSubnet + from ._models_py3 import PrivateAccessVirtualNetwork + from ._models_py3 import PrivateEndpointConnectionResource + 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 ProcessModuleInfo + from ._models_py3 import ProcessThreadInfo + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PublicCertificate + from ._models_py3 import PushSettings + from ._models_py3 import RampUpRule + from ._models_py3 import Recommendation + from ._models_py3 import RecommendationRule + from ._models_py3 import ReissueCertificateOrderRequest + from ._models_py3 import RelayServiceConnectionEntity + from ._models_py3 import Rendering + from ._models_py3 import RenewCertificateOrderRequest + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceHealthMetadata + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceNameAvailability + from ._models_py3 import ResourceNameAvailabilityRequest + from ._models_py3 import ResponseMetaData + from ._models_py3 import RestoreRequest + 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 SiteConfigResource + from ._models_py3 import SiteConfigurationSnapshotInfo + from ._models_py3 import SiteExtensionInfo + 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 SkuInfos + from ._models_py3 import SlotConfigNamesResource + from ._models_py3 import SlotDifference + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotRecoverySource + from ._models_py3 import SnapshotRestoreRequest + from ._models_py3 import Solution + from ._models_py3 import SourceControl + from ._models_py3 import StackMajorVersion + from ._models_py3 import StackMinorVersion + from ._models_py3 import StampCapacity + from ._models_py3 import StaticSiteARMResource + from ._models_py3 import StaticSiteBuildARMResource + from ._models_py3 import StaticSiteBuildProperties + from ._models_py3 import StaticSiteCustomDomainOverviewARMResource + from ._models_py3 import StaticSiteFunctionOverviewARMResource + from ._models_py3 import StaticSitePatchResource + from ._models_py3 import StaticSiteResetPropertiesARMResource + from ._models_py3 import StaticSitesWorkflowPreview + from ._models_py3 import StaticSitesWorkflowPreviewRequest + from ._models_py3 import StaticSiteUserARMResource + from ._models_py3 import StaticSiteUserInvitationRequestResource + from ._models_py3 import StaticSiteUserInvitationResponseResource + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import StorageMigrationOptions + from ._models_py3 import StorageMigrationResponse + from ._models_py3 import StringDictionary + from ._models_py3 import SwiftVirtualNetwork + from ._models_py3 import SystemData + from ._models_py3 import TldLegalAgreement + from ._models_py3 import TokenStore + from ._models_py3 import TopLevelDomain + from ._models_py3 import TopLevelDomainAgreementOption + from ._models_py3 import TriggeredJobHistory + from ._models_py3 import TriggeredJobRun + from ._models_py3 import TriggeredWebJob + from ._models_py3 import Twitter + from ._models_py3 import TwitterRegistration + from ._models_py3 import Usage + 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 WebJob + from ._models_py3 import WebSiteInstanceStatus + from ._models_py3 import WorkerPool + from ._models_py3 import WorkerPoolResource +except (SyntaxError, ImportError): + from ._models import AbnormalTimePeriod + from ._models import Address + from ._models import AddressResponse + from ._models import AllowedAudiencesValidation + from ._models import AnalysisData + from ._models import AnalysisDefinition + from ._models import ApiDefinitionInfo + from ._models import ApiManagementConfig + from ._models import ApplicationLogsConfig + from ._models import ApplicationStack + from ._models import ApplicationStackResource + from ._models import AppRegistration + from ._models import AppServiceCertificate + from ._models import AppServiceCertificateOrder + from ._models import AppServiceCertificateOrderPatchResource + from ._models import AppServiceCertificatePatchResource + from ._models import AppServiceCertificateResource + from ._models import AppServiceEnvironment + from ._models import AppServiceEnvironmentPatchResource + from ._models import AppServiceEnvironmentResource + from ._models import AppserviceGithubToken + from ._models import AppserviceGithubTokenRequest + from ._models import AppServicePlan + from ._models import AppServicePlanPatchResource + from ._models import ArmIdWrapper + from ._models import AuthPlatform + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import AzureActiveDirectory + from ._models import AzureActiveDirectoryLogin + from ._models import AzureActiveDirectoryRegistration + from ._models import AzureActiveDirectoryValidation + from ._models import AzureBlobStorageApplicationLogsConfig + from ._models import AzureBlobStorageHttpLogsConfig + from ._models import AzureStorageInfoValue + from ._models import AzureStoragePropertyDictionaryResource + from ._models import AzureTableStorageApplicationLogsConfig + from ._models import BackupItem + from ._models import BackupRequest + from ._models import BackupSchedule + from ._models import BillingMeter + from ._models import BlobStorageTokenStore + from ._models import Capability + from ._models import Certificate + from ._models import CertificateDetails + from ._models import CertificateEmail + from ._models import CertificateOrderAction + from ._models import CertificatePatchResource + from ._models import ClientRegistration + from ._models import CloningInfo + from ._models import ConnectionStringDictionary + from ._models import ConnStringInfo + from ._models import ConnStringValueTypePair + from ._models import Contact + from ._models import ContainerCpuStatistics + from ._models import ContainerCpuUsage + from ._models import ContainerInfo + from ._models import ContainerMemoryStatistics + from ._models import ContainerNetworkInterfaceStatistics + from ._models import ContainerThrottlingData + from ._models import ContinuousWebJob + from ._models import CookieExpiration + from ._models import CorsSettings + from ._models import CsmCopySlotEntity + from ._models import CsmMoveResourceEnvelope + from ._models import CsmOperationDescription + from ._models import CsmOperationDescriptionProperties + from ._models import CsmOperationDisplay + from ._models import CsmPublishingCredentialsPoliciesCollection + from ._models import CsmPublishingCredentialsPoliciesEntity + from ._models import CsmPublishingProfileOptions + from ._models import CsmSlotEntity + from ._models import CsmUsageQuota + from ._models import CustomHostnameAnalysisResult + from ._models import CustomOpenIdConnectProvider + from ._models import DatabaseBackupSetting + from ._models import DataSource + from ._models import DataTableResponseColumn + from ._models import DataTableResponseObject + from ._models import DefaultErrorResponse, DefaultErrorResponseException + from ._models import DefaultErrorResponseError + from ._models import DefaultErrorResponseErrorDetailsItem + from ._models import DeletedAppRestoreRequest + from ._models import DeletedSite + from ._models import Deployment + from ._models import DeploymentLocations + from ._models import DetectorAbnormalTimePeriod + from ._models import DetectorDefinition + from ._models import DetectorInfo + from ._models import DetectorResponse + from ._models import DiagnosticAnalysis + from ._models import DiagnosticCategory + from ._models import DiagnosticData + from ._models import DiagnosticDetectorResponse + from ._models import DiagnosticMetricSample + from ._models import DiagnosticMetricSet + from ._models import Dimension + from ._models import Domain + from ._models import DomainAvailabilityCheckResult + from ._models import DomainControlCenterSsoRequest + from ._models import DomainOwnershipIdentifier + from ._models import DomainPatchResource + from ._models import DomainPurchaseConsent + from ._models import DomainRecommendationSearchParameters + from ._models import EnabledConfig + from ._models import EndpointDependency + from ._models import EndpointDetail + from ._models import ErrorEntity + from ._models import Experiments + from ._models import Facebook + from ._models import FileSystemApplicationLogsConfig + from ._models import FileSystemHttpLogsConfig + from ._models import FileSystemTokenStore + from ._models import ForwardProxy + from ._models import FunctionEnvelope + from ._models import FunctionSecrets + from ._models import GeoRegion + from ._models import GitHub + from ._models import GlobalCsmSkuDescription + from ._models import GlobalValidation + from ._models import Google + from ._models import HandlerMapping + from ._models import HostingEnvironmentDeploymentInfo + from ._models import HostingEnvironmentDiagnostics + from ._models import HostingEnvironmentProfile + from ._models import HostKeys + from ._models import HostName + from ._models import HostNameBinding + from ._models import HostNameSslState + from ._models import HttpLogsConfig + from ._models import HttpSettings + from ._models import HttpSettingsRoutes + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import HybridConnectionLimits + from ._models import Identifier + from ._models import IdentityProviders + from ._models import InboundEnvironmentEndpoint + from ._models import IpSecurityRestriction + from ._models import JwtClaimChecks + from ._models import KeyInfo + from ._models import LocalizableString + from ._models import Login + from ._models import LoginRoutes + from ._models import LoginScopes + from ._models import LogSpecification + from ._models import ManagedServiceIdentity + from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models import MetricAvailability + from ._models import MetricSpecification + from ._models import MigrateMySqlRequest + from ._models import MigrateMySqlStatus + from ._models import MSDeploy + from ._models import MSDeployLog + from ._models import MSDeployLogEntry + from ._models import MSDeployStatus + from ._models import NameIdentifier + from ._models import NameValuePair + from ._models import NetworkAccessControlEntry + from ._models import NetworkFeatures + from ._models import NetworkTrace + from ._models import Nonce + from ._models import OpenIdConnectClientCredential + from ._models import OpenIdConnectConfig + from ._models import OpenIdConnectLogin + from ._models import OpenIdConnectRegistration + from ._models import Operation + from ._models import OutboundEnvironmentEndpoint + from ._models import PerfMonResponse + from ._models import PerfMonSample + from ._models import PerfMonSet + from ._models import PremierAddOn + from ._models import PremierAddOnOffer + from ._models import PremierAddOnPatchResource + from ._models import PrivateAccess + from ._models import PrivateAccessSubnet + from ._models import PrivateAccessVirtualNetwork + from ._models import PrivateEndpointConnectionResource + from ._models import PrivateLinkConnectionApprovalRequestResource + from ._models import PrivateLinkConnectionState + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceProperties + from ._models import PrivateLinkResourcesWrapper + from ._models import ProcessInfo + from ._models import ProcessModuleInfo + from ._models import ProcessThreadInfo + from ._models import ProxyOnlyResource + from ._models import PublicCertificate + from ._models import PushSettings + from ._models import RampUpRule + from ._models import Recommendation + from ._models import RecommendationRule + from ._models import ReissueCertificateOrderRequest + from ._models import RelayServiceConnectionEntity + from ._models import Rendering + from ._models import RenewCertificateOrderRequest + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceHealthMetadata + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceNameAvailability + from ._models import ResourceNameAvailabilityRequest + from ._models import ResponseMetaData + from ._models import RestoreRequest + from ._models import ServiceSpecification + from ._models import Site + from ._models import SiteAuthSettings + from ._models import SiteAuthSettingsV2 + from ._models import SiteCloneability + from ._models import SiteCloneabilityCriterion + from ._models import SiteConfig + from ._models import SiteConfigResource + from ._models import SiteConfigurationSnapshotInfo + from ._models import SiteExtensionInfo + from ._models import SiteLimits + from ._models import SiteLogsConfig + from ._models import SiteMachineKey + from ._models import SitePatchResource + from ._models import SitePhpErrorLogFlag + from ._models import SiteSeal + from ._models import SiteSealRequest + from ._models import SiteSourceControl + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SkuInfo + from ._models import SkuInfos + from ._models import SlotConfigNamesResource + from ._models import SlotDifference + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import Snapshot + from ._models import SnapshotRecoverySource + from ._models import SnapshotRestoreRequest + from ._models import Solution + from ._models import SourceControl + from ._models import StackMajorVersion + from ._models import StackMinorVersion + from ._models import StampCapacity + from ._models import StaticSiteARMResource + from ._models import StaticSiteBuildARMResource + from ._models import StaticSiteBuildProperties + from ._models import StaticSiteCustomDomainOverviewARMResource + from ._models import StaticSiteFunctionOverviewARMResource + from ._models import StaticSitePatchResource + from ._models import StaticSiteResetPropertiesARMResource + from ._models import StaticSitesWorkflowPreview + from ._models import StaticSitesWorkflowPreviewRequest + from ._models import StaticSiteUserARMResource + from ._models import StaticSiteUserInvitationRequestResource + from ._models import StaticSiteUserInvitationResponseResource + from ._models import StatusCodesBasedTrigger + from ._models import StorageMigrationOptions + from ._models import StorageMigrationResponse + from ._models import StringDictionary + from ._models import SwiftVirtualNetwork + from ._models import SystemData + from ._models import TldLegalAgreement + from ._models import TokenStore + from ._models import TopLevelDomain + from ._models import TopLevelDomainAgreementOption + from ._models import TriggeredJobHistory + from ._models import TriggeredJobRun + from ._models import TriggeredWebJob + from ._models import Twitter + from ._models import TwitterRegistration + from ._models import Usage + from ._models import User + from ._models import ValidateRequest + from ._models import ValidateResponse + from ._models import ValidateResponseError + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VirtualIPMapping + from ._models import VirtualNetworkProfile + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetParameters + from ._models import VnetRoute + from ._models import VnetValidationFailureDetails + from ._models import VnetValidationTestFailure + from ._models import WebAppCollection + from ._models import WebJob + from ._models import WebSiteInstanceStatus + from ._models import WorkerPool + from ._models import WorkerPoolResource +from ._paged_models import AnalysisDefinitionPaged +from ._paged_models import ApplicationStackResourcePaged +from ._paged_models import AppServiceCertificateOrderPaged +from ._paged_models import AppServiceCertificateResourcePaged +from ._paged_models import AppServiceEnvironmentResourcePaged +from ._paged_models import AppServicePlanPaged +from ._paged_models import BackupItemPaged +from ._paged_models import BillingMeterPaged +from ._paged_models import CertificatePaged +from ._paged_models import ContinuousWebJobPaged +from ._paged_models import CsmOperationDescriptionPaged +from ._paged_models import CsmUsageQuotaPaged +from ._paged_models import DeletedSitePaged +from ._paged_models import DeploymentPaged +from ._paged_models import DetectorDefinitionPaged +from ._paged_models import DetectorResponsePaged +from ._paged_models import DiagnosticCategoryPaged +from ._paged_models import DomainOwnershipIdentifierPaged +from ._paged_models import DomainPaged +from ._paged_models import FunctionEnvelopePaged +from ._paged_models import GeoRegionPaged +from ._paged_models import HostNameBindingPaged +from ._paged_models import HybridConnectionPaged +from ._paged_models import IdentifierPaged +from ._paged_models import InboundEnvironmentEndpointPaged +from ._paged_models import NameIdentifierPaged +from ._paged_models import OutboundEnvironmentEndpointPaged +from ._paged_models import PerfMonResponsePaged +from ._paged_models import PremierAddOnOfferPaged +from ._paged_models import ProcessInfoPaged +from ._paged_models import ProcessModuleInfoPaged +from ._paged_models import ProcessThreadInfoPaged +from ._paged_models import PublicCertificatePaged +from ._paged_models import RecommendationPaged +from ._paged_models import ResourceHealthMetadataPaged +from ._paged_models import ResourceMetricDefinitionPaged +from ._paged_models import SiteConfigResourcePaged +from ._paged_models import SiteConfigurationSnapshotInfoPaged +from ._paged_models import SiteExtensionInfoPaged +from ._paged_models import SitePaged +from ._paged_models import SkuInfoPaged +from ._paged_models import SlotDifferencePaged +from ._paged_models import SnapshotPaged +from ._paged_models import SourceControlPaged +from ._paged_models import StampCapacityPaged +from ._paged_models import StaticSiteARMResourcePaged +from ._paged_models import StaticSiteBuildARMResourcePaged +from ._paged_models import StaticSiteCustomDomainOverviewARMResourcePaged +from ._paged_models import StaticSiteFunctionOverviewARMResourcePaged +from ._paged_models import StaticSiteUserARMResourcePaged +from ._paged_models import StrPaged +from ._paged_models import TldLegalAgreementPaged +from ._paged_models import TopLevelDomainPaged +from ._paged_models import TriggeredJobHistoryPaged +from ._paged_models import TriggeredWebJobPaged +from ._paged_models import UsagePaged +from ._paged_models import WebJobPaged +from ._paged_models import WebSiteInstanceStatusPaged +from ._paged_models import WorkerPoolResourcePaged +from ._web_site_management_client_enums import ( + KeyVaultSecretStatus, + CertificateProductType, + ProvisioningState, + CertificateOrderStatus, + CertificateOrderActionType, + CreatedByType, + RouteType, + ManagedServiceIdentityType, + IpFilterTag, + AutoHealActionType, + ConnectionStringType, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + FtpsState, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + ClientCertMode, + RedundancyMode, + StatusOptions, + DomainStatus, + AzureResourceType, + CustomHostNameDnsRecordType, + HostNameType, + DnsType, + DomainType, + HostingEnvironmentStatus, + LoadBalancingMode, + ComputeModeOptions, + WorkerSizeOptions, + AccessControlEntryAction, + OperationStatus, + IssueType, + SolutionType, + RenderingType, + ResourceScopeType, + NotificationLevel, + Channels, + AppServicePlanRestrictions, + InAvailabilityReasonType, + CheckNameResourceTypes, + ValidateResourceTypes, + LogLevel, + AzureStorageType, + AzureStorageState, + BackupItemStatus, + DatabaseType, + FrequencyUnit, + ContinuousWebJobStatus, + WebJobType, + CookieExpirationConvention, + PublishingProfileFormat, + DnsVerificationTestResult, + ClientCredentialMethod, + ForwardProxyConvention, + UnauthenticatedClientActionV2, + MSDeployLogEntryType, + MSDeployProvisioningState, + MySqlMigrationType, + PublicCertificateLocation, + BackupRestoreOperationType, + UnauthenticatedClientAction, + BuiltInAuthenticationProvider, + CloneAbilityResult, + SiteExtensionType, + TriggeredWebJobStatus, + SiteRuntimeState, + BuildStatus, + TriggerTypes, + SkuName, +) + +__all__ = [ + 'AbnormalTimePeriod', + 'Address', + 'AddressResponse', + 'AllowedAudiencesValidation', + 'AnalysisData', + 'AnalysisDefinition', + 'ApiDefinitionInfo', + 'ApiManagementConfig', + 'ApplicationLogsConfig', + 'ApplicationStack', + 'ApplicationStackResource', + 'AppRegistration', + 'AppServiceCertificate', + 'AppServiceCertificateOrder', + 'AppServiceCertificateOrderPatchResource', + 'AppServiceCertificatePatchResource', + 'AppServiceCertificateResource', + 'AppServiceEnvironment', + 'AppServiceEnvironmentPatchResource', + 'AppServiceEnvironmentResource', + 'AppserviceGithubToken', + 'AppserviceGithubTokenRequest', + 'AppServicePlan', + 'AppServicePlanPatchResource', + 'ArmIdWrapper', + 'AuthPlatform', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'AzureActiveDirectory', + 'AzureActiveDirectoryLogin', + 'AzureActiveDirectoryRegistration', + 'AzureActiveDirectoryValidation', + 'AzureBlobStorageApplicationLogsConfig', + 'AzureBlobStorageHttpLogsConfig', + 'AzureStorageInfoValue', + 'AzureStoragePropertyDictionaryResource', + 'AzureTableStorageApplicationLogsConfig', + 'BackupItem', + 'BackupRequest', + 'BackupSchedule', + 'BillingMeter', + 'BlobStorageTokenStore', + 'Capability', + 'Certificate', + 'CertificateDetails', + 'CertificateEmail', + 'CertificateOrderAction', + 'CertificatePatchResource', + 'ClientRegistration', + 'CloningInfo', + 'ConnectionStringDictionary', + 'ConnStringInfo', + 'ConnStringValueTypePair', + 'Contact', + 'ContainerCpuStatistics', + 'ContainerCpuUsage', + 'ContainerInfo', + 'ContainerMemoryStatistics', + 'ContainerNetworkInterfaceStatistics', + 'ContainerThrottlingData', + 'ContinuousWebJob', + 'CookieExpiration', + 'CorsSettings', + 'CsmCopySlotEntity', + 'CsmMoveResourceEnvelope', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'CsmPublishingCredentialsPoliciesCollection', + 'CsmPublishingCredentialsPoliciesEntity', + 'CsmPublishingProfileOptions', + 'CsmSlotEntity', + 'CsmUsageQuota', + 'CustomHostnameAnalysisResult', + 'CustomOpenIdConnectProvider', + 'DatabaseBackupSetting', + 'DataSource', + 'DataTableResponseColumn', + 'DataTableResponseObject', + 'DefaultErrorResponse', 'DefaultErrorResponseException', + 'DefaultErrorResponseError', + 'DefaultErrorResponseErrorDetailsItem', + 'DeletedAppRestoreRequest', + 'DeletedSite', + 'Deployment', + 'DeploymentLocations', + 'DetectorAbnormalTimePeriod', + 'DetectorDefinition', + 'DetectorInfo', + 'DetectorResponse', + 'DiagnosticAnalysis', + 'DiagnosticCategory', + 'DiagnosticData', + 'DiagnosticDetectorResponse', + 'DiagnosticMetricSample', + 'DiagnosticMetricSet', + 'Dimension', + 'Domain', + 'DomainAvailabilityCheckResult', + 'DomainControlCenterSsoRequest', + 'DomainOwnershipIdentifier', + 'DomainPatchResource', + 'DomainPurchaseConsent', + 'DomainRecommendationSearchParameters', + 'EnabledConfig', + 'EndpointDependency', + 'EndpointDetail', + 'ErrorEntity', + 'Experiments', + 'Facebook', + 'FileSystemApplicationLogsConfig', + 'FileSystemHttpLogsConfig', + 'FileSystemTokenStore', + 'ForwardProxy', + 'FunctionEnvelope', + 'FunctionSecrets', + 'GeoRegion', + 'GitHub', + 'GlobalCsmSkuDescription', + 'GlobalValidation', + 'Google', + 'HandlerMapping', + 'HostingEnvironmentDeploymentInfo', + 'HostingEnvironmentDiagnostics', + 'HostingEnvironmentProfile', + 'HostKeys', + 'HostName', + 'HostNameBinding', + 'HostNameSslState', + 'HttpLogsConfig', + 'HttpSettings', + 'HttpSettingsRoutes', + 'HybridConnection', + 'HybridConnectionKey', + 'HybridConnectionLimits', + 'Identifier', + 'IdentityProviders', + 'InboundEnvironmentEndpoint', + 'IpSecurityRestriction', + 'JwtClaimChecks', + 'KeyInfo', + 'LocalizableString', + 'Login', + 'LoginRoutes', + 'LoginScopes', + 'LogSpecification', + 'ManagedServiceIdentity', + 'ManagedServiceIdentityUserAssignedIdentitiesValue', + 'MetricAvailability', + 'MetricSpecification', + 'MigrateMySqlRequest', + 'MigrateMySqlStatus', + 'MSDeploy', + 'MSDeployLog', + 'MSDeployLogEntry', + 'MSDeployStatus', + 'NameIdentifier', + 'NameValuePair', + 'NetworkAccessControlEntry', + 'NetworkFeatures', + 'NetworkTrace', + 'Nonce', + 'OpenIdConnectClientCredential', + 'OpenIdConnectConfig', + 'OpenIdConnectLogin', + 'OpenIdConnectRegistration', + 'Operation', + 'OutboundEnvironmentEndpoint', + 'PerfMonResponse', + 'PerfMonSample', + 'PerfMonSet', + 'PremierAddOn', + 'PremierAddOnOffer', + 'PremierAddOnPatchResource', + 'PrivateAccess', + 'PrivateAccessSubnet', + 'PrivateAccessVirtualNetwork', + 'PrivateEndpointConnectionResource', + 'PrivateLinkConnectionApprovalRequestResource', + 'PrivateLinkConnectionState', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'PrivateLinkResourcesWrapper', + 'ProcessInfo', + 'ProcessModuleInfo', + 'ProcessThreadInfo', + 'ProxyOnlyResource', + 'PublicCertificate', + 'PushSettings', + 'RampUpRule', + 'Recommendation', + 'RecommendationRule', + 'ReissueCertificateOrderRequest', + 'RelayServiceConnectionEntity', + 'Rendering', + 'RenewCertificateOrderRequest', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceHealthMetadata', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceNameAvailability', + 'ResourceNameAvailabilityRequest', + 'ResponseMetaData', + 'RestoreRequest', + 'ServiceSpecification', + 'Site', + 'SiteAuthSettings', + 'SiteAuthSettingsV2', + 'SiteCloneability', + 'SiteCloneabilityCriterion', + 'SiteConfig', + 'SiteConfigResource', + 'SiteConfigurationSnapshotInfo', + 'SiteExtensionInfo', + 'SiteLimits', + 'SiteLogsConfig', + 'SiteMachineKey', + 'SitePatchResource', + 'SitePhpErrorLogFlag', + 'SiteSeal', + 'SiteSealRequest', + 'SiteSourceControl', + 'SkuCapacity', + 'SkuDescription', + 'SkuInfo', + 'SkuInfos', + 'SlotConfigNamesResource', + 'SlotDifference', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'Snapshot', + 'SnapshotRecoverySource', + 'SnapshotRestoreRequest', + 'Solution', + 'SourceControl', + 'StackMajorVersion', + 'StackMinorVersion', + 'StampCapacity', + 'StaticSiteARMResource', + 'StaticSiteBuildARMResource', + 'StaticSiteBuildProperties', + 'StaticSiteCustomDomainOverviewARMResource', + 'StaticSiteFunctionOverviewARMResource', + 'StaticSitePatchResource', + 'StaticSiteResetPropertiesARMResource', + 'StaticSitesWorkflowPreview', + 'StaticSitesWorkflowPreviewRequest', + 'StaticSiteUserARMResource', + 'StaticSiteUserInvitationRequestResource', + 'StaticSiteUserInvitationResponseResource', + 'StatusCodesBasedTrigger', + 'StorageMigrationOptions', + 'StorageMigrationResponse', + 'StringDictionary', + 'SwiftVirtualNetwork', + 'SystemData', + 'TldLegalAgreement', + 'TokenStore', + 'TopLevelDomain', + 'TopLevelDomainAgreementOption', + 'TriggeredJobHistory', + 'TriggeredJobRun', + 'TriggeredWebJob', + 'Twitter', + 'TwitterRegistration', + 'Usage', + 'User', + 'ValidateRequest', + 'ValidateResponse', + 'ValidateResponseError', + 'VirtualApplication', + 'VirtualDirectory', + 'VirtualIPMapping', + 'VirtualNetworkProfile', + 'VnetGateway', + 'VnetInfo', + 'VnetParameters', + 'VnetRoute', + 'VnetValidationFailureDetails', + 'VnetValidationTestFailure', + 'WebAppCollection', + 'WebJob', + 'WebSiteInstanceStatus', + 'WorkerPool', + 'WorkerPoolResource', + 'AppServiceCertificateOrderPaged', + 'AppServiceCertificateResourcePaged', + 'CsmOperationDescriptionPaged', + 'DomainPaged', + 'NameIdentifierPaged', + 'DomainOwnershipIdentifierPaged', + 'TopLevelDomainPaged', + 'TldLegalAgreementPaged', + 'CertificatePaged', + 'DeletedSitePaged', + 'DetectorResponsePaged', + 'DiagnosticCategoryPaged', + 'AnalysisDefinitionPaged', + 'DetectorDefinitionPaged', + 'ApplicationStackResourcePaged', + 'RecommendationPaged', + 'SourceControlPaged', + 'BillingMeterPaged', + 'GeoRegionPaged', + 'IdentifierPaged', + 'PremierAddOnOfferPaged', + 'SitePaged', + 'BackupItemPaged', + 'SiteConfigResourcePaged', + 'SiteConfigurationSnapshotInfoPaged', + 'ContinuousWebJobPaged', + 'DeploymentPaged', + 'FunctionEnvelopePaged', + 'HostNameBindingPaged', + 'WebSiteInstanceStatusPaged', + 'ProcessInfoPaged', + 'ProcessModuleInfoPaged', + 'ProcessThreadInfoPaged', + 'PerfMonResponsePaged', + 'PublicCertificatePaged', + 'SiteExtensionInfoPaged', + 'SlotDifferencePaged', + 'SnapshotPaged', + 'TriggeredWebJobPaged', + 'TriggeredJobHistoryPaged', + 'CsmUsageQuotaPaged', + 'WebJobPaged', + 'StaticSiteARMResourcePaged', + 'StaticSiteUserARMResourcePaged', + 'StaticSiteBuildARMResourcePaged', + 'StaticSiteFunctionOverviewARMResourcePaged', + 'StaticSiteCustomDomainOverviewARMResourcePaged', + 'AppServiceEnvironmentResourcePaged', + 'StampCapacityPaged', + 'InboundEnvironmentEndpointPaged', + 'WorkerPoolResourcePaged', + 'ResourceMetricDefinitionPaged', + 'SkuInfoPaged', + 'UsagePaged', + 'OutboundEnvironmentEndpointPaged', + 'AppServicePlanPaged', + 'StrPaged', + 'HybridConnectionPaged', + 'ResourceHealthMetadataPaged', + 'KeyVaultSecretStatus', + 'CertificateProductType', + 'ProvisioningState', + 'CertificateOrderStatus', + 'CertificateOrderActionType', + 'CreatedByType', + 'RouteType', + 'ManagedServiceIdentityType', + 'IpFilterTag', + 'AutoHealActionType', + 'ConnectionStringType', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'FtpsState', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'ClientCertMode', + 'RedundancyMode', + 'StatusOptions', + 'DomainStatus', + 'AzureResourceType', + 'CustomHostNameDnsRecordType', + 'HostNameType', + 'DnsType', + 'DomainType', + 'HostingEnvironmentStatus', + 'LoadBalancingMode', + 'ComputeModeOptions', + 'WorkerSizeOptions', + 'AccessControlEntryAction', + 'OperationStatus', + 'IssueType', + 'SolutionType', + 'RenderingType', + 'ResourceScopeType', + 'NotificationLevel', + 'Channels', + 'AppServicePlanRestrictions', + 'InAvailabilityReasonType', + 'CheckNameResourceTypes', + 'ValidateResourceTypes', + 'LogLevel', + 'AzureStorageType', + 'AzureStorageState', + 'BackupItemStatus', + 'DatabaseType', + 'FrequencyUnit', + 'ContinuousWebJobStatus', + 'WebJobType', + 'CookieExpirationConvention', + 'PublishingProfileFormat', + 'DnsVerificationTestResult', + 'ClientCredentialMethod', + 'ForwardProxyConvention', + 'UnauthenticatedClientActionV2', + 'MSDeployLogEntryType', + 'MSDeployProvisioningState', + 'MySqlMigrationType', + 'PublicCertificateLocation', + 'BackupRestoreOperationType', + 'UnauthenticatedClientAction', + 'BuiltInAuthenticationProvider', + 'CloneAbilityResult', + 'SiteExtensionType', + 'TriggeredWebJobStatus', + 'SiteRuntimeState', + 'BuildStatus', + 'TriggerTypes', + 'SkuName', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models.py new file mode 100644 index 00000000000..e17874ce6fc --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models.py @@ -0,0 +1,15503 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2020_09_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2020_09_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(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.get('address1', None) + self.address2 = kwargs.get('address2', None) + self.city = kwargs.get('city', None) + self.country = kwargs.get('country', None) + self.postal_code = kwargs.get('postal_code', None) + self.state = kwargs.get('state', None) + + +class ProxyOnlyResource(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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kwargs.get('kind', None) + self.type = None + self.system_data = kwargs.get('system_data', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2020_09_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2020_09_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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AnalysisDefinition, self).__init__(**kwargs) + self.description = None + + +class ApiDefinitionInfo(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 ApiManagementConfig(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 ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2020_09_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2020_09_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_09_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(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_09_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2020_09_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]'}, + } + + 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) + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param application_stack_resource_name: Application stack name. + :type application_stack_resource_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_09_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'application_stack_resource_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]'}, + } + + def __init__(self, **kwargs): + super(ApplicationStackResource, self).__init__(**kwargs) + self.application_stack_resource_name = kwargs.get('application_stack_resource_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) + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_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': 'KeyVaultSecretStatus'}, + } + + 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 Resource(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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + """ + + _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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.type = None + self.tags = kwargs.get('tags', None) + self.system_data = kwargs.get('system_data', 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2020_09_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_09_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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_09_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_09_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2020_09_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_09_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_09_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2020_09_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_09_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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_09_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_09_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2020_09_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_09_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_09_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + 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 + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, + } + + 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, + } + + 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(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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_09_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_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', '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'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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_09_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_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'app_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) + self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) + self.location = kwargs.get('location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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_09_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_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServiceEnvironmentResource, self).__init__(**kwargs) + self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) + self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) + self.provisioning_state = None + self.status = None + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) + self.worker_pools = kwargs.get('worker_pools', None) + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = kwargs.get('dns_suffix', None) + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = kwargs.get('network_access_control_list', None) + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.default_front_end_scale_factor = None + self.api_management_account_id = kwargs.get('api_management_account_id', None) + self.suspended = kwargs.get('suspended', None) + self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) + + +class AppserviceGithubToken(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(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.get('code', None) + self.state = kwargs.get('state', None) + + +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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_09_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription + """ + + _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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, 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.sku = kwargs.get('sku', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: This needs to set to true when creating a + Linux App Service Plan, along with kind set to + Linux. It should be false otherwise. Default + value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_09_01.models.ProvisioningState + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + } + + 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 + + +class ArmIdWrapper(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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2020_09_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': 'AutoHealActionType'}, + '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(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(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_09_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2020_09_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(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2020_09_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_09_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2020_09_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: + ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectoryRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectoryLogin + :param validation: + :type validation: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param jwt_claim_checks: + :type jwt_claim_checks: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_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': 'LogLevel'}, + '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(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 AzureStorageInfoValue(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_09_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' + :vartype state: str or + ~azure.mgmt.web.v2020_09_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': '{AzureStorageInfoValue}'}, + } + + def __init__(self, **kwargs): + super(AzureStoragePropertyDictionaryResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AzureTableStorageApplicationLogsConfig(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_09_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': 'LogLevel'}, + '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.get('sas_url', None) + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 backup_item_name: Name of this backup. + :vartype backup_item_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_09_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 + :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_09_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'backup_id': {'key': 'properties.id', 'type': 'int'}, + 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, + 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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.backup_item_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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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: Required. 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_09_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2020_09_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account_url': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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). Default value: 7 . + :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_09_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + } + + 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) + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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_09_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_09_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 + """ + + _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}, + 'password': {'required': 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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', '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) + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param email_id: Email id. + :type email_id: str + :param time_stamp: Time stamp. + :type time_stamp: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'action_type': {'key': 'properties.actionType', 'type': 'CertificateOrderActionType'}, + '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 CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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_09_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_09_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 + """ + + _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}, + 'password': {'required': 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', '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) + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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.get('source_web_app_id', None) + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': '{ConnStringValueTypePair}'}, + } + + def __init__(self, **kwargs): + super(ConnectionStringDictionary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ConnStringInfo(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_09_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + 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(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_09_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, **kwargs): + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) + + +class Contact(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_09_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.get('email', None) + self.fax = kwargs.get('fax', None) + self.job_title = kwargs.get('job_title', None) + self.name_first = kwargs.get('name_first', None) + self.name_last = kwargs.get('name_last', None) + self.name_middle = kwargs.get('name_middle', None) + self.organization = kwargs.get('organization', None) + self.phone = kwargs.get('phone', None) + + +class ContainerCpuStatistics(Model): + """ContainerCpuStatistics. + + :param cpu_usage: + :type cpu_usage: ~azure.mgmt.web.v2020_09_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_09_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(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(Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: datetime + :param previous_time_stamp: + :type previous_time_stamp: datetime + :param current_cpu_stats: + :type current_cpu_stats: + ~azure.mgmt.web.v2020_09_01.models.ContainerCpuStatistics + :param previous_cpu_stats: + :type previous_cpu_stats: + ~azure.mgmt.web.v2020_09_01.models.ContainerCpuStatistics + :param memory_stats: + :type memory_stats: + ~azure.mgmt.web.v2020_09_01.models.ContainerMemoryStatistics + :param name: + :type name: str + :param id: + :type id: str + :param eth0: + :type eth0: + ~azure.mgmt.web.v2020_09_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(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(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(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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param status: Job status. Possible values include: 'Initializing', + 'Starting', 'Running', 'PendingRestart', 'Stopped' + :type status: str or + ~azure.mgmt.web.v2020_09_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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param convention: Possible values include: 'FixedTime', + 'IdentityProviderDerived' + :type convention: str or + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'convention': {'key': 'properties.convention', 'type': 'CookieExpirationConvention'}, + '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(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 CsmCopySlotEntity(Model): + """Copy deployment slot parameters. + + All required parameters must be populated in order to send to Azure. + + :param target_slot: Required. Destination deployment slot during copy + operation. + :type target_slot: str + :param site_config: Required. The site object which will be merged with + the source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2020_09_01.models.SiteConfig + """ + + _validation = { + 'target_slot': {'required': True}, + 'site_config': {'required': True}, + } + + _attribute_map = { + 'target_slot': {'key': 'targetSlot', 'type': 'str'}, + 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, + } + + def __init__(self, **kwargs): + super(CsmCopySlotEntity, self).__init__(**kwargs) + self.target_slot = kwargs.get('target_slot', None) + self.site_config = kwargs.get('site_config', None) + + +class CsmMoveResourceEnvelope(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 CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2020_09_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2020_09_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(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2020_09_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(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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param ftp: Required. Whether FTP is allowed. + :type ftp: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Required. Whether Scm Basic Auth is allowed. + :type scm: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'ftp': {'required': True}, + 'scm': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param allow: Required. true to allow access to a publishing + method; otherwise, false. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allow': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'allow': {'key': 'properties.allow', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CsmPublishingCredentialsPoliciesEntity, self).__init__(**kwargs) + self.allow = kwargs.get('allow', None) + + +class CsmPublishingProfileOptions(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_09_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(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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.get('target_slot', None) + self.preserve_vnet = kwargs.get('preserve_vnet', None) + + +class CsmUsageQuota(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 + :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_09_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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar is_hostname_already_verified: true if hostname is + already verified; otherwise, 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_09_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_09_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'is_hostname_already_verified': {'key': 'properties.isHostnameAlreadyVerified', 'type': 'bool'}, + 'custom_domain_verification_test': {'key': 'properties.customDomainVerificationTest', 'type': 'DnsVerificationTestResult'}, + '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_cname_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_cname_records = kwargs.get('alternate_cname_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: + ~azure.mgmt.web.v2020_09_01.models.OpenIdConnectRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_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.get('database_type', None) + 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 DataSource(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_09_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(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(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_09_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(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_09_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 DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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_09_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(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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + 'deleted_site_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.deleted_site_kind = None + self.geo_region_name = 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :param end_time: End time. + :type end_time: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 DeploymentLocations(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_09_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2020_09_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_09_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(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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_09_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_09_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2020_09_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': 'IssueType'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param metadata: metadata for the detector + :type metadata: ~azure.mgmt.web.v2020_09_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2020_09_01.models.DiagnosticData] + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'metadata': {'key': 'properties.metadata', 'type': 'DetectorInfo'}, + 'dataset': {'key': 'properties.dataset', 'type': '[DiagnosticData]'}, + } + + def __init__(self, **kwargs): + super(DetectorResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.dataset = kwargs.get('dataset', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param start_time: Start time of the period + :type start_time: datetime + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_09_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2020_09_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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiagnosticCategory, self).__init__(**kwargs) + self.description = None + + +class DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2020_09_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2020_09_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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param start_time: Start time of the period + :type start_time: datetime + :param end_time: End time of the period + :type end_time: 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_09_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2020_09_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_09_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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(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 + :param end_time: End time of the period + :type end_time: 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_09_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(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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_09_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_09_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_09_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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_09_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_09_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2020_09_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_09_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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_09_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + 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 DomainControlCenterSsoRequest(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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_09_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_09_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_09_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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_09_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_09_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2020_09_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_09_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(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 + 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 + """ + + _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(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(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(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_09_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(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(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_09_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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2020_09_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_09_01.models.AppRegistration + :param graph_api_version: + :type graph_api_version: str + :param login: + :type login: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2020_09_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, **kwargs): + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', "Off") + + +class FileSystemHttpLogsConfig(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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param convention: Possible values include: 'NoProxy', 'Standard', + 'Custom' + :type convention: str or + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'convention': {'key': 'properties.convention', 'type': 'ForwardProxyConvention'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 FunctionSecrets(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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_09_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 GlobalCsmSkuDescription(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_09_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_09_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'require_authentication': {'key': 'properties.requireAuthentication', 'type': 'bool'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientActionV2'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_09_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_09_01.models.LoginScopes + :param validation: + :type validation: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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(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(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(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(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(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_09_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_09_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_09_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2020_09_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + '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 HostNameSslState(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_09_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 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_09_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2020_09_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_09_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param require_https: + :type require_https: bool + :param routes: + :type routes: ~azure.mgmt.web.v2020_09_01.models.HttpSettingsRoutes + :param forward_proxy: + :type forward_proxy: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'value': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Identifier, self).__init__(**kwargs) + self.value = kwargs.get('value', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param azure_active_directory: + :type azure_active_directory: + ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectory + :param facebook: + :type facebook: ~azure.mgmt.web.v2020_09_01.models.Facebook + :param git_hub: + :type git_hub: ~azure.mgmt.web.v2020_09_01.models.GitHub + :param google: + :type google: ~azure.mgmt.web.v2020_09_01.models.Google + :param twitter: + :type twitter: ~azure.mgmt.web.v2020_09_01.models.Twitter + :param custom_open_id_connect_providers: + :type custom_open_id_connect_providers: dict[str, + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, + '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.twitter = kwargs.get('twitter', None) + self.custom_open_id_connect_providers = kwargs.get('custom_open_id_connect_providers', None) + + +class InboundEnvironmentEndpoint(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 IpSecurityRestriction(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_09_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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 LocalizableString(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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param routes: + :type routes: ~azure.mgmt.web.v2020_09_01.models.LoginRoutes + :param token_store: + :type token_store: ~azure.mgmt.web.v2020_09_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_09_01.models.CookieExpiration + :param nonce: + :type nonce: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(LoginScopes, self).__init__(**kwargs) + self.scopes = kwargs.get('scopes', None) + + +class LogSpecification(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(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_09_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_09_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailability(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(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_09_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2020_09_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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2020_09_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'migration_type': {'key': 'properties.migrationType', 'type': 'MySqlMigrationType'}, + } + + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'migration_operation_status': {'key': 'properties.migrationOperationStatus', 'type': 'OperationStatus'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar entries: List of log entry messages + :vartype entries: + list[~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'entries': {'key': 'properties.entries', 'type': '[MSDeployLogEntry]'}, + } + + def __init__(self, **kwargs): + super(MSDeployLog, self).__init__(**kwargs) + self.entries = None + + +class MSDeployLogEntry(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2020_09_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': 'MSDeployLogEntryType'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'deployer': {'key': 'properties.deployer', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'MSDeployProvisioningState'}, + '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(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 NameValuePair(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 NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2020_09_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.description = kwargs.get('description', None) + self.order = kwargs.get('order', None) + self.remote_subnet = kwargs.get('remote_subnet', 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param method: Possible values include: 'ClientSecretPost' + :type method: str or + ~azure.mgmt.web.v2020_09_01.models.ClientCredentialMethod + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenIdConnectClientCredential, self).__init__(**kwargs) + self.method = kwargs.get('method', None) + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param client_id: + :type client_id: str + :param client_credential: + :type client_credential: + ~azure.mgmt.web.v2020_09_01.models.OpenIdConnectClientCredential + :param open_id_connect_configuration: + :type open_id_connect_configuration: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2020_09_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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(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_09_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 PerfMonResponse(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_09_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(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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(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 + :param end_time: End time of the period. + :type end_time: 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_09_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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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: true if promotion code is + required; otherwise, 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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'AppServicePlanRestrictions'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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(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_09_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 PrivateEndpointConnectionResource(ProxyOnlyResource): + """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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar provisioning_state: + :vartype provisioning_state: str + :param private_endpoint: PrivateEndpoint of a remote private endpoint + connection + :type private_endpoint: ~azure.mgmt.web.v2020_09_01.models.ArmIdWrapper + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_09_01.models.PrivateLinkConnectionState + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'ArmIdWrapper'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionResource, 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) + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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(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_09_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.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.properties = kwargs.get('properties', None) + + +class PrivateLinkResourceProperties(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(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_09_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.get('value', None) + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_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 + :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 + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'blob': {'key': 'properties.blob', 'type': 'bytearray'}, + 'public_certificate_location': {'key': 'properties.publicCertificateLocation', 'type': 'PublicCertificateLocation'}, + '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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + \\nMinReroutePercentage or + MaxReroutePercentage. Site metrics are checked every N + minutes specified in ChangeIntervalInMinutes.\\nCustom + decision algorithm + can be provided in TiPCallback site extension which URL can be specified + in 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param creation_time: Timestamp when this instance was created. + :type creation_time: 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_09_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_09_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_09_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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 Rendering(Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.v2020_09_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': 'RenderingType'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 ResourceMetricAvailability(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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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_09_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(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_09_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.get('name', None) + self.type = kwargs.get('type', None) + self.is_fqdn = kwargs.get('is_fqdn', None) + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2020_09_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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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_09_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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_09_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'BackupRestoreOperationType'}, + '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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2020_09_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: + list[~azure.mgmt.web.v2020_09_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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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_09_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_09_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_09_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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_09_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2020_09_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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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_09_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: true if the app is a default + container; otherwise, 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_09_01.models.SlotSwapStatus + :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_09_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 identity: + :type identity: ~azure.mgmt.web.v2020_09_01.models.ManagedServiceIdentity + """ + + _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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.identity = kwargs.get('identity', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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_09_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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_09_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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested + as part of GitHub Login authentication. + This setting is optional + :type git_hub_oauth_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_oauth_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_oauth_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_oauth_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_oauth_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_oauth_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_oauth_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.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_oauth_scopes = kwargs.get('google_oauth_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_oauth_scopes = kwargs.get('facebook_oauth_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_oauth_scopes = kwargs.get('git_hub_oauth_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_oauth_scopes = kwargs.get('microsoft_account_oauth_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param platform: + :type platform: ~azure.mgmt.web.v2020_09_01.models.AuthPlatform + :param global_validation: + :type global_validation: + ~azure.mgmt.web.v2020_09_01.models.GlobalValidation + :param identity_providers: + :type identity_providers: + ~azure.mgmt.web.v2020_09_01.models.IdentityProviders + :param login: + :type login: ~azure.mgmt.web.v2020_09_01.models.Login + :param http_settings: + :type http_settings: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2020_09_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_09_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2020_09_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + '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(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(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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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_09_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2020_09_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_09_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2020_09_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_09_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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_09_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2020_09_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2020_09_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_09_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_09_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_09_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_09_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_09_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2020_09_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2020_09_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2020_09_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_09_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. Default value: True . + :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_09_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_09_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_09_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 health_check_path: Health check path + :type health_check_path: str + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, + } + + 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.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.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.health_check_path = kwargs.get('health_check_path', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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_09_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2020_09_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_09_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2020_09_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_09_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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_09_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2020_09_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2020_09_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_09_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_09_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_09_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_09_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_09_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2020_09_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2020_09_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2020_09_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_09_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. Default value: True . + :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_09_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_09_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_09_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 health_check_path: Health check path + :type health_check_path: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, + } + + 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.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.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.health_check_path = kwargs.get('health_check_path', 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar time: The time the snapshot was taken. + :vartype time: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'extension_id': {'key': 'properties.extension_id', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'extension_type': {'key': 'properties.extension_type', 'type': 'SiteExtensionType'}, + '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 SiteLimits(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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param application_logs: Application logs configuration. + :type application_logs: + ~azure.mgmt.web.v2020_09_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2020_09_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2020_09_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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_09_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_09_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_09_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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_09_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2020_09_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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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_09_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: true if the app is a default + container; otherwise, 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_09_01.models.SlotSwapStatus + :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_09_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 identity: + :type identity: ~azure.mgmt.web.v2020_09_01.models.ManagedServiceIdentity + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(SitePatchResource, self).__init__(**kwargs) + 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.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.identity = kwargs.get('identity', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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.get('html', None) + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param is_git_hub_action: true if this is deployed via GitHub + action. + :type is_git_hub_action: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + } + + 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) + + +class SkuCapacity(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 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'}, + '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.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(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_09_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_09_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(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_09_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2020_09_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 SkuInfos(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_09_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 SlotSwapStatus(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 + :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(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + '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.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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'time': {'key': 'properties.time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Snapshot, self).__init__(**kwargs) + self.time = None + + +class SnapshotRecoverySource(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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2020_09_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': 'SolutionType'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2020_09_01.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool + :param is_preview: true if this stack is in Preview, + otherwise false. + :type is_preview: bool + :param is_deprecated: true if this stack has been deprecated, + otherwise false. + :type is_deprecated: bool + :param is_hidden: true if this stack should be hidden for new + customers on portal, otherwise 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'}, + '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.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(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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(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_09_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' + :type worker_size: str or + ~azure.mgmt.web.v2020_09_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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 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_09_01.models.StaticSiteBuildProperties + :param sku: + :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(StaticSiteARMResource, self).__init__(**kwargs) + self.default_hostname = None + self.repository_url = kwargs.get('repository_url', None) + self.branch = kwargs.get('branch', None) + self.custom_domains = None + self.repository_token = kwargs.get('repository_token', None) + self.build_properties = kwargs.get('build_properties', None) + self.sku = kwargs.get('sku', 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: 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_09_01.models.BuildStatus + """ + + _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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + } + + 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 + + +class StaticSiteBuildProperties(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: The path of the app artifacts after + building. + :type app_artifact_location: str + """ + + _attribute_map = { + 'app_location': {'key': 'appLocation', 'type': 'str'}, + 'api_location': {'key': 'apiLocation', 'type': 'str'}, + 'app_artifact_location': {'key': 'appArtifactLocation', '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) + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_name': {'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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StaticSiteCustomDomainOverviewARMResource, self).__init__(**kwargs) + self.domain_name = None + self.created_on = None + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 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_09_01.models.StaticSiteBuildProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + 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.custom_domains = None + self.repository_token = kwargs.get('repository_token', None) + self.build_properties = kwargs.get('build_properties', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar expires_on: The expiration time of the invitation + :vartype expires_on: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 StatusCodesBasedTrigger(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 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'}, + '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.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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(StringDictionary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.web.v2020_09_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.web.v2020_09_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TldLegalAgreement(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.get('agreement_key', None) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) + self.url = kwargs.get('url', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.FileSystemTokenStore + :param azure_blob_storage: + :type azure_blob_storage: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param privacy: If true, then the top level domain supports + domain privacy; otherwise, 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(TopLevelDomain, self).__init__(**kwargs) + self.privacy = kwargs.get('privacy', None) + + +class TopLevelDomainAgreementOption(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + 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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param runs: List of triggered web job runs. + :type runs: list[~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'runs': {'key': 'properties.runs', 'type': '[TriggeredJobRun]'}, + } + + def __init__(self, **kwargs): + super(TriggeredJobHistory, self).__init__(**kwargs) + self.runs = kwargs.get('runs', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'TriggeredWebJobStatus'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param latest_run: Latest job run information. + :type latest_run: ~azure.mgmt.web.v2020_09_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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'WebJobType'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'ComputeModeOptions'}, + '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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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' + :type type: str or + ~azure.mgmt.web.v2020_09_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: 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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(ValidateRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + 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) + + +class ValidateResponse(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_09_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(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(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2020_09_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(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(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(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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.get('id', None) + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'vnet_resource_group': {'key': 'properties.vnetResourceGroup', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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) + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, **kwargs): + super(VnetValidationFailureDetails, self).__init__(**kwargs) + self.failed = kwargs.get('failed', None) + self.failed_tests = kwargs.get('failed_tests', 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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(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_09_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.get('value', None) + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'WebJobType'}, + '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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param state: Possible values include: 'READY', 'STOPPED', 'UNKNOWN' + :type state: str or ~azure.mgmt.web.v2020_09_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: + :type containers: dict[str, + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'state': {'key': 'properties.state', 'type': 'SiteRuntimeState'}, + '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 WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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_09_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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] + :param sku: + :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(WorkerPoolResource, self).__init__(**kwargs) + 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 + self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models_py3.py new file mode 100644 index 00000000000..3a12370285b --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models_py3.py @@ -0,0 +1,15503 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: + list[~azure.mgmt.web.v2020_09_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2020_09_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: + super(AbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.events = events + self.solutions = solutions + + +class Address(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: str=None, **kwargs) -> None: + 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(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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = None + self.system_data = system_data + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: + super(AddressResponse, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, allowed_audiences=None, **kwargs) -> None: + super(AllowedAudiencesValidation, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.allowed_audiences = allowed_audiences + + +class AnalysisData(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_09_01.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: + list[~azure.mgmt.web.v2020_09_01.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: + ~azure.mgmt.web.v2020_09_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(AnalysisDefinition, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.description = None + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class ApiManagementConfig(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: str=None, **kwargs) -> None: + super(ApiManagementConfig, self).__init__(**kwargs) + self.id = id + + +class ApplicationLogsConfig(Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2020_09_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage + configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2020_09_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_09_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: + 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(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_09_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2020_09_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]'}, + } + + def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: + super(ApplicationStack, self).__init__(**kwargs) + self.name = name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param application_stack_resource_name: Application stack name. + :type application_stack_resource_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_09_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: + list[~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'application_stack_resource_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]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, application_stack_resource_name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: + super(ApplicationStackResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.application_stack_resource_name = application_stack_resource_name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'app_id': {'key': 'properties.appId', 'type': 'str'}, + 'app_secret_setting_name': {'key': 'properties.appSecretSettingName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, app_id: str=None, app_secret_setting_name: str=None, **kwargs) -> None: + super(AppRegistration, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.app_id = app_id + self.app_secret_setting_name = app_secret_setting_name + + +class AppServiceCertificate(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_09_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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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 Resource(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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + """ + + _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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.location = location + self.type = None + self.tags = tags + self.system_data = system_data + + +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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2020_09_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_09_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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_09_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_09_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2020_09_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_09_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_09_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, location: str, product_type, kind: str=None, tags=None, system_data=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + super(AppServiceCertificateOrder, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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 + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, + ~azure.mgmt.web.v2020_09_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 between 1 and 3). + Default value: 1 . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_09_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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_09_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_09_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: + ~azure.mgmt.web.v2020_09_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_09_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_09_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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': 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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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'}, + } + + def __init__(self, *, product_type, kind: str=None, system_data=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + super(AppServiceCertificateOrderPatchResource, self).__init__(kind=kind, system_data=system_data, **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 + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, kind: str=None, system_data=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceCertificatePatchResource, self).__init__(kind=kind, system_data=system_data, **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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceCertificateResource, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **kwargs) + self.key_vault_id = key_vault_id + self.key_vault_secret_name = key_vault_secret_name + self.provisioning_state = None + + +class AppServiceEnvironment(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. + + :param name: Required. Name of the App Service Environment. + :type name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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_09_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_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'vnetSubnetName', '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'}, + 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironment, self).__init__(**kwargs) + self.name = name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param app_service_environment_patch_resource_name: Required. Name of the + App Service Environment. + :type app_service_environment_patch_resource_name: str + :param location: Required. Location of the App Service Environment, e.g. + "West US". + :type location: 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_09_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_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'app_service_environment_patch_resource_name': {'required': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'app_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, system_data=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name + self.location = location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param app_service_environment_resource_name: Required. Name of the App + Service Environment. + :type app_service_environment_resource_name: str + :param app_service_environment_resource_location: Required. Location of + the App Service Environment, e.g. "West US". + :type app_service_environment_resource_location: 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_09_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_09_01.models.HostingEnvironmentStatus + :param vnet_name: Name of the Virtual Network for the App Service + Environment. + :type vnet_name: str + :param vnet_resource_group_name: Resource group of the Virtual Network. + :type vnet_resource_group_name: str + :param vnet_subnet_name: Subnet of the Virtual Network. + :type vnet_subnet_name: str + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: + ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :param multi_role_count: Number of front-end instances. + :type multi_role_count: int + :param worker_pools: Required. Description of worker pools with worker + size IDs, VM sizes, and number of workers in each pool. + :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] + :param ipssl_address_count: Number of IP SSL addresses reserved for the + App Service Environment. + :type ipssl_address_count: int + :ivar database_edition: Edition of the metadata database for the App + Service Environment, e.g. "Standard". + :vartype database_edition: str + :ivar database_service_objective: Service objective of the metadata + database for the App Service Environment, e.g. "S0". + :vartype database_service_objective: str + :ivar upgrade_domains: Number of upgrade domains of the App Service + Environment. + :vartype upgrade_domains: int + :ivar subscription_id: Subscription of the App Service Environment. + :vartype subscription_id: str + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar last_action: Last deployment action on the App Service Environment. + :vartype last_action: str + :ivar last_action_result: Result of the last deployment action on the App + Service Environment. + :vartype last_action_result: str + :ivar allowed_multi_sizes: List of comma separated strings describing + which VM sizes are allowed for front-ends. + :vartype allowed_multi_sizes: str + :ivar allowed_worker_sizes: List of comma separated strings describing + which VM sizes are allowed for workers. + :vartype allowed_worker_sizes: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service + Environment. + :vartype maximum_number_of_machines: int + :ivar vip_mappings: Description of IP SSL mapping for the App Service + Environment. + :vartype vip_mappings: + list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] + :ivar environment_capacities: Current total, used, and available worker + capacities. + :vartype environment_capacities: + list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] + :param network_access_control_list: Access control list for controlling + traffic to the App Service Environment. + :type network_access_control_list: + list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] + :ivar environment_is_healthy: True/false indicating whether the App + Service Environment is healthy. + :vartype environment_is_healthy: bool + :ivar environment_status: Detailed message about with results of the last + check of the App Service Environment. + :vartype environment_status: str + :ivar resource_group: Resource group of the App Service Environment. + :vartype resource_group: str + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. + :vartype default_front_end_scale_factor: int + :param api_management_account_id: API Management Account associated with + the App Service Environment. + :type api_management_account_id: str + :param suspended: true if the App Service Environment is + suspended; otherwise, false. The environment can be + suspended, e.g. when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type suspended: bool + :param dynamic_cache_enabled: True/false indicating whether the App + Service Environment is suspended. The environment can be suspended e.g. + when the management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :type dynamic_cache_enabled: bool + :param cluster_settings: Custom settings for changing the behavior of the + App Service Environment. + :type cluster_settings: + list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on + ASE db + :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'app_service_environment_resource_name': {'required': True}, + 'app_service_environment_resource_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'worker_pools': {'required': True}, + 'database_edition': {'readonly': True}, + 'database_service_objective': {'readonly': True}, + 'upgrade_domains': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'last_action': {'readonly': True}, + 'last_action_result': {'readonly': True}, + 'allowed_multi_sizes': {'readonly': True}, + 'allowed_worker_sizes': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'vip_mappings': {'readonly': True}, + 'environment_capacities': {'readonly': True}, + 'environment_is_healthy': {'readonly': True}, + 'environment_status': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'default_front_end_scale_factor': {'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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, + 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, + 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, + 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, + 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, + 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, + 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, + 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, + 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, + 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, + } + + def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, system_data=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: + super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **kwargs) + self.app_service_environment_resource_name = app_service_environment_resource_name + self.app_service_environment_resource_location = app_service_environment_resource_location + self.provisioning_state = None + self.status = None + self.vnet_name = vnet_name + self.vnet_resource_group_name = vnet_resource_group_name + self.vnet_subnet_name = vnet_subnet_name + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = multi_role_count + self.worker_pools = worker_pools + self.ipssl_address_count = ipssl_address_count + self.database_edition = None + self.database_service_objective = None + self.upgrade_domains = None + self.subscription_id = None + self.dns_suffix = dns_suffix + self.last_action = None + self.last_action_result = None + self.allowed_multi_sizes = None + self.allowed_worker_sizes = None + self.maximum_number_of_machines = None + self.vip_mappings = None + self.environment_capacities = None + self.network_access_control_list = network_access_control_list + self.environment_is_healthy = None + self.environment_status = None + self.resource_group = None + self.front_end_scale_factor = front_end_scale_factor + self.default_front_end_scale_factor = None + self.api_management_account_id = api_management_account_id + self.suspended = suspended + self.dynamic_cache_enabled = dynamic_cache_enabled + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name + + +class AppserviceGithubToken(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: str=None, scope: str=None, token_type: str=None, got_token: bool=None, error_message: str=None, **kwargs) -> None: + 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(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) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_09_01.models.ProvisioningState + :param sku: + :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription + """ + + _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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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.sku = sku + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: This needs to set to true when creating a + Linux App Service Plan, along with kind set to + Linux. It should be false otherwise. Default + value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'InProgress', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_09_01.models.ProvisioningState + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + } + + def __init__(self, *, kind: str=None, system_data=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: + super(AppServicePlanPatchResource, self).__init__(kind=kind, system_data=system_data, **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 + + +class ArmIdWrapper(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) -> None: + super(ArmIdWrapper, self).__init__(**kwargs) + self.id = 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, enabled: bool=None, runtime_version: str=None, config_file_path: str=None, **kwargs) -> None: + super(AuthPlatform, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_version + self.config_file_path = config_file_path + + +class AutoHealActions(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_09_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: + ~azure.mgmt.web.v2020_09_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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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_09_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2020_09_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2020_09_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_09_01.models.StatusCodesBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: + ~azure.mgmt.web.v2020_09_01.models.SlowRequestsBasedTrigger + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + } + + def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.slow_requests = slow_requests + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: + ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectoryRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectoryLogin + :param validation: + :type validation: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, enabled: bool=None, registration=None, login=None, validation=None, is_auto_provisioned: bool=None, **kwargs) -> None: + super(AzureActiveDirectory, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'disable_www_authenticate': {'key': 'properties.disableWWWAuthenticate', 'type': 'bool'}, + 'login_parameters': {'key': 'properties.loginParameters', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, disable_www_authenticate: bool=None, login_parameters=None, **kwargs) -> None: + super(AzureActiveDirectoryLogin, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, open_id_issuer: str=None, client_id: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, **kwargs) -> None: + super(AzureActiveDirectoryRegistration, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param jwt_claim_checks: + :type jwt_claim_checks: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'jwt_claim_checks': {'key': 'properties.jwtClaimChecks', 'type': 'JwtClaimChecks'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, jwt_claim_checks=None, allowed_audiences=None, **kwargs) -> None: + super(AzureActiveDirectoryValidation, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.jwt_claim_checks = jwt_claim_checks + self.allowed_audiences = allowed_audiences + + +class AzureBlobStorageApplicationLogsConfig(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_09_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + } + + def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: + super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + self.retention_in_days = retention_in_days + + +class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) + self.sas_url = sas_url + self.retention_in_days = retention_in_days + self.enabled = enabled + + +class AzureStorageInfoValue(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_09_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' + :vartype state: str or + ~azure.mgmt.web.v2020_09_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': '{AzureStorageInfoValue}'}, + } + + def __init__(self, *, kind: str=None, system_data=None, properties=None, **kwargs) -> None: + super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.properties = properties + + +class AzureTableStorageApplicationLogsConfig(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_09_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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 backup_item_name: Name of this backup. + :vartype backup_item_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_09_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 + :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_09_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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'backup_id': {'key': 'properties.id', 'type': 'int'}, + 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, + 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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: str=None, system_data=None, **kwargs) -> None: + super(BackupItem, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.backup_id = None + self.storage_account_url = None + self.blob_name = None + self.backup_item_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 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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: Required. 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_09_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: + list[~azure.mgmt.web.v2020_09_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_account_url': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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, *, storage_account_url: str, kind: str=None, system_data=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: + super(BackupRequest, self).__init__(kind=kind, system_data=system_data, **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(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). Default value: 7 . + :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_09_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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + } + + def __init__(self, *, kind: str=None, system_data=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: + super(BillingMeter, self).__init__(kind=kind, system_data=system_data, **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 + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'sas_url_setting_name': {'key': 'properties.sasUrlSettingName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, sas_url_setting_name: str=None, **kwargs) -> None: + super(BlobStorageTokenStore, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.sas_url_setting_name = sas_url_setting_name + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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_09_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_09_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 + """ + + _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}, + 'password': {'required': 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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + } + + def __init__(self, *, location: str, password: str, kind: str=None, tags=None, system_data=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: + super(Certificate, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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 + + +class CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param email_id: Email id. + :type email_id: str + :param time_stamp: Time stamp. + :type time_stamp: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'email_id': {'key': 'properties.emailId', 'type': 'str'}, + 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, system_data=None, email_id: str=None, time_stamp=None, **kwargs) -> None: + super(CertificateEmail, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'action_type': {'key': 'properties.actionType', 'type': 'CertificateOrderActionType'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(CertificateOrderAction, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.action_type = None + self.created_at = None + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: datetime + :param password: Required. 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_09_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_09_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 + """ + + _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}, + 'password': {'required': 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'KeyVaultSecretStatus'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + } + + def __init__(self, *, password: str, kind: str=None, system_data=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: + super(CertificatePatchResource, self).__init__(kind=kind, system_data=system_data, **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 + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, client_id: str=None, client_secret_setting_name: str=None, **kwargs) -> None: + super(ClientRegistration, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.client_id = client_id + self.client_secret_setting_name = client_secret_setting_name + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': '{ConnStringValueTypePair}'}, + } + + def __init__(self, *, kind: str=None, system_data=None, properties=None, **kwargs) -> None: + super(ConnectionStringDictionary, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.properties = properties + + +class ConnStringInfo(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_09_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class ConnStringValueTypePair(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_09_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ConnectionStringType'}, + } + + def __init__(self, *, value: str, type, **kwargs) -> None: + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = value + self.type = type + + +class Contact(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_09_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: + 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(Model): + """ContainerCpuStatistics. + + :param cpu_usage: + :type cpu_usage: ~azure.mgmt.web.v2020_09_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_09_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=None, system_cpu_usage: int=None, online_cpu_count: int=None, throttling_data=None, **kwargs) -> None: + 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(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: int=None, per_cpu_usage=None, kernel_mode_usage: int=None, user_mode_usage: int=None, **kwargs) -> None: + 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(Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: datetime + :param previous_time_stamp: + :type previous_time_stamp: datetime + :param current_cpu_stats: + :type current_cpu_stats: + ~azure.mgmt.web.v2020_09_01.models.ContainerCpuStatistics + :param previous_cpu_stats: + :type previous_cpu_stats: + ~azure.mgmt.web.v2020_09_01.models.ContainerCpuStatistics + :param memory_stats: + :type memory_stats: + ~azure.mgmt.web.v2020_09_01.models.ContainerMemoryStatistics + :param name: + :type name: str + :param id: + :type id: str + :param eth0: + :type eth0: + ~azure.mgmt.web.v2020_09_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=None, previous_time_stamp=None, current_cpu_stats=None, previous_cpu_stats=None, memory_stats=None, name: str=None, id: str=None, eth0=None, **kwargs) -> None: + 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(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: int=None, max_usage: int=None, limit: int=None, **kwargs) -> None: + super(ContainerMemoryStatistics, self).__init__(**kwargs) + self.usage = usage + self.max_usage = max_usage + self.limit = limit + + +class ContainerNetworkInterfaceStatistics(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: int=None, rx_packets: int=None, rx_errors: int=None, rx_dropped: int=None, tx_bytes: int=None, tx_packets: int=None, tx_errors: int=None, tx_dropped: int=None, **kwargs) -> None: + 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(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: int=None, throttled_periods: int=None, throttled_time: int=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param status: Job status. Possible values include: 'Initializing', + 'Starting', 'Running', 'PendingRestart', 'Stopped' + :type status: str or + ~azure.mgmt.web.v2020_09_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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, system_data=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + super(ContinuousWebJob, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param convention: Possible values include: 'FixedTime', + 'IdentityProviderDerived' + :type convention: str or + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'convention': {'key': 'properties.convention', 'type': 'CookieExpirationConvention'}, + 'time_to_expiration': {'key': 'properties.timeToExpiration', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, convention=None, time_to_expiration: str=None, **kwargs) -> None: + super(CookieExpiration, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.convention = convention + self.time_to_expiration = time_to_expiration + + +class CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.support_credentials = support_credentials + + +class CsmCopySlotEntity(Model): + """Copy deployment slot parameters. + + All required parameters must be populated in order to send to Azure. + + :param target_slot: Required. Destination deployment slot during copy + operation. + :type target_slot: str + :param site_config: Required. The site object which will be merged with + the source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2020_09_01.models.SiteConfig + """ + + _validation = { + 'target_slot': {'required': True}, + 'site_config': {'required': True}, + } + + _attribute_map = { + 'target_slot': {'key': 'targetSlot', 'type': 'str'}, + 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, + } + + def __init__(self, *, target_slot: str, site_config, **kwargs) -> None: + super(CsmCopySlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.site_config = site_config + + +class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: + super(CsmMoveResourceEnvelope, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2020_09_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :type properties: + ~azure.mgmt.web.v2020_09_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2020_09_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param ftp: Required. Whether FTP is allowed. + :type ftp: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Required. Whether Scm Basic Auth is allowed. + :type scm: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'ftp': {'required': True}, + 'scm': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'ftp': {'key': 'properties.ftp', 'type': 'CsmPublishingCredentialsPoliciesEntity'}, + 'scm': {'key': 'properties.scm', 'type': 'CsmPublishingCredentialsPoliciesEntity'}, + } + + def __init__(self, *, ftp, scm, kind: str=None, system_data=None, **kwargs) -> None: + super(CsmPublishingCredentialsPoliciesCollection, self).__init__(kind=kind, system_data=system_data, **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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param allow: Required. true to allow access to a publishing + method; otherwise, false. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allow': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'allow': {'key': 'properties.allow', 'type': 'bool'}, + } + + def __init__(self, *, allow: bool, kind: str=None, system_data=None, **kwargs) -> None: + super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.allow = allow + + +class CsmPublishingProfileOptions(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_09_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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = format + self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints + + +class CsmSlotEntity(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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) -> None: + super(CsmSlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.preserve_vnet = preserve_vnet + + +class CsmUsageQuota(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 + :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_09_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + 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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar is_hostname_already_verified: true if hostname is + already verified; otherwise, 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_09_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_09_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'is_hostname_already_verified': {'key': 'properties.isHostnameAlreadyVerified', 'type': 'bool'}, + 'custom_domain_verification_test': {'key': 'properties.customDomainVerificationTest', 'type': 'DnsVerificationTestResult'}, + '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, + 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: + super(CustomHostnameAnalysisResult, self).__init__(kind=kind, system_data=system_data, **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_cname_records = alternate_cname_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: + ~azure.mgmt.web.v2020_09_01.models.OpenIdConnectRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'OpenIdConnectRegistration'}, + 'login': {'key': 'properties.login', 'type': 'OpenIdConnectLogin'}, + } + + def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: + super(CustomOpenIdConnectProvider, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class DatabaseBackupSetting(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_09_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: + 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 DataSource(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_09_01.models.NameValuePair] + """ + + _attribute_map = { + 'instructions': {'key': 'instructions', 'type': '[str]'}, + 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, + } + + def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: + super(DataSource, self).__init__(**kwargs) + self.instructions = instructions + self.data_source_uri = data_source_uri + + +class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: + super(DataTableResponseColumn, self).__init__(**kwargs) + self.column_name = column_name + self.data_type = data_type + self.column_type = column_type + + +class DataTableResponseObject(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_09_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: str=None, columns=None, rows=None, **kwargs) -> None: + super(DataTableResponseObject, self).__init__(**kwargs) + self.table_name = table_name + self.columns = columns + self.rows = rows + + +class DefaultErrorResponse(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_09_01.models.DefaultErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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_09_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=None, **kwargs) -> None: + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(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) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: + super(DeletedAppRestoreRequest, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, + 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(DeletedSite, self).__init__(kind=kind, system_data=system_data, **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.deleted_site_kind = None + self.geo_region_name = 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :param end_time: End time. + :type end_time: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: + super(Deployment, self).__init__(kind=kind, system_data=system_data, **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 DeploymentLocations(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_09_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full + descriptions of the environments. + :type hosting_environments: + list[~azure.mgmt.web.v2020_09_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_09_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: + super(DeploymentLocations, self).__init__(**kwargs) + self.locations = locations + self.hosting_environments = hosting_environments + self.hosting_environment_deployment_infos = hosting_environment_deployment_infos + + +class DetectorAbnormalTimePeriod(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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_09_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_09_01.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.v2020_09_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': 'IssueType'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, **kwargs) -> None: + super(DetectorDefinition, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None + + +class DetectorInfo(Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar description: Short description of the detector and its purpose + :vartype description: str + :ivar category: Support Category + :vartype category: str + :ivar sub_category: Support Sub Category + :vartype sub_category: str + :ivar support_topic_id: Support Topic Id + :vartype support_topic_id: str + """ + + _validation = { + 'description': {'readonly': True}, + 'category': {'readonly': True}, + 'sub_category': {'readonly': True}, + 'support_topic_id': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'sub_category': {'key': 'subCategory', 'type': 'str'}, + 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DetectorInfo, self).__init__(**kwargs) + self.description = None + self.category = None + self.sub_category = None + self.support_topic_id = 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param metadata: metadata for the detector + :type metadata: ~azure.mgmt.web.v2020_09_01.models.DetectorInfo + :param dataset: Data Set + :type dataset: list[~azure.mgmt.web.v2020_09_01.models.DiagnosticData] + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'metadata': {'key': 'properties.metadata', 'type': 'DetectorInfo'}, + 'dataset': {'key': 'properties.dataset', 'type': '[DiagnosticData]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, metadata=None, dataset=None, **kwargs) -> None: + super(DetectorResponse, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.metadata = metadata + self.dataset = dataset + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param start_time: Start time of the period + :type start_time: datetime + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_09_01.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.v2020_09_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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: + super(DiagnosticAnalysis, self).__init__(kind=kind, system_data=system_data, **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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(DiagnosticCategory, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.description = None + + +class DiagnosticData(Model): + """Set of data with rendering instructions. + + :param table: Data in table form + :type table: ~azure.mgmt.web.v2020_09_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should + be rendered + :type rendering_properties: ~azure.mgmt.web.v2020_09_01.models.Rendering + """ + + _attribute_map = { + 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, + 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, + } + + def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: + super(DiagnosticData, self).__init__(**kwargs) + self.table = table + self.rendering_properties = rendering_properties + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param start_time: Start time of the period + :type start_time: datetime + :param end_time: End time of the period + :type end_time: 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_09_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: + list[~azure.mgmt.web.v2020_09_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_09_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: + super(DiagnosticDetectorResponse, self).__init__(kind=kind, system_data=system_data, **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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: + 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(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 + :param end_time: End time of the period + :type end_time: 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_09_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_09_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_09_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_09_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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_09_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_09_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2020_09_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_09_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, system_data=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + super(Domain, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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_09_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, + } + + def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: + super(DomainAvailabilityCheckResult, self).__init__(**kwargs) + self.name = name + self.available = available + self.domain_type = domain_type + + +class DomainControlCenterSsoRequest(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) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'ownership_id': {'key': 'properties.ownershipId', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, ownership_id: str=None, **kwargs) -> None: + super(DomainOwnershipIdentifier, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.ownership_id = ownership_id + + +class DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_09_01.models.Contact + :param contact_tech: Required. Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_09_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_09_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_09_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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_09_01.models.HostName] + :param consent: Required. Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_09_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str] + :param dns_type: Current DNS type. Possible values include: 'AzureDns', + 'DefaultDomainRegistrarDns' + :type dns_type: str or ~azure.mgmt.web.v2020_09_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_09_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, system_data=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + super(DomainPatchResource, self).__init__(kind=kind, system_data=system_data, **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(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 + 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 + """ + + _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: + super(DomainPurchaseConsent, self).__init__(**kwargs) + self.agreement_keys = agreement_keys + self.agreed_by = agreed_by + self.agreed_at = agreed_at + + +class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: + super(DomainRecommendationSearchParameters, self).__init__(**kwargs) + self.keywords = keywords + self.max_domain_recommendations = max_domain_recommendations + + +class EnabledConfig(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: bool=None, **kwargs) -> None: + super(EnabledConfig, self).__init__(**kwargs) + self.enabled = enabled + + +class EndpointDependency(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_09_01.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(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: str=None, port: int=None, latency: float=None, is_accessible: bool=None, **kwargs) -> None: + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.latency = latency + self.is_accessible = is_accessible + + +class ErrorEntity(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_09_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: + 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(Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2020_09_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_09_01.models.AppRegistration + :param graph_api_version: + :type graph_api_version: str + :param login: + :type login: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, enabled: bool=None, registration=None, graph_api_version: str=None, login=None, **kwargs) -> None: + super(Facebook, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.enabled = enabled + self.registration = registration + self.graph_api_version = graph_api_version + self.login = login + + +class FileSystemApplicationLogsConfig(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2020_09_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, *, level="Off", **kwargs) -> None: + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + + +class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'directory': {'key': 'properties.directory', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, directory: str=None, **kwargs) -> None: + super(FileSystemTokenStore, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param convention: Possible values include: 'NoProxy', 'Standard', + 'Custom' + :type convention: str or + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'convention': {'key': 'properties.convention', 'type': 'ForwardProxyConvention'}, + 'custom_host_header_name': {'key': 'properties.customHostHeaderName', 'type': 'str'}, + 'custom_proto_header_name': {'key': 'properties.customProtoHeaderName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, convention=None, custom_host_header_name: str=None, custom_proto_header_name: str=None, **kwargs) -> None: + super(ForwardProxy, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.convention = convention + self.custom_host_header_name = custom_host_header_name + self.custom_proto_header_name = custom_proto_header_name + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: + super(FunctionEnvelope, self).__init__(kind=kind, system_data=system_data, **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 FunctionSecrets(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: str=None, trigger_url: str=None, **kwargs) -> None: + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'org_domain': {'key': 'properties.orgDomain', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(GeoRegion, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.description = None + self.display_name = None + self.org_domain = 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_09_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'ClientRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + } + + def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: + super(GitHub, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class GlobalCsmSkuDescription(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_09_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_09_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'require_authentication': {'key': 'properties.requireAuthentication', 'type': 'bool'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientActionV2'}, + 'redirect_to_provider': {'key': 'properties.redirectToProvider', 'type': 'str'}, + 'excluded_paths': {'key': 'properties.excludedPaths', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, require_authentication: bool=None, unauthenticated_client_action=None, redirect_to_provider: str=None, excluded_paths=None, **kwargs) -> None: + super(GlobalValidation, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_09_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_09_01.models.LoginScopes + :param validation: + :type validation: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, enabled: bool=None, registration=None, login=None, validation=None, **kwargs) -> None: + super(Google, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + self.validation = validation + + +class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: + super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) + self.name = name + self.location = location + + +class HostingEnvironmentDiagnostics(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: str=None, diagnostics_output: str=None, **kwargs) -> None: + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = name + self.diagnostics_output = diagnostics_output + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: + super(HostKeys, self).__init__(**kwargs) + self.master_key = master_key + self.function_keys = function_keys + self.system_keys = system_keys + + +class HostName(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_09_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_09_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_09_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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: 'Verified', + 'Managed' + :type host_name_type: str or + ~azure.mgmt.web.v2020_09_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: 'Disabled', + 'SniEnabled', 'IpBasedEnabled' + :type ssl_state: str or ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: + super(HostNameBinding, self).__init__(kind=kind, system_data=system_data, **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 HostNameSslState(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_09_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 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_09_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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(Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: + ~azure.mgmt.web.v2020_09_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_09_01.models.AzureBlobStorageHttpLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, + } + + def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param require_https: + :type require_https: bool + :param routes: + :type routes: ~azure.mgmt.web.v2020_09_01.models.HttpSettingsRoutes + :param forward_proxy: + :type forward_proxy: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'require_https': {'key': 'properties.requireHttps', 'type': 'bool'}, + 'routes': {'key': 'properties.routes', 'type': 'HttpSettingsRoutes'}, + 'forward_proxy': {'key': 'properties.forwardProxy', 'type': 'ForwardProxy'}, + } + + def __init__(self, *, kind: str=None, system_data=None, require_https: bool=None, routes=None, forward_proxy=None, **kwargs) -> None: + super(HttpSettings, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'api_prefix': {'key': 'properties.apiPrefix', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, api_prefix: str=None, **kwargs) -> None: + super(HttpSettingsRoutes, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + super(HybridConnection, self).__init__(kind=kind, system_data=system_data, **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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'send_key_name': {'key': 'properties.sendKeyName', 'type': 'str'}, + 'send_key_value': {'key': 'properties.sendKeyValue', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(HybridConnectionKey, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'current': {'key': 'properties.current', 'type': 'int'}, + 'maximum': {'key': 'properties.maximum', 'type': 'int'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(HybridConnectionLimits, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'value': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, value: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.value = value + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param azure_active_directory: + :type azure_active_directory: + ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectory + :param facebook: + :type facebook: ~azure.mgmt.web.v2020_09_01.models.Facebook + :param git_hub: + :type git_hub: ~azure.mgmt.web.v2020_09_01.models.GitHub + :param google: + :type google: ~azure.mgmt.web.v2020_09_01.models.Google + :param twitter: + :type twitter: ~azure.mgmt.web.v2020_09_01.models.Twitter + :param custom_open_id_connect_providers: + :type custom_open_id_connect_providers: dict[str, + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, + 'custom_open_id_connect_providers': {'key': 'properties.customOpenIdConnectProviders', 'type': '{CustomOpenIdConnectProvider}'}, + } + + def __init__(self, *, kind: str=None, system_data=None, azure_active_directory=None, facebook=None, git_hub=None, google=None, twitter=None, custom_open_id_connect_providers=None, **kwargs) -> None: + super(IdentityProviders, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.azure_active_directory = azure_active_directory + self.facebook = facebook + self.git_hub = git_hub + self.google = google + self.twitter = twitter + self.custom_open_id_connect_providers = custom_open_id_connect_providers + + +class InboundEnvironmentEndpoint(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: str=None, endpoints=None, ports=None, **kwargs) -> None: + super(InboundEnvironmentEndpoint, self).__init__(**kwargs) + self.description = description + self.endpoints = endpoints + self.ports = ports + + +class IpSecurityRestriction(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_09_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: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, headers=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'allowed_groups': {'key': 'properties.allowedGroups', 'type': '[str]'}, + 'allowed_client_applications': {'key': 'properties.allowedClientApplications', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, allowed_groups=None, allowed_client_applications=None, **kwargs) -> None: + super(JwtClaimChecks, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.allowed_groups = allowed_groups + self.allowed_client_applications = allowed_client_applications + + +class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: + super(KeyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param routes: + :type routes: ~azure.mgmt.web.v2020_09_01.models.LoginRoutes + :param token_store: + :type token_store: ~azure.mgmt.web.v2020_09_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_09_01.models.CookieExpiration + :param nonce: + :type nonce: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, routes=None, token_store=None, preserve_url_fragments_for_logins: bool=None, allowed_external_redirect_urls=None, cookie_expiration=None, nonce=None, **kwargs) -> None: + super(Login, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'logout_endpoint': {'key': 'properties.logoutEndpoint', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, logout_endpoint: str=None, **kwargs) -> None: + super(LoginRoutes, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, scopes=None, **kwargs) -> None: + super(LoginScopes, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.scopes = scopes + + +class LogSpecification(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: str=None, display_name: str=None, blob_duration: str=None, log_filter_pattern: str=None, **kwargs) -> None: + 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(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_09_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_09_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = user_assigned_identities + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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) -> None: + super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricSpecification(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_09_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: + list[~azure.mgmt.web.v2020_09_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: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. The type of migration operation to be + done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or + ~azure.mgmt.web.v2020_09_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'migration_type': {'key': 'properties.migrationType', 'type': 'MySqlMigrationType'}, + } + + def __init__(self, *, connection_string: str, migration_type, kind: str=None, system_data=None, **kwargs) -> None: + super(MigrateMySqlRequest, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'migration_operation_status': {'key': 'properties.migrationOperationStatus', 'type': 'OperationStatus'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(MigrateMySqlStatus, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: + super(MSDeploy, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar entries: List of log entry messages + :vartype entries: + list[~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'entries': {'key': 'properties.entries', 'type': '[MSDeployLogEntry]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(MSDeployLog, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.entries = None + + +class MSDeployLogEntry(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 + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or + ~azure.mgmt.web.v2020_09_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': 'MSDeployLogEntryType'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'deployer': {'key': 'properties.deployer', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'MSDeployProvisioningState'}, + '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: str=None, system_data=None, **kwargs) -> None: + super(MSDeployStatus, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.deployer = None + self.provisioning_state = None + self.start_time = None + self.end_time = None + self.complete = None + + +class NameIdentifier(Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class NetworkAccessControlEntry(Model): + """Network access control entry. + + :param action: Action object. Possible values include: 'Permit', 'Deny' + :type action: str or + ~azure.mgmt.web.v2020_09_01.models.AccessControlEntryAction + :param description: Description of network access control entry. + :type description: str + :param order: Order of precedence. + :type order: int + :param remote_subnet: Remote subnet. + :type remote_subnet: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, + 'description': {'key': 'description', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, + } + + def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: + super(NetworkAccessControlEntry, self).__init__(**kwargs) + self.action = action + self.description = description + self.order = order + self.remote_subnet = remote_subnet + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, **kwargs) -> None: + super(NetworkFeatures, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.virtual_network_name = None + self.virtual_network_connection = None + self.hybrid_connections = None + self.hybrid_connections_v2 = None + + +class NetworkTrace(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: str=None, status: str=None, message: str=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'validate_nonce': {'key': 'properties.validateNonce', 'type': 'bool'}, + 'nonce_expiration_interval': {'key': 'properties.nonceExpirationInterval', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, validate_nonce: bool=None, nonce_expiration_interval: str=None, **kwargs) -> None: + super(Nonce, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param method: Possible values include: 'ClientSecretPost' + :type method: str or + ~azure.mgmt.web.v2020_09_01.models.ClientCredentialMethod + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, method=None, client_secret_setting_name: str=None, **kwargs) -> None: + super(OpenIdConnectClientCredential, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.method = method + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, authorization_endpoint: str=None, token_endpoint: str=None, issuer: str=None, certification_uri: str=None, well_known_open_id_configuration: str=None, **kwargs) -> None: + super(OpenIdConnectConfig, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'name_claim_type': {'key': 'properties.nameClaimType', 'type': 'str'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, name_claim_type: str=None, scopes=None, **kwargs) -> None: + super(OpenIdConnectLogin, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param client_id: + :type client_id: str + :param client_credential: + :type client_credential: + ~azure.mgmt.web.v2020_09_01.models.OpenIdConnectClientCredential + :param open_id_connect_configuration: + :type open_id_connect_configuration: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, client_id: str=None, client_credential=None, open_id_connect_configuration=None, **kwargs) -> None: + super(OpenIdConnectRegistration, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.client_id = client_id + self.client_credential = client_credential + self.open_id_connect_configuration = open_id_connect_configuration + + +class Operation(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_09_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2020_09_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: datetime + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: + 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(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_09_01.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class PerfMonResponse(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_09_01.models.PerfMonSet + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'PerfMonSet'}, + } + + def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: + super(PerfMonResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.data = data + + +class PerfMonSample(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: + super(PerfMonSample, self).__init__(**kwargs) + self.time = time + self.instance_name = instance_name + self.value = value + + +class PerfMonSet(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 + :param end_time: End time of the period. + :type end_time: 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_09_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, tags=None, system_data=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + super(PremierAddOn, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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: true if promotion code is + required; otherwise, 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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'AppServicePlanRestrictions'}, + '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: str=None, system_data=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + super(PremierAddOnOffer, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + super(PremierAddOnPatchResource, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[PrivateAccessVirtualNetwork]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: + super(PrivateAccess, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.enabled = enabled + self.virtual_networks = virtual_networks + + +class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = name + self.key = key + + +class PrivateAccessVirtualNetwork(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_09_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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = name + self.key = key + self.resource_id = resource_id + self.subnets = subnets + + +class PrivateEndpointConnectionResource(ProxyOnlyResource): + """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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar provisioning_state: + :vartype provisioning_state: str + :param private_endpoint: PrivateEndpoint of a remote private endpoint + connection + :type private_endpoint: ~azure.mgmt.web.v2020_09_01.models.ArmIdWrapper + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_09_01.models.PrivateLinkConnectionState + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'ArmIdWrapper'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, + } + + def __init__(self, *, kind: str=None, system_data=None, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnectionResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.provisioning_state = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, + } + + def __init__(self, *, kind: str=None, system_data=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkConnectionState(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: str=None, description: str=None, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkResource(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_09_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, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.properties = properties + + +class PrivateLinkResourceProperties(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) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkResourcesWrapper(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_09_01.models.PrivateLinkResource] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_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 + :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 + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: + super(ProcessInfo, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: + super(ProcessModuleInfo, self).__init__(kind=kind, system_data=system_data, **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 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: + super(ProcessThreadInfo, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'blob': {'key': 'properties.blob', 'type': 'bytearray'}, + 'public_certificate_location': {'key': 'properties.publicCertificateLocation', 'type': 'PublicCertificateLocation'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: + super(PublicCertificate, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.blob = blob + self.public_certificate_location = public_certificate_location + self.thumbprint = None + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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, *, is_push_enabled: bool, kind: str=None, system_data=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + super(PushSettings, self).__init__(kind=kind, system_data=system_data, **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 RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + \\nMinReroutePercentage or + MaxReroutePercentage. Site metrics are checked every N + minutes specified in ChangeIntervalInMinutes.\\nCustom + decision algorithm + can be provided in TiPCallback site extension which URL can be specified + in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param creation_time: Timestamp when this instance was created. + :type creation_time: 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_09_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_09_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_09_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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, system_data=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + super(Recommendation, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, system_data=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + super(RecommendationRule, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + super(ReissueCertificateOrderRequest, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: + super(RelayServiceConnectionEntity, self).__init__(kind=kind, system_data=system_data, **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 Rendering(Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.v2020_09_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': 'RenderingType'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + super(RenewCertificateOrderRequest, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.key_size = key_size + self.csr = csr + self.is_private_key_external = is_private_key_external + + +class RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, system_data=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: + super(ResourceHealthMetadata, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.category = category + self.signal_availability = signal_availability + + +class ResourceMetricAvailability(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) -> None: + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, **kwargs) -> None: + super(ResourceMetricDefinition, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.properties = None + + +class ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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_09_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: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(ResourceNameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class ResourceNameAvailabilityRequest(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_09_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, is_fqdn: bool=None, **kwargs) -> None: + super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.is_fqdn = is_fqdn + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.v2020_09_01.models.DataSource + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, + } + + def __init__(self, *, data_source=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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_09_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an + app with custom domains. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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_09_01.models.BackupRestoreOperationType + :param adjust_connection_strings: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'BackupRestoreOperationType'}, + 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + } + + def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, system_data=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: + super(RestoreRequest, self).__init__(kind=kind, system_data=system_data, **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 ServiceSpecification(Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: + list[~azure.mgmt.web.v2020_09_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: + list[~azure.mgmt.web.v2020_09_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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_09_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_09_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_09_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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_09_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2020_09_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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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_09_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: true if the app is a default + container; otherwise, 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_09_01.models.SlotSwapStatus + :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_09_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 identity: + :type identity: ~azure.mgmt.web.v2020_09_01.models.ManagedServiceIdentity + """ + + _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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **kwargs) + 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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.identity = identity + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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 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_09_01.models.UnauthenticatedClientAction + :param token_store_enabled: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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_09_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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested + as part of GitHub Login authentication. + This setting is optional + :type git_hub_oauth_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_oauth_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_oauth_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_oauth_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_oauth_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_oauth_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_oauth_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: str=None, system_data=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, aad_claims_authorization: str=None, google_client_id: str=None, google_client_secret: str=None, google_client_secret_setting_name: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_app_secret_setting_name: str=None, facebook_oauth_scopes=None, git_hub_client_id: str=None, git_hub_client_secret: str=None, git_hub_client_secret_setting_name: str=None, git_hub_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, twitter_consumer_secret_setting_name: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_client_secret_setting_name: str=None, microsoft_account_oauth_scopes=None, is_auth_from_file: str=None, auth_file_path: str=None, **kwargs) -> None: + super(SiteAuthSettings, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_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_oauth_scopes = google_oauth_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_oauth_scopes = facebook_oauth_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_oauth_scopes = git_hub_oauth_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_oauth_scopes = microsoft_account_oauth_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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param platform: + :type platform: ~azure.mgmt.web.v2020_09_01.models.AuthPlatform + :param global_validation: + :type global_validation: + ~azure.mgmt.web.v2020_09_01.models.GlobalValidation + :param identity_providers: + :type identity_providers: + ~azure.mgmt.web.v2020_09_01.models.IdentityProviders + :param login: + :type login: ~azure.mgmt.web.v2020_09_01.models.Login + :param http_settings: + :type http_settings: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, platform=None, global_validation=None, identity_providers=None, login=None, http_settings=None, **kwargs) -> None: + super(SiteAuthSettingsV2, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.platform = platform + self.global_validation = global_validation + self.identity_providers = identity_providers + self.login = login + self.http_settings = http_settings + + +class SiteCloneability(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_09_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent + cloning. + :type blocking_features: + list[~azure.mgmt.web.v2020_09_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_09_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application + characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2020_09_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, + 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, + } + + def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: + 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(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: str=None, description: str=None, **kwargs) -> None: + super(SiteCloneabilityCriterion, self).__init__(**kwargs) + self.name = name + self.description = description + + +class SiteConfig(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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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_09_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2020_09_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_09_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2020_09_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_09_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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_09_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2020_09_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2020_09_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_09_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_09_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_09_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_09_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_09_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2020_09_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2020_09_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2020_09_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_09_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. Default value: True . + :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_09_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_09_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_09_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 health_check_path: Health check path + :type health_check_path: str + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, + } + + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: + 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.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.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.health_check_path = health_check_path + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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_09_01.models.NameValuePair] + :param connection_strings: Connection strings. + :type connection_strings: + list[~azure.mgmt.web.v2020_09_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_09_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: + list[~azure.mgmt.web.v2020_09_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_09_01.models.ScmType + :param use32_bit_worker_process: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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_09_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: + list[~azure.mgmt.web.v2020_09_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: + 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + 'WeightedTotalTraffic', 'RequestHash' + :type load_balancing: str or + ~azure.mgmt.web.v2020_09_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_09_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_09_01.models.SiteLimits + :param auto_heal_enabled: true if Auto Heal is enabled; + otherwise, false. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_09_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_09_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_09_01.models.PushSettings + :param api_definition: Information about the formal API definition for the + app. + :type api_definition: ~azure.mgmt.web.v2020_09_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the + app. + :type api_management_config: + ~azure.mgmt.web.v2020_09_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: true to enable local MySQL; + otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: + list[~azure.mgmt.web.v2020_09_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_09_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. Default value: True . + :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_09_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_09_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_09_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 health_check_path: Health check path + :type health_check_path: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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]'}, + '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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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'}, + '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'}, + 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: + super(SiteConfigResource, self).__init__(kind=kind, system_data=system_data, **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.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.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.health_check_path = health_check_path + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar time: The time the snapshot was taken. + :vartype time: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'int'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.time = None + self.snapshot_id = 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'extension_id': {'key': 'properties.extension_id', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'extension_type': {'key': 'properties.extension_type', 'type': 'SiteExtensionType'}, + '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: str=None, system_data=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: + super(SiteExtensionInfo, self).__init__(kind=kind, system_data=system_data, **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 SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param application_logs: Application logs configuration. + :type application_logs: + ~azure.mgmt.web.v2020_09_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2020_09_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: + ~azure.mgmt.web.v2020_09_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: + super(SiteLogsConfig, self).__init__(kind=kind, system_data=system_data, **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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.UsageState + :param enabled: true if the app is enabled; otherwise, + 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_09_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_09_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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_09_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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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_09_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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' + :type client_cert_mode: str or + ~azure.mgmt.web.v2020_09_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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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_09_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: true if the app is a default + container; otherwise, 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_09_01.models.SlotSwapStatus + :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_09_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 identity: + :type identity: ~azure.mgmt.web.v2020_09_01.models.ManagedServiceIdentity + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: + super(SitePatchResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + 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.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.identity = identity + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: + super(SitePhpErrorLogFlag, self).__init__(kind=kind, system_data=system_data, **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(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) -> None: + super(SiteSeal, self).__init__(**kwargs) + self.html = html + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param is_git_hub_action: true if this is deployed via GitHub + action. + :type is_git_hub_action: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + false for a Git repository. + :type is_mercurial: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + } + + def __init__(self, *, kind: str=None, system_data=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, is_git_hub_action: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: + super(SiteSourceControl, self).__init__(kind=kind, system_data=system_data, **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 + + +class SkuCapacity(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 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'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(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_09_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_09_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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(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_09_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2020_09_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: str=None, sku=None, capacity=None, **kwargs) -> None: + super(SkuInfo, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity + + +class SkuInfos(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_09_01.models.GlobalCsmSkuDescription] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, + } + + def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: + super(SlotConfigNamesResource, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, **kwargs) -> None: + super(SlotDifference, self).__init__(kind=kind, system_data=system_data, **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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'time': {'key': 'properties.time', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(Snapshot, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.time = None + + +class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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, *, overwrite: bool, kind: str=None, system_data=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: + super(SnapshotRestoreRequest, self).__init__(kind=kind, system_data=system_data, **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(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_09_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: + list[list[~azure.mgmt.web.v2020_09_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': 'SolutionType'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: + 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: + super(SourceControl, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.token = token + self.token_secret = token_secret + self.refresh_token = refresh_token + self.expiration_time = expiration_time + + +class StackMajorVersion(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: true if this is the default major version; + otherwise, false. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: + list[~azure.mgmt.web.v2020_09_01.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool + :param is_preview: true if this stack is in Preview, + otherwise false. + :type is_preview: bool + :param is_deprecated: true if this stack has been deprecated, + otherwise false. + :type is_deprecated: bool + :param is_hidden: true if this stack should be hidden for new + customers on portal, otherwise 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'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + } + + def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, is_preview: bool=None, is_deprecated: bool=None, is_hidden: bool=None, **kwargs) -> None: + 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.is_preview = is_preview + self.is_deprecated = is_deprecated + self.is_hidden = is_hidden + + +class StackMinorVersion(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: + 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(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_09_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' + :type worker_size: str or + ~azure.mgmt.web.v2020_09_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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: + 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 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: Resource tags. + :type tags: dict[str, str] + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 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_09_01.models.StaticSiteBuildProperties + :param sku: + :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, sku=None, **kwargs) -> None: + super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **kwargs) + self.default_hostname = None + self.repository_url = repository_url + self.branch = branch + self.custom_domains = None + self.repository_token = repository_token + self.build_properties = build_properties + self.sku = sku + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: 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_09_01.models.BuildStatus + """ + + _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}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(StaticSiteBuildARMResource, self).__init__(kind=kind, system_data=system_data, **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 + + +class StaticSiteBuildProperties(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: The path of the app artifacts after + building. + :type app_artifact_location: str + """ + + _attribute_map = { + 'app_location': {'key': 'appLocation', 'type': 'str'}, + 'api_location': {'key': 'apiLocation', 'type': 'str'}, + 'app_artifact_location': {'key': 'appArtifactLocation', 'type': 'str'}, + } + + def __init__(self, *, app_location: str=None, api_location: str=None, app_artifact_location: str=None, **kwargs) -> None: + super(StaticSiteBuildProperties, self).__init__(**kwargs) + self.app_location = app_location + self.api_location = api_location + self.app_artifact_location = app_artifact_location + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_name': {'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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(StaticSiteCustomDomainOverviewARMResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.domain_name = None + self.created_on = None + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'function_name': {'key': 'properties.functionName', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.function_name = None + self.trigger_type = 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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 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_09_01.models.StaticSiteBuildProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'custom_domains': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + def __init__(self, *, kind: str=None, system_data=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, **kwargs) -> None: + super(StaticSitePatchResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.default_hostname = None + self.repository_url = repository_url + self.branch = branch + self.custom_domains = None + self.repository_token = repository_token + self.build_properties = build_properties + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'should_update_repository': {'key': 'properties.shouldUpdateRepository', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, system_data=None, repository_token: str=None, should_update_repository: bool=None, **kwargs) -> None: + super(StaticSiteResetPropertiesARMResource, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(StaticSitesWorkflowPreview, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + def __init__(self, *, kind: str=None, system_data=None, repository_url: str=None, branch: str=None, build_properties=None, **kwargs) -> None: + super(StaticSitesWorkflowPreviewRequest, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.repository_url = repository_url + self.branch = branch + self.build_properties = build_properties + + +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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, roles: str=None, **kwargs) -> None: + super(StaticSiteUserARMResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.provider = None + self.user_id = None + self.display_name = None + self.roles = roles + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, domain: str=None, provider: str=None, user_details: str=None, roles: str=None, num_hours_to_expiration: int=None, **kwargs) -> None: + super(StaticSiteUserInvitationRequestResource, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :ivar expires_on: The expiration time of the invitation + :vartype expires_on: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'expires_on': {'key': 'properties.expiresOn', 'type': 'iso-8601'}, + 'invitation_url': {'key': 'properties.invitationUrl', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(StaticSiteUserInvitationResponseResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.expires_on = None + self.invitation_url = None + + +class StatusCodesBasedTrigger(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 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'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, system_data=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: + super(StorageMigrationOptions, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(StorageMigrationResponse, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, *, kind: str=None, system_data=None, properties=None, **kwargs) -> None: + super(StringDictionary, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.properties = properties + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'subnet_resource_id': {'key': 'properties.subnetResourceId', 'type': 'str'}, + 'swift_supported': {'key': 'properties.swiftSupported', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, system_data=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: + super(SwiftVirtualNetwork, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.subnet_resource_id = subnet_resource_id + self.swift_supported = swift_supported + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.web.v2020_09_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.web.v2020_09_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TldLegalAgreement(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: str=None, **kwargs) -> None: + super(TldLegalAgreement, self).__init__(**kwargs) + self.agreement_key = agreement_key + self.title = title + self.content = content + self.url = url + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.FileSystemTokenStore + :param azure_blob_storage: + :type azure_blob_storage: + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, enabled: bool=None, token_refresh_extension_hours: float=None, file_system=None, azure_blob_storage=None, **kwargs) -> None: + super(TokenStore, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param privacy: If true, then the top level domain supports + domain privacy; otherwise, 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, system_data=None, privacy: bool=None, **kwargs) -> None: + super(TopLevelDomain, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.privacy = privacy + + +class TopLevelDomainAgreementOption(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + """ + + _attribute_map = { + 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, + 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, + } + + def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: + super(TopLevelDomainAgreementOption, self).__init__(**kwargs) + self.include_privacy = include_privacy + self.for_transfer = for_transfer + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param runs: List of triggered web job runs. + :type runs: list[~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'runs': {'key': 'properties.runs', 'type': '[TriggeredJobRun]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, runs=None, **kwargs) -> None: + super(TriggeredJobHistory, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.runs = runs + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: datetime + :param end_time: End time. + :type end_time: 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'TriggeredWebJobStatus'}, + '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: str=None, system_data=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: + super(TriggeredJobRun, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param latest_run: Latest job run information. + :type latest_run: ~azure.mgmt.web.v2020_09_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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, system_data=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + super(TriggeredWebJob, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'TwitterRegistration'}, + } + + def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, registration=None, **kwargs) -> None: + super(Twitter, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'consumer_key': {'key': 'properties.consumerKey', 'type': 'str'}, + 'consumer_secret_setting_name': {'key': 'properties.consumerSecretSettingName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, consumer_key: str=None, consumer_secret_setting_name: str=None, **kwargs) -> None: + super(TwitterRegistration, self).__init__(kind=kind, system_data=system_data, **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 + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + :ivar compute_mode: Compute mode used for this usage. Possible values + include: 'Shared', 'Dedicated', 'Dynamic' + :vartype compute_mode: str or + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'ComputeModeOptions'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: + super(Usage, self).__init__(kind=kind, system_data=system_data, **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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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, *, publishing_user_name: str, kind: str=None, system_data=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: + super(User, self).__init__(kind=kind, system_data=system_data, **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(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' + :type type: str or + ~azure.mgmt.web.v2020_09_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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: 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 + """ + + _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'}, + } + + def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, container_registry_base_url: str=None, container_registry_username: str=None, container_registry_password: str=None, container_image_repository: str=None, container_image_tag: str=None, container_image_platform: str=None, **kwargs) -> None: + 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 + + +class ValidateResponse(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_09_01.models.ValidateResponseError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ValidateResponseError'}, + } + + def __init__(self, *, status: str=None, error=None, **kwargs) -> None: + super(ValidateResponse, self).__init__(**kwargs) + self.status = status + self.error = error + + +class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: + super(ValidateResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, false. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: + list[~azure.mgmt.web.v2020_09_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +class VirtualIPMapping(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: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, service_name: str=None, **kwargs) -> None: + 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(Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: 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 = { + '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=None, subnet: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vpn_package_uri': {'key': 'properties.vpnPackageUri', 'type': 'str'}, + } + + def __init__(self, *, vpn_package_uri: str, kind: str=None, system_data=None, vnet_name: str=None, **kwargs) -> None: + super(VnetGateway, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_01.models.VnetRoute] + :ivar resync_required: true if a resync is required; + otherwise, 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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: + super(VnetInfo, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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 + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'vnet_resource_group': {'key': 'properties.vnetResourceGroup', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: + super(VnetParameters, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.vnet_resource_group = vnet_resource_group + self.vnet_name = vnet_name + self.vnet_subnet_name = vnet_subnet_name + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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: str=None, system_data=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + super(VnetRoute, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, *, kind: str=None, system_data=None, failed: bool=None, failed_tests=None, **kwargs) -> None: + super(VnetValidationFailureDetails, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.failed = failed + self.failed_tests = failed_tests + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'test_name': {'key': 'properties.testName', 'type': 'str'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, system_data=None, test_name: str=None, details: str=None, **kwargs) -> None: + super(VnetValidationTestFailure, self).__init__(kind=kind, system_data=system_data, **kwargs) + self.test_name = test_name + self.details = details + + +class WebAppCollection(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_09_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, **kwargs) -> None: + super(WebAppCollection, 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, system_data=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + super(WebJob, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :param state: Possible values include: 'READY', 'STOPPED', 'UNKNOWN' + :type state: str or ~azure.mgmt.web.v2020_09_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: + :type containers: dict[str, + ~azure.mgmt.web.v2020_09_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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'state': {'key': 'properties.state', 'type': 'SiteRuntimeState'}, + '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: str=None, system_data=None, state=None, status_url: str=None, detector_url: str=None, console_url: str=None, health_check_url: str=None, containers=None, **kwargs) -> None: + super(WebSiteInstanceStatus, self).__init__(kind=kind, system_data=system_data, **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 WorkerPool(Model): + """Worker pool of an App Service Environment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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_09_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 = { + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, + } + + def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: + super(WorkerPool, self).__init__(**kwargs) + 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 + + +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 system_data: The system metadata relating to this resource. + :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData + :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_09_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] + :param sku: + :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription + """ + + _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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, kind: str=None, system_data=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: + super(WorkerPoolResource, self).__init__(kind=kind, system_data=system_data, **kwargs) + 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 + self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_paged_models.py new file mode 100644 index 00000000000..0f21c8de9f2 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_paged_models.py @@ -0,0 +1,781 @@ +# 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 msrest.paging import Paged + + +class AppServiceCertificateOrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) +class AppServiceCertificateResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) +class CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) +class DomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`Domain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Domain]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainPaged, self).__init__(*args, **kwargs) +class NameIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`NameIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(NameIdentifierPaged, self).__init__(*args, **kwargs) +class DomainOwnershipIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) +class TopLevelDomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`TopLevelDomain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} + } + + def __init__(self, *args, **kwargs): + + super(TopLevelDomainPaged, self).__init__(*args, **kwargs) +class TldLegalAgreementPaged(Paged): + """ + A paging container for iterating over a list of :class:`TldLegalAgreement ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} + } + + def __init__(self, *args, **kwargs): + + super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) +class CertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`Certificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Certificate]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificatePaged, self).__init__(*args, **kwargs) +class DeletedSitePaged(Paged): + """ + A paging container for iterating over a list of :class:`DeletedSite ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeletedSite]'} + } + + def __init__(self, *args, **kwargs): + + super(DeletedSitePaged, self).__init__(*args, **kwargs) +class DetectorResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorResponsePaged, self).__init__(*args, **kwargs) +class DiagnosticCategoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiagnosticCategory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} + } + + def __init__(self, *args, **kwargs): + + super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) +class AnalysisDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AnalysisDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) +class DetectorDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) +class ApplicationStackResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationStackResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationStackResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationStackResourcePaged, self).__init__(*args, **kwargs) +class RecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Recommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Recommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendationPaged, self).__init__(*args, **kwargs) +class SourceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlPaged, self).__init__(*args, **kwargs) +class BillingMeterPaged(Paged): + """ + A paging container for iterating over a list of :class:`BillingMeter ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BillingMeter]'} + } + + def __init__(self, *args, **kwargs): + + super(BillingMeterPaged, self).__init__(*args, **kwargs) +class GeoRegionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoRegion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoRegion]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoRegionPaged, self).__init__(*args, **kwargs) +class IdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`Identifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Identifier]'} + } + + def __init__(self, *args, **kwargs): + + super(IdentifierPaged, self).__init__(*args, **kwargs) +class PremierAddOnOfferPaged(Paged): + """ + A paging container for iterating over a list of :class:`PremierAddOnOffer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} + } + + def __init__(self, *args, **kwargs): + + super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) +class SitePaged(Paged): + """ + A paging container for iterating over a list of :class:`Site ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Site]'} + } + + def __init__(self, *args, **kwargs): + + super(SitePaged, self).__init__(*args, **kwargs) +class BackupItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupItem]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupItemPaged, self).__init__(*args, **kwargs) +class SiteConfigResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) +class SiteConfigurationSnapshotInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) +class ContinuousWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContinuousWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) +class DeploymentPaged(Paged): + """ + A paging container for iterating over a list of :class:`Deployment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Deployment]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentPaged, self).__init__(*args, **kwargs) +class FunctionEnvelopePaged(Paged): + """ + A paging container for iterating over a list of :class:`FunctionEnvelope ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} + } + + def __init__(self, *args, **kwargs): + + super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) +class HostNameBindingPaged(Paged): + """ + A paging container for iterating over a list of :class:`HostNameBinding ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} + } + + def __init__(self, *args, **kwargs): + + super(HostNameBindingPaged, self).__init__(*args, **kwargs) +class WebSiteInstanceStatusPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebSiteInstanceStatus ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebSiteInstanceStatus]'} + } + + def __init__(self, *args, **kwargs): + + super(WebSiteInstanceStatusPaged, self).__init__(*args, **kwargs) +class ProcessInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessInfoPaged, self).__init__(*args, **kwargs) +class ProcessModuleInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessModuleInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) +class ProcessThreadInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessThreadInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) +class PerfMonResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`PerfMonResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(PerfMonResponsePaged, self).__init__(*args, **kwargs) +class PublicCertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`PublicCertificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} + } + + def __init__(self, *args, **kwargs): + + super(PublicCertificatePaged, self).__init__(*args, **kwargs) +class SiteExtensionInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteExtensionInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) +class SlotDifferencePaged(Paged): + """ + A paging container for iterating over a list of :class:`SlotDifference ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SlotDifference]'} + } + + def __init__(self, *args, **kwargs): + + super(SlotDifferencePaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) +class TriggeredWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) +class TriggeredJobHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredJobHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) +class CsmUsageQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmUsageQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) +class WebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(WebJobPaged, self).__init__(*args, **kwargs) +class StaticSiteARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteUserARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteUserARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteUserARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteUserARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteBuildARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteBuildARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteBuildARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteFunctionOverviewARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteFunctionOverviewARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteFunctionOverviewARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteCustomDomainOverviewARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteCustomDomainOverviewARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteCustomDomainOverviewARMResourcePaged, self).__init__(*args, **kwargs) +class AppServiceEnvironmentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) +class StampCapacityPaged(Paged): + """ + A paging container for iterating over a list of :class:`StampCapacity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StampCapacity]'} + } + + def __init__(self, *args, **kwargs): + + super(StampCapacityPaged, self).__init__(*args, **kwargs) +class InboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class WorkerPoolResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkerPoolResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) +class ResourceMetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) +class SkuInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInfoPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class OutboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class AppServicePlanPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServicePlan ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServicePlanPaged, self).__init__(*args, **kwargs) +class StrPaged(Paged): + """ + A paging container for iterating over a list of str object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[str]'} + } + + def __init__(self, *args, **kwargs): + + super(StrPaged, self).__init__(*args, **kwargs) +class HybridConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`HybridConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HybridConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(HybridConnectionPaged, self).__init__(*args, **kwargs) +class ResourceHealthMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..5a9b3d14b04 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_web_site_management_client_enums.py @@ -0,0 +1,628 @@ +# 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 + + +class KeyVaultSecretStatus(str, Enum): + + 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 CertificateProductType(str, Enum): + + standard_domain_validated_ssl = "StandardDomainValidatedSsl" + standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class CertificateOrderStatus(str, Enum): + + pendingissuance = "Pendingissuance" + issued = "Issued" + revoked = "Revoked" + canceled = "Canceled" + denied = "Denied" + pendingrevocation = "Pendingrevocation" + pending_rekey = "PendingRekey" + unused = "Unused" + expired = "Expired" + not_submitted = "NotSubmitted" + + +class CertificateOrderActionType(str, Enum): + + 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 CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" + + +class IpFilterTag(str, Enum): + + default = "Default" + xff_proxy = "XffProxy" + service_tag = "ServiceTag" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 ScmType(str, Enum): + + 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 ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class FtpsState(str, Enum): + + all_allowed = "AllAllowed" + ftps_only = "FtpsOnly" + disabled = "Disabled" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class ClientCertMode(str, Enum): + + required = "Required" + optional = "Optional" + + +class RedundancyMode(str, Enum): + + none = "None" + manual = "Manual" + failover = "Failover" + active_active = "ActiveActive" + geo_redundant = "GeoRedundant" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class DomainStatus(str, Enum): + + 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 AzureResourceType(str, Enum): + + website = "Website" + traffic_manager = "TrafficManager" + + +class CustomHostNameDnsRecordType(str, Enum): + + cname = "CName" + a = "A" + + +class HostNameType(str, Enum): + + verified = "Verified" + managed = "Managed" + + +class DnsType(str, Enum): + + azure_dns = "AzureDns" + default_domain_registrar_dns = "DefaultDomainRegistrarDns" + + +class DomainType(str, Enum): + + regular = "Regular" + soft_deleted = "SoftDeleted" + + +class HostingEnvironmentStatus(str, Enum): + + preparing = "Preparing" + ready = "Ready" + scaling = "Scaling" + deleting = "Deleting" + + +class LoadBalancingMode(str, Enum): + + none = "None" + web = "Web" + publishing = "Publishing" + web_publishing = "Web,Publishing" + + +class ComputeModeOptions(str, Enum): + + shared = "Shared" + dedicated = "Dedicated" + dynamic = "Dynamic" + + +class WorkerSizeOptions(str, Enum): + + small = "Small" + medium = "Medium" + large = "Large" + d1 = "D1" + d2 = "D2" + d3 = "D3" + nested_small = "NestedSmall" + default = "Default" + + +class AccessControlEntryAction(str, Enum): + + permit = "Permit" + deny = "Deny" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" + + +class IssueType(str, Enum): + + 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 SolutionType(str, Enum): + + quick_solution = "QuickSolution" + deep_investigation = "DeepInvestigation" + best_practices = "BestPractices" + + +class RenderingType(str, Enum): + + no_graph = "NoGraph" + table = "Table" + time_series = "TimeSeries" + time_series_per_instance = "TimeSeriesPerInstance" + + +class ResourceScopeType(str, Enum): + + server_farm = "ServerFarm" + subscription = "Subscription" + web_site = "WebSite" + + +class NotificationLevel(str, Enum): + + critical = "Critical" + warning = "Warning" + information = "Information" + non_urgent_suggestion = "NonUrgentSuggestion" + + +class Channels(str, Enum): + + notification = "Notification" + api = "Api" + email = "Email" + webhook = "Webhook" + all = "All" + + +class AppServicePlanRestrictions(str, Enum): + + none = "None" + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class InAvailabilityReasonType(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class CheckNameResourceTypes(str, Enum): + + site = "Site" + slot = "Slot" + hosting_environment = "HostingEnvironment" + publishing_user = "PublishingUser" + microsoft_websites = "Microsoft.Web/sites" + microsoft_websitesslots = "Microsoft.Web/sites/slots" + microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" + microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" + + +class ValidateResourceTypes(str, Enum): + + server_farm = "ServerFarm" + site = "Site" + + +class LogLevel(str, Enum): + + off = "Off" + verbose = "Verbose" + information = "Information" + warning = "Warning" + error = "Error" + + +class AzureStorageType(str, Enum): + + azure_files = "AzureFiles" + azure_blob = "AzureBlob" + + +class AzureStorageState(str, Enum): + + ok = "Ok" + invalid_credentials = "InvalidCredentials" + invalid_share = "InvalidShare" + + +class BackupItemStatus(str, Enum): + + 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 DatabaseType(str, Enum): + + sql_azure = "SqlAzure" + my_sql = "MySql" + local_my_sql = "LocalMySql" + postgre_sql = "PostgreSql" + + +class FrequencyUnit(str, Enum): + + day = "Day" + hour = "Hour" + + +class ContinuousWebJobStatus(str, Enum): + + initializing = "Initializing" + starting = "Starting" + running = "Running" + pending_restart = "PendingRestart" + stopped = "Stopped" + + +class WebJobType(str, Enum): + + continuous = "Continuous" + triggered = "Triggered" + + +class CookieExpirationConvention(str, Enum): + + fixed_time = "FixedTime" + identity_provider_derived = "IdentityProviderDerived" + + +class PublishingProfileFormat(str, Enum): + + file_zilla3 = "FileZilla3" + web_deploy = "WebDeploy" + ftp = "Ftp" + + +class DnsVerificationTestResult(str, Enum): + + passed = "Passed" + failed = "Failed" + skipped = "Skipped" + + +class ClientCredentialMethod(str, Enum): + + client_secret_post = "ClientSecretPost" + + +class ForwardProxyConvention(str, Enum): + + no_proxy = "NoProxy" + standard = "Standard" + custom = "Custom" + + +class UnauthenticatedClientActionV2(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + return401 = "Return401" + return403 = "Return403" + + +class MSDeployLogEntryType(str, Enum): + + message = "Message" + warning = "Warning" + error = "Error" + + +class MSDeployProvisioningState(str, Enum): + + accepted = "accepted" + running = "running" + succeeded = "succeeded" + failed = "failed" + canceled = "canceled" + + +class MySqlMigrationType(str, Enum): + + local_to_remote = "LocalToRemote" + remote_to_local = "RemoteToLocal" + + +class PublicCertificateLocation(str, Enum): + + current_user_my = "CurrentUserMy" + local_machine_my = "LocalMachineMy" + unknown = "Unknown" + + +class BackupRestoreOperationType(str, Enum): + + default = "Default" + clone = "Clone" + relocation = "Relocation" + snapshot = "Snapshot" + cloud_fs = "CloudFS" + + +class UnauthenticatedClientAction(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + + +class BuiltInAuthenticationProvider(str, Enum): + + azure_active_directory = "AzureActiveDirectory" + facebook = "Facebook" + google = "Google" + microsoft_account = "MicrosoftAccount" + twitter = "Twitter" + github = "Github" + + +class CloneAbilityResult(str, Enum): + + cloneable = "Cloneable" + partially_cloneable = "PartiallyCloneable" + not_cloneable = "NotCloneable" + + +class SiteExtensionType(str, Enum): + + gallery = "Gallery" + web_root = "WebRoot" + + +class TriggeredWebJobStatus(str, Enum): + + success = "Success" + failed = "Failed" + error = "Error" + + +class SiteRuntimeState(str, Enum): + + ready = "READY" + stopped = "STOPPED" + unknown = "UNKNOWN" + + +class BuildStatus(str, Enum): + + waiting_for_deployment = "WaitingForDeployment" + uploading = "Uploading" + deploying = "Deploying" + ready = "Ready" + failed = "Failed" + deleting = "Deleting" + detached = "Detached" + + +class TriggerTypes(str, Enum): + + http_trigger = "HttpTrigger" + unknown = "Unknown" + + +class SkuName(str, Enum): + + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + dynamic = "Dynamic" + isolated = "Isolated" + premium_v2 = "PremiumV2" + elastic_premium = "ElasticPremium" + elastic_isolated = "ElasticIsolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/__init__.py new file mode 100644 index 00000000000..b6a3c15dcb7 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/__init__.py @@ -0,0 +1,46 @@ +# 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_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 ._provider_operations import ProviderOperations +from ._recommendations_operations import RecommendationsOperations +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 +from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin + +__all__ = [ + 'AppServiceCertificateOrdersOperations', + 'CertificateRegistrationProviderOperations', + 'DomainsOperations', + 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', + 'CertificatesOperations', + 'DeletedWebAppsOperations', + 'DiagnosticsOperations', + 'ProviderOperations', + 'RecommendationsOperations', + 'WebAppsOperations', + 'StaticSitesOperations', + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', + 'ResourceHealthMetadataOperations', + 'WebSiteManagementClientOperationsMixin', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_certificate_orders_operations.py new file mode 100644 index 00000000000..2bdf88cd01b --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_certificate_orders_operations.py @@ -0,0 +1,1423 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceCertificateOrdersOperations(object): + """AppServiceCertificateOrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all certificate orders in a subscription. + + Description for List all certificate orders in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def validate_purchase_information( + self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate_purchase_information.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def get( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + + def _create_or_update_initial( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateOrder or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def delete( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.AppServiceCertificateOrderPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def list_certificates( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_certificates.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} + + def get_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + + def _create_or_update_certificate_initial( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.AppServiceCertificateResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def delete_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.AppServiceCertificatePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def reissue( + self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.ReissueCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reissue.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} + + def renew( + self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.RenewCertificateOrderRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} + + def resend_email( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.resend_email.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} + + def resend_request_emails( + self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): + """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: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.resend_request_emails.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} + + def retrieve_site_seal( + self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): + """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 light_theme: If 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSeal or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSeal or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) + + # Construct URL + url = self.retrieve_site_seal.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSeal', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} + + def verify_domain_ownership( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_domain_ownership.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} + + def retrieve_certificate_actions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2020_09_01.models.CertificateOrderAction] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_actions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateOrderAction]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} + + def retrieve_certificate_email_history( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.CertificateEmail] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_email_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateEmail]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_environments_operations.py new file mode 100644 index 00000000000..d63c064be36 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_environments_operations.py @@ -0,0 +1,2858 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceEnvironmentsOperations(object): + """AppServiceEnvironmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all App Service Environments for a subscription. + + Description for Get all App Service Environments for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.AppServiceEnvironmentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceEnvironmentResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 true to force the deletion + even if the App Service Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.AppServiceEnvironmentPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def list_capacities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StampCapacity + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StampCapacityPaged[~azure.mgmt.web.v2020_09_01.models.StampCapacity] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_capacities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} + + def get_vip_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.AddressResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vip_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} + + + def _change_vnet_initial( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): + vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) + + # Construct URL + url = self.change_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def change_vnet( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 id: Resource id of the Virtual Network. + :type id: str + :param subnet: Subnet within the Virtual Network. + :type subnet: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._change_vnet_initial( + resource_group_name=resource_group_name, + name=name, + id=id, + subnet=subnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} + + def list_diagnostics( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2020_09_01.models.HostingEnvironmentDiagnostics] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_diagnostics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} + + def get_diagnostics_item( + self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostingEnvironmentDiagnostics or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.HostingEnvironmentDiagnostics or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostics_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} + + def get_inbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2020_09_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_09_01.models.InboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_inbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} + + def list_multi_role_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} + + def get_multi_role_pool( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + + def _create_or_update_multi_role_pool_initial( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def list_multi_role_pool_instance_metric_definitions( + self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} + + def list_multi_role_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} + + def list_multi_role_pool_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_09_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} + + def list_multi_role_usages( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2020_09_01.models.UsagePaged[~azure.mgmt.web.v2020_09_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} + + def list_operations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.Operation] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_operations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Operation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} + + def get_outbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OutboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2020_09_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_09_01.models.OutboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_outbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} + + def reboot( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reboot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} + + + def _resume_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.resume.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def resume( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} + + def list_app_service_plans( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_app_service_plans.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} + + def list_web_apps( + self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} + + + def _suspend_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.suspend.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def suspend( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} + + def list_worker_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} + + def get_worker_pool( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + + def _create_or_update_worker_pool_initial( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def list_worker_pool_instance_metric_definitions( + self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} + + def list_web_worker_metric_definitions( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} + + def list_worker_pool_skus( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_09_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} + + def list_web_worker_usages( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2020_09_01.models.UsagePaged[~azure.mgmt.web.v2020_09_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_plans_operations.py new file mode 100644 index 00000000000..9e0e1a485fc --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_plans_operations.py @@ -0,0 +1,1946 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServicePlansOperations(object): + """AppServicePlansOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, detailed=None, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans for a subscription. + + Description for Get all App Service plans for a subscription. + + :param detailed: Specify true to return all App Service + plan properties. The default is false, which returns a + subset of the properties. + Retrieval of all properties may increase the API latency. + :type detailed: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + if detailed is not None: + query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlan') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.AppServicePlan + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AppServicePlan or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.AppServicePlan]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.AppServicePlanPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def list_capabilities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.Capability] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_capabilities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Capability]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_web_apps_by_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of str + :rtype: ~azure.mgmt.web.v2020_09_01.models.StrPaged[str] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps_by_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} + + def get_hybrid_connection_plan_limit( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionLimits or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnectionLimits or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_plan_limit.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionLimits', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HybridConnection + :rtype: + ~azure.mgmt.web.v2020_09_01.models.HybridConnectionPaged[~azure.mgmt.web.v2020_09_01.models.HybridConnection] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} + + def restart_web_apps( + self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): + """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 true to perform a soft + restart, applies the configuration settings and restarts the apps if + necessary. The default is false, which always restarts + and reprovisions the apps + :type soft_restart: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} + + def list_web_apps( + self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} + + def get_server_farm_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_server_farm_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} + + def list_vnets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} + + def get_vnet_from_server_farm( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_from_server_farm.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_routes_for_vnet( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_routes_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} + + def get_route_for_vnet( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_route_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def create_or_update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def delete_vnet_route( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetRoute + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def reboot_worker( + self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reboot_worker.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificate_registration_provider_operations.py new file mode 100644 index 00000000000..1767331b6f6 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificate_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificateRegistrationProviderOperations(object): + """CertificateRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificates_operations.py similarity index 57% rename from src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py rename to src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificates_operations.py index 4738e61c62d..16d3e78cdd4 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_kube_environments_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificates_operations.py @@ -11,14 +11,12 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling from .. import models -class KubeEnvironmentsOperations(object): - """KubeEnvironmentsOperations operations. +class CertificatesOperations(object): + """CertificatesOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -26,7 +24,7 @@ class KubeEnvironmentsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". + :ivar api_version: API Version. Constant value: "2020-09-01". """ models = models @@ -36,31 +34,31 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2020-09-01" self.config = config - def list_by_subscription( + def list( self, custom_headers=None, raw=False, **operation_config): - """Get all Kubernetes Environments for a subscription. + """Get all certificates for a subscription. - Description for Get all Kubernetes Environments for a subscription. + Description for Get all certificates for a subscription. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of KubeEnvironment + :return: An iterator like instance of Certificate :rtype: - ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment] + ~azure.mgmt.web.v2020_09_01.models.CertificatePaged[~azure.mgmt.web.v2020_09_01.models.Certificate] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -102,17 +100,16 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.KubeEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all the Kubernetes Environments in a resource group. + """Get all certificates in a resource group. - Description for Get all the Kubernetes Environments 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. @@ -122,11 +119,11 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of KubeEnvironment + :return: An iterator like instance of Certificate :rtype: - ~azure.mgmt.web.v2019_08_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment] + ~azure.mgmt.web.v2020_09_01.models.CertificatePaged[~azure.mgmt.web.v2020_09_01.models.Certificate] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -174,32 +171,32 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.KubeEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} def get( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the properties of a Kubernetes Environment. + """Get a certificate. - Description for Get the properties of a Kubernetes Environment. + 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 Kubernetes Environment. + :param name: Name of the certificate. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: KubeEnvironment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment or + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Certificate or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -233,20 +230,43 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironment', response) + deserialized = self._deserialize('Certificate', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + def create_or_update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate. - def _create_initial( - self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, **operation_config): + 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_09_01.models.Certificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ # Construct URL - url = self.create.metadata['url'] + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -270,87 +290,47 @@ def _create_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') + body_content = self._serialize.body(certificate_envelope, 'Certificate') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200]: raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironment', response) - if response.status_code == 201: - deserialized = self._deserialize('KubeEnvironment', response) + deserialized = self._deserialize('Certificate', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - def create( - self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create a Kubernetes Environment. + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Delete a certificate. - Description for Create a Kubernetes Environment. + 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 Kubernetes Environment. + :param name: Name of the certificate. :type name: str - :param kube_environment_envelope: Configuration details of the - Kubernetes Environment. - :type kube_environment_envelope: - ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns KubeEnvironment or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.KubeEnvironment]] + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - name=name, - kube_environment_envelope=kube_environment_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('KubeEnvironment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} - - - def _delete_initial( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -362,8 +342,6 @@ def _delete_initial( # Construct parameters query_parameters = {} - if force_delete is not None: - query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -379,88 +357,39 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 204]: raise models.DefaultErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - - def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a Kubernetes Environment. - - Description for Delete a Kubernetes 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 Kubernetes Environment. - :type name: str - :param force_delete: Specify true to force the deletion - even if the Kubernetes Environment contains resources. The default is - false. - :type force_delete: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - force_delete=force_delete, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} def update( - self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, **operation_config): - """Updates a Kubernetes Environment. + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate. - Description for Updates a Kubernetes Environment. + 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 Kubernetes Environment. + :param name: Name of the certificate. :type name: str - :param kube_environment_envelope: Configuration details of the - Kubernetes Environment. - :type kube_environment_envelope: - ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment + :param certificate_envelope: Details of certificate, if it exists + already. + :type certificate_envelope: + ~azure.mgmt.web.v2020_09_01.models.CertificatePatchResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: KubeEnvironment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KubeEnvironment or + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Certificate or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -487,7 +416,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -498,79 +427,11 @@ def update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} - - def get_operation( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """Get status of a Kubernetes Environment operation. - - Description for Get status of a Kubernetes Environment 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 Kubernetes Environment. - :type name: str - :param operation_id: ID of the operation. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Operation or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Operation or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404, 500]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) - if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('Certificate', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}/operations/{operationId}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_deleted_web_apps_operations.py new file mode 100644 index 00000000000..e2655cedbc7 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_deleted_web_apps_operations.py @@ -0,0 +1,238 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DeletedWebAppsOperations(object): + """DeletedWebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all deleted apps for a subscription. + + Description for Get all deleted apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_09_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_09_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} + + def get_deleted_web_app_by_location( + self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeletedSite or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DeletedSite or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deleted_web_app_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeletedSite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_diagnostics_operations.py new file mode 100644 index 00000000000..2e9ae389434 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_diagnostics_operations.py @@ -0,0 +1,1713 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DiagnosticsOperations(object): + """DiagnosticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_hosting_environment_detector_responses( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hosting_environment_detector_responses.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} + + def get_hosting_environment_detector_response( + self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hosting_environment_detector_response.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} + + def list_site_detector_responses( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} + + def get_site_detector_response( + self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} + + def list_site_diagnostic_categories( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} + + def get_site_diagnostic_category( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AnalysisDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.AnalysisDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AnalysisDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector( + self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector( + self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} + + def list_site_detector_responses_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} + + def get_site_detector_response_slot( + self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} + + def list_site_diagnostic_categories_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} + + def get_site_diagnostic_category_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AnalysisDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.AnalysisDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AnalysisDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector_slot( + self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector_slot( + self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domain_registration_provider_operations.py new file mode 100644 index 00000000000..6031958ce74 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domain_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DomainRegistrationProviderOperations(object): + """DomainRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domains_operations.py new file mode 100644 index 00000000000..89896f4b2fe --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domains_operations.py @@ -0,0 +1,1086 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DomainsOperations(object): + """DomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def check_availability( + self, name=None, custom_headers=None, raw=False, **operation_config): + """Check if a domain is available for registration. + + Description for Check if a domain is available for registration. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainAvailabilityCheckResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DomainAvailabilityCheckResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.check_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainAvailabilityCheckResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all domains in a subscription. + + Description for Get all domains in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DomainPaged[~azure.mgmt.web.v2020_09_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} + + def get_control_center_sso_request( + self, custom_headers=None, raw=False, **operation_config): + """Generate a single sign-on request for the domain management portal. + + Description for Generate a single sign-on request for the domain + management portal. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainControlCenterSsoRequest or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DomainControlCenterSsoRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_control_center_sso_request.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainControlCenterSsoRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} + + def list_recommendations( + self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): + """Get domain name recommendations based on keywords. + + Description for Get domain name recommendations based on keywords. + + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NameIdentifier + :rtype: + ~azure.mgmt.web.v2020_09_01.models.NameIdentifierPaged[~azure.mgmt.web.v2020_09_01.models.NameIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommendations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DomainPaged[~azure.mgmt.web.v2020_09_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} + + def get( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'Domain') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.Domain + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.Domain]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def delete( + self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): + """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 true to delete + the domain immediately. The default is false which + deletes the domain after 24 hours. + :type force_hard_delete_domain: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.DomainPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'DomainPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def list_ownership_identifiers( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DomainOwnershipIdentifier + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_ownership_identifiers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} + + def get_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def create_or_update_ownership_identifier( + self, resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.DomainOwnershipIdentifier + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def delete_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def update_ownership_identifier( + self, resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.DomainOwnershipIdentifier + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def renew( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_provider_operations.py new file mode 100644 index 00000000000..6e50b5a6026 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_provider_operations.py @@ -0,0 +1,246 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProviderOperations(object): + """ProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def get_available_stacks( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their + versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStackResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_09_01.models.ApplicationStackResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks.metadata['url'] + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} + + def get_available_stacks_on_prem( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their + versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStackResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_09_01.models.ApplicationStackResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks_on_prem.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_recommendations_operations.py new file mode 100644 index 00000000000..00282e3058d --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_recommendations_operations.py @@ -0,0 +1,1070 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RecommendationsOperations(object): + """RecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """List all recommendations for a subscription. + + Description for List all recommendations for a subscription. + + :param featured: Specify true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} + + def reset_all_filters( + self, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for a subscription. + + Description for Reset all recommendation opt-out settings for a + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} + + def disable_recommendation_for_subscription( + self, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} + + def list_history_for_hosting_environment( + self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} + + def list_recommended_rules_for_hosting_environment( + self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} + + def disable_all_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_all_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} + + def reset_all_filters_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} + + def get_rule_details_by_hosting_environment( + self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} + + def disable_recommendation_for_hosting_environment( + self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_hosting_environment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} + + def list_history_for_web_app( + self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} + + def list_recommended_rules_for_web_app( + self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} + + def disable_all_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_all_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} + + def reset_all_filters_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} + + def get_rule_details_by_web_app( + self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} + + def disable_recommendation_for_site( + self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_site.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_resource_health_metadata_operations.py new file mode 100644 index 00000000000..726f9fe646b --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_resource_health_metadata_operations.py @@ -0,0 +1,468 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceHealthMetadataOperations(object): + """ResourceHealthMetadataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the subscription. + + Description for List all ResourceHealthMetadata for all sites in the + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} + + def get_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} + + def list_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} + + def get_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_static_sites_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_static_sites_operations.py new file mode 100644 index 00000000000..81aa6d9ca9f --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_static_sites_operations.py @@ -0,0 +1,1878 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class StaticSitesOperations(object): + """StaticSitesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def preview_workflow( + self, location, static_sites_workflow_preview_request, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StaticSitesWorkflowPreviewRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSitesWorkflowPreview or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSitesWorkflowPreview + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.preview_workflow.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSitesWorkflowPreview', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all Static Sites for a subscription. + + Description for Get all Static Sites for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteARMResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} + + def get_static_sites_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteARMResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_static_sites_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} + + def get_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def create_or_update_static_site( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StaticSiteARMResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def delete_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def update_static_site( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StaticSitePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def list_static_site_users( + self, resource_group_name, name, authprovider, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteUserARMResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteUserARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteUserARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_users.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteUserARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} + + def delete_static_site_user( + self, resource_group_name, name, authprovider, userid, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} + + def update_static_site_user( + self, resource_group_name, name, authprovider, userid, static_site_user_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StaticSiteUserARMResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteUserARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_static_site_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} + + def get_static_site_builds( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteBuildARMResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteBuildARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteBuildARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_static_site_builds.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteBuildARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} + + def get_static_site_build( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteBuildARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteBuildARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteBuildARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} + + def delete_static_site_build( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} + + def create_or_update_static_site_build_function_app_settings( + self, resource_group_name, name, pr_id, app_settings, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param app_settings: + :type app_settings: + ~azure.mgmt.web.v2020_09_01.models.StringDictionary + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings'} + + def list_static_site_build_functions( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteFunctionOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_build_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} + + def list_static_site_build_function_app_settings( + self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): + """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 + :param pr_id: The stage site identifier. + :type pr_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_build_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'prId': self._serialize.url("pr_id", pr_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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} + + def create_or_update_static_site_function_app_settings( + self, resource_group_name, name, app_settings, custom_headers=None, raw=False, **operation_config): + """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: + :type app_settings: + ~azure.mgmt.web.v2020_09_01.models.StringDictionary + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_static_site_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} + + def create_user_roles_invitation_link( + self, resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StaticSiteUserInvitationRequestResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserInvitationResponseResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteUserInvitationResponseResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_user_roles_invitation_link.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} + + def list_static_site_custom_domains( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteCustomDomainOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteCustomDomainOverviewARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteCustomDomainOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_custom_domains.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteCustomDomainOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} + + def create_or_update_static_site_custom_domain( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteCustomDomainOverviewARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteCustomDomainOverviewARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + def delete_static_site_custom_domain( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + def validate_custom_domain_can_be_added_to_static_site( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate_custom_domain_can_be_added_to_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} + + def detach_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.detach_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} + + def list_static_site_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteFunctionOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} + + def list_static_site_function_app_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + if response.status_code == 202: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} + + def list_static_site_secrets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} + + def reset_static_site_api_key( + self, resource_group_name, name, reset_properties_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StaticSiteResetPropertiesARMResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_static_site_api_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_top_level_domains_operations.py new file mode 100644 index 00000000000..117848110fb --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_top_level_domains_operations.py @@ -0,0 +1,251 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TopLevelDomainsOperations(object): + """TopLevelDomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all top-level domains supported for registration. + + Description for Get all top-level domains supported for registration. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TopLevelDomain + :rtype: + ~azure.mgmt.web.v2020_09_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2020_09_01.models.TopLevelDomain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} + + def get( + self, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TopLevelDomain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.TopLevelDomain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TopLevelDomain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} + + def list_agreements( + self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): + """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 include_privacy: If true, then the list of + agreements will include agreements for domain privacy as well; + otherwise, false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TldLegalAgreement + :rtype: + ~azure.mgmt.web.v2020_09_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2020_09_01.models.TldLegalAgreement] + :raises: + :class:`DefaultErrorResponseException` + """ + agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_agreements.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py new file mode 100644 index 00000000000..070148b75ab --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py @@ -0,0 +1,27447 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WebAppsOperations(object): + """WebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all apps for a subscription. + + Description for Get all apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} + + def list_by_resource_group( + self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + if include_slots is not None: + query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.Site + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def delete( + self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SitePatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def analyze_custom_hostname( + self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} + + def apply_slot_config_to_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_config_to_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} + + def backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} + + def list_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_09_01.models.BackupItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} + + def get_backup_status( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def delete_backup( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def list_backup_status_secrets( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} + + + def _restore_initial( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} + + def get_basic_publishing_credentials_policies( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesCollection or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesCollection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_basic_publishing_credentials_policies.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} + + def get_ftp_allowed( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ftp_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} + + def update_ftp_allowed( + self, resource_group_name, name, csm_publishing_access_policies_entity, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.CsmPublishingCredentialsPoliciesEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_ftp_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} + + def get_scm_allowed( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_scm_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} + + def update_scm_allowed( + self, resource_group_name, name, csm_publishing_access_policies_entity, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.CsmPublishingCredentialsPoliciesEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_scm_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} + + def list_configurations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} + + def update_application_settings( + self, resource_group_name, name, app_settings, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StringDictionary + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} + + def list_application_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} + + def update_auth_settings( + self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteAuthSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} + + def get_auth_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} + + def update_auth_settings_v2( + self, resource_group_name, name, site_auth_settings_v2, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteAuthSettingsV2 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} + + def get_auth_settings_v2( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} + + def update_azure_storage_accounts( + self, resource_group_name, name, azure_storage_accounts, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.AzureStoragePropertyDictionaryResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} + + def list_azure_storage_accounts( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} + + def update_backup_configuration( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.BackupRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def delete_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def get_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} + + def update_connection_strings( + self, resource_group_name, name, connection_strings, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.ConnectionStringDictionary + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} + + def list_connection_strings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_diagnostic_logs_config( + self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteLogsConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_metadata( + self, resource_group_name, name, metadata, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StringDictionary + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} + + def list_metadata( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} + + + def _list_publishing_credentials_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} + + def update_site_push_settings( + self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PushSettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} + + def list_site_push_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} + + def list_slot_configuration_names( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def update_slot_configuration_names( + self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SlotConfigNamesResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def get_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def create_or_update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def list_configuration_snapshot_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} + + def get_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.recover_site_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} + + def get_container_logs_zip( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} + + def list_continuous_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_09_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} + + def get_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DeploymentPaged[~azure.mgmt.web.v2020_09_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} + + def get_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def create_deployment( + self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def delete_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def list_deployment_log( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} + + def discover_backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} + + def list_domain_ownership_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_09_01.models.IdentifierPaged[~azure.mgmt.web.v2020_09_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.Identifier + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.Identifier + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_initial( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + def get_ms_deploy_log( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} + + def list_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} + + def get_functions_admin_token( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} + + def get_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + + def _create_function_initial( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_function( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def delete_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def create_or_update_function_secret( + self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def delete_function_secret( + self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} + + def list_function_secrets( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} + + def list_host_keys( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} + + def list_sync_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} + + def sync_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} + + def create_or_update_host_secret( + self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def delete_host_secret( + self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2020_09_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_09_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} + + def get_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding( + self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.HostNameBinding + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def delete_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.HybridConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} + + def list_relay_service_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} + + def get_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def delete_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.RelayServiceConnectionEntity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def list_instance_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebSiteInstanceStatus + :rtype: + ~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatus] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} + + def get_instance_info( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebSiteInstanceStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebSiteInstanceStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} + + def get_instance_ms_deploy_status( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + + def _create_instance_ms_deploy_operation_initial( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} + + def list_instance_processes( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} + + def get_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} + + def list_instance_process_modules( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module( + self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} + + def list_instance_process_threads( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} + + def is_cloneable( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} + + def list_site_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_09_01.models.BackupItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} + + def list_sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} + + + def _migrate_storage_initial( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_storage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_storage( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.StorageMigrationOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StorageMigrationResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.StorageMigrationResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.StorageMigrationResponse]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} + + + def _migrate_my_sql_initial( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_my_sql.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_my_sql( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.MigrateMySqlRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Operation or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.Operation] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.Operation]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} + + def get_migrate_my_sql_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} + + def get_swift_virtual_network_connection( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_swift_virtual_network.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def list_network_features( + self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): + """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. This can either be "summary" or + "detailed". + :type view: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_network_features.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} + + def get_network_trace_operation( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} + + def stop_web_site_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} + + def get_network_traces( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} + + def get_network_trace_operation_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} + + def get_network_traces_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.generate_new_site_publishing_password.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} + + def list_perf_mon_counters( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2020_09_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_09_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} + + def get_site_php_error_log_flag( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} + + def list_premier_add_ons( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} + + def get_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PremierAddOn + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PremierAddOnPatchResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def get_private_access( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def put_private_access_vnet( + self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PrivateAccess + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def list_processes( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} + + def get_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def delete_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def get_process_dump( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} + + def list_process_modules( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} + + def get_process_module( + self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} + + def list_public_certificates( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2020_09_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_09_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} + + def get_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate( + self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PublicCertificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets( + self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """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 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_09_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the + DisasterRecover endpoint if true + :type include_disaster_recovery_endpoints: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} + + def reset_production_slot_config( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_production_slot_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} + + def restart( + self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} + + + def _restore_from_backup_blob_initial( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob( + self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_backup_blob_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.DeletedAppRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_deleted_app_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} + + + def _restore_snapshot_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.SnapshotRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_snapshot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} + + def list_site_extensions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} + + def get_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_initial( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def delete_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _copy_production_slot_initial( + self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, **operation_config): + copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) + + # Construct URL + url = self.copy_production_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def copy_production_slot( + self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): + """Copies a deployment slot to another deployment slot of an app. + + Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. + :type target_slot: str + :param site_config: The site object which will be merged with the + source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2020_09_01.models.SiteConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._copy_production_slot_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + site_config=site_config, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} + + def list_slots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} + + def get_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + + def _create_or_update_slot_initial( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.Site + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def delete_slot( + self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """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 true if the App Service plan + will be empty after app deletion and you want to delete the empty App + Service plan. By default, the empty App Service plan is not deleted. + :type delete_empty_server_farm: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SitePatchResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def analyze_custom_hostname_slot( + self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} + + def apply_slot_configuration_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} + + def backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} + + def list_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_09_01.models.BackupItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} + + def get_backup_status_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def delete_backup_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def list_backup_status_secrets_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.BackupRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} + + + def _restore_slot_initial( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} + + def list_configurations_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} + + def update_application_settings_slot( + self, resource_group_name, name, app_settings, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StringDictionary + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} + + def list_application_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} + + def update_auth_settings_slot( + self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteAuthSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} + + def get_auth_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} + + def update_auth_settings_v2_slot( + self, resource_group_name, name, site_auth_settings_v2, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteAuthSettingsV2 + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_v2_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} + + def get_auth_settings_v2_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_v2_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} + + def update_azure_storage_accounts_slot( + self, resource_group_name, name, azure_storage_accounts, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.AzureStoragePropertyDictionaryResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} + + def list_azure_storage_accounts_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} + + def update_backup_configuration_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.BackupRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def delete_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def get_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} + + def update_connection_strings_slot( + self, resource_group_name, name, connection_strings, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.ConnectionStringDictionary + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} + + def list_connection_strings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_diagnostic_logs_config_slot( + self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteLogsConfig + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_metadata_slot( + self, resource_group_name, name, metadata, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.StringDictionary + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} + + def list_metadata_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} + + + def _list_publishing_credentials_slot_initial( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} + + def update_site_push_settings_slot( + self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PushSettings + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} + + def list_site_push_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} + + def get_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def create_or_update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteConfigResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def list_configuration_snapshot_info_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} + + def get_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.recover_site_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} + + def get_container_logs_zip_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} + + def list_continuous_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_09_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} + + def get_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2020_09_01.models.DeploymentPaged[~azure.mgmt.web.v2020_09_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} + + def get_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def create_deployment_slot( + self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.Deployment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def delete_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def list_deployment_log_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} + + def discover_backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} + + def list_domain_ownership_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_09_01.models.IdentifierPaged[~azure.mgmt.web.v2020_09_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.Identifier + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.Identifier + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation_slot( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + def get_ms_deploy_log_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} + + def list_instance_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} + + def get_functions_admin_token_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} + + def get_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + + def _create_instance_function_slot_initial( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_function_slot( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def delete_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def create_or_update_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} + + def list_function_secrets_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} + + def list_host_keys_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} + + def list_sync_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} + + def sync_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} + + def create_or_update_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2020_09_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_09_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} + + def get_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding_slot( + self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.HostNameBinding + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def delete_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def get_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.HybridConnection + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} + + def list_relay_service_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} + + def get_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def delete_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.RelayServiceConnectionEntity + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def list_instance_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebSiteInstanceStatus + :rtype: + ~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatus] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} + + def get_instance_info_slot( + self, resource_group_name, name, instance_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebSiteInstanceStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebSiteInstanceStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} + + def get_instance_ms_deploy_status_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + + def _create_instance_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation_slot( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_processes_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} + + def get_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_process_modules_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def list_instance_process_threads_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} + + def is_cloneable_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} + + def list_site_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_09_01.models.BackupItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} + + def list_sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} + + def get_migrate_my_sql_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} + + def get_swift_virtual_network_connection_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_swift_virtual_network_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Description for Integrates this Web App with a Virtual Network. This + requires that 1) "swiftSupported" is true when doing a GET against this + resource, and 2) that the target Subnet has already been delegated, and + is not + in use by another App Service Plan other than the one this App is in. + + :param resource_group_name: Name 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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: + ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def list_network_features_slot( + self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): + """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. This can either be "summary" or + "detailed". + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_network_features_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} + + def get_network_trace_operation_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} + + def stop_web_site_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} + + def get_network_traces_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} + + def get_network_trace_operation_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def get_network_traces_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.generate_new_site_publishing_password_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} + + def list_perf_mon_counters_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2020_09_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_09_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} + + def get_site_php_error_log_flag_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} + + def list_premier_add_ons_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} + + def get_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PremierAddOn + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PremierAddOnPatchResource + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def get_private_access_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def put_private_access_vnet_slot( + self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PrivateAccess + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def get_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """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: + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnectionResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.PrivateEndpointConnectionResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _approve_or_reject_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.approve_or_reject_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + if response.status_code == 202: + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def approve_or_reject_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.PrivateLinkConnectionApprovalRequestResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PrivateEndpointConnectionResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.PrivateEndpointConnectionResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.PrivateEndpointConnectionResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnectionResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + if response.status_code == 202: + deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get_private_link_resources( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateLinkResourcesWrapper + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_link_resources.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} + + def list_processes_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} + + def get_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def delete_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def get_process_dump_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} + + def list_process_modules_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} + + def get_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} + + def list_public_certificates_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2020_09_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_09_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} + + def get_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate_slot( + self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.PublicCertificate + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets_slot( + self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """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 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_09_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the + DisasterRecover endpoint if true + :type include_disaster_recovery_endpoints: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} + + def reset_slot_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} + + def restart_slot( + self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} + + + def _restore_from_backup_blob_slot_initial( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.RestoreRequest + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_backup_blob_slot_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.DeletedAppRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_deleted_app_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} + + + def _restore_snapshot_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.SnapshotRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_snapshot_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} + + def list_site_extensions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} + + def get_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_slot_initial( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def delete_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _copy_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, **operation_config): + copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) + + # Construct URL + url = self.copy_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def copy_slot_slot( + self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): + """Copies a deployment slot to another deployment slot of an app. + + Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. + :type target_slot: str + :param site_config: The site object which will be merged with the + source slot site + to produce new destination slot site object. + null to just copy source slot content. Otherwise a + Site + object with properties to override source slot site. + :type site_config: ~azure.mgmt.web.v2020_09_01.models.SiteConfig + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._copy_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + site_config=site_config, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + copy_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} + + def list_slot_differences_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_09_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} + + + def _swap_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._swap_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} + + def list_snapshots_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SnapshotPaged[~azure.mgmt.web.v2020_09_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} + + def list_snapshots_from_dr_secondary_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SnapshotPaged[~azure.mgmt.web.v2020_09_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} + + def get_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + + def _create_or_update_source_control_slot_initial( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def delete_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteSourceControl + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def start_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} + + + def _start_network_trace_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} + + def stop_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} + + def stop_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} + + def sync_repository_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_repository_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} + + def sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} + + def list_triggered_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2020_09_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} + + def get_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def run_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.run_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} + + def list_usages_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} + + def list_vnet_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} + + def get_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetInfo + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetGateway + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2020_09_01.models.WebJobPaged[~azure.mgmt.web.v2020_09_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} + + def get_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} + + def list_slot_differences_from_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_09_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_from_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} + + + def _swap_slot_with_production_initial( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_with_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_with_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} + + def list_snapshots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SnapshotPaged[~azure.mgmt.web.v2020_09_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} + + def list_snapshots_from_dr_secondary( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SnapshotPaged[~azure.mgmt.web.v2020_09_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} + + def get_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + + def _create_or_update_source_control_initial( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): + """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_09_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def delete_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def start( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} + + + def _start_network_trace_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} + + def stop( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} + + def stop_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} + + def sync_repository( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_repository.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} + + def sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} + + def list_triggered_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2020_09_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} + + def get_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history( + self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} + + def run_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.run_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} + + def list_vnet_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} + + def get_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetGateway + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2020_09_01.models.WebJobPaged[~azure.mgmt.web.v2020_09_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} + + def get_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_site_management_client_operations.py new file mode 100644 index 00000000000..18b7dc9687e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_site_management_client_operations.py @@ -0,0 +1,1124 @@ +# 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 msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from .. import models +import uuid + + +class WebSiteManagementClientOperationsMixin(object): + + def generate_github_access_token_for_appservice_cli_async( + self, code, state, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppserviceGithubToken or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.AppserviceGithubToken or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + request = models.AppserviceGithubTokenRequest(code=code, state=state) + + # Construct URL + url = self.generate_github_access_token_for_appservice_cli_async.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'AppserviceGithubTokenRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppserviceGithubToken', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_github_access_token_for_appservice_cli_async.metadata = {'url': '/providers/Microsoft.Web/generateGithubAccessTokenForAppserviceCLI'} + + def get_publishing_user( + self, custom_headers=None, raw=False, **operation_config): + """Gets publishing user. + + Description for Gets publishing user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def update_publishing_user( + self, user_details, custom_headers=None, raw=False, **operation_config): + """Updates 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(user_details, 'User') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def list_source_controls( + self, custom_headers=None, raw=False, **operation_config): + """Gets the source controls available for Azure websites. + + Description for Gets the source controls available for Azure websites. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.web.v2020_09_01.models.SourceControlPaged[~azure.mgmt.web.v2020_09_01.models.SourceControl] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_source_controls.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} + + def get_source_control( + self, source_control_type, custom_headers=None, raw=False, **operation_config): + """Gets source control token. + + Description for Gets source control token. + + :param source_control_type: Type of source control + :type source_control_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def update_source_control( + self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.SourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request_message, 'SourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def list_billing_meters( + self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BillingMeter + :rtype: + ~azure.mgmt.web.v2020_09_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeter] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_billing_meters.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} + + def check_name_availability( + self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): + """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. 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_09_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceNameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) + + # Construct URL + url = self.check_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceNameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} + + def get_subscription_deployment_locations( + self, custom_headers=None, raw=False, **operation_config): + """Gets list of available geo regions plus ministamps. + + Description for Gets list of available geo regions plus ministamps. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentLocations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_subscription_deployment_locations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeploymentLocations', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} + + def list_geo_regions( + self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values + include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', + 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + :type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName + :param linux_workers_enabled: Specify true if you want to + filter to only regions that support Linux workers. + :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify true if you want to + filter to only regions that support Xenon workers. + :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify true if you + want to filter to only regions that support Linux Consumption Workers. + :type linux_dynamic_workers_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GeoRegion + :rtype: + ~azure.mgmt.web.v2020_09_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegion] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_geo_regions.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} + + def list_site_identifiers_assigned_to_host_name( + self, name=None, custom_headers=None, raw=False, **operation_config): + """List all apps that are assigned to a hostname. + + Description for List all apps that are assigned to a hostname. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_09_01.models.IdentifierPaged[~azure.mgmt.web.v2020_09_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} + + def list_premier_add_on_offers( + self, custom_headers=None, raw=False, **operation_config): + """List all premier add-on offers. + + Description for List all premier add-on offers. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PremierAddOnOffer + :rtype: + ~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOffer] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_premier_add_on_offers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} + + def list_skus( + self, custom_headers=None, raw=False, **operation_config): + """List all SKUs. + + Description for List all SKUs. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SkuInfos or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SkuInfos', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} + + def verify_hosting_environment_vnet( + self, parameters, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.VnetParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetValidationFailureDetails or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_hosting_environment_vnet.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VnetParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetValidationFailureDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} + + def move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} + + def validate( + self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): + """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_09_01.models.ValidateRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_request, 'ValidateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} + + def validate_move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.validate_move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/version.py similarity index 96% rename from src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/version.py rename to src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/version.py index 5a57ed8b565..ecde0bf7940 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/version.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.44.0" +VERSION = "0.42.0" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/__init__.py new file mode 100644 index 00000000000..55c66f839cf --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/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 ._configuration import WebSiteManagementClientConfiguration +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_configuration.py new file mode 100644 index 00000000000..b96e0933169 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_configuration.py @@ -0,0 +1,49 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class WebSiteManagementClientConfiguration(AzureConfiguration): + """Configuration for WebSiteManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(WebSiteManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_web_site_management_client.py new file mode 100644 index 00000000000..3c4043a6135 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_web_site_management_client.py @@ -0,0 +1,136 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import WebSiteManagementClientOperationsMixin +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 GlobalModelOperations +from .operations import ProviderOperations +from .operations import RecommendationsOperations +from .operations import WebAppsOperations +from .operations import StaticSitesOperations +from .operations import AppServiceEnvironmentsOperations +from .operations import AppServicePlansOperations +from .operations import ResourceHealthMetadataOperations +from .operations import KubeEnvironmentsOperations +from . import models + + +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient): + """WebSite Management Client + + :ivar config: Configuration for client. + :vartype config: WebSiteManagementClientConfiguration + + :ivar app_service_certificate_orders: AppServiceCertificateOrders operations + :vartype app_service_certificate_orders: azure.mgmt.web.v2020_12_01.operations.AppServiceCertificateOrdersOperations + :ivar certificate_orders_diagnostics: CertificateOrdersDiagnostics operations + :vartype certificate_orders_diagnostics: azure.mgmt.web.v2020_12_01.operations.CertificateOrdersDiagnosticsOperations + :ivar certificate_registration_provider: CertificateRegistrationProvider operations + :vartype certificate_registration_provider: azure.mgmt.web.v2020_12_01.operations.CertificateRegistrationProviderOperations + :ivar domains: Domains operations + :vartype domains: azure.mgmt.web.v2020_12_01.operations.DomainsOperations + :ivar top_level_domains: TopLevelDomains operations + :vartype top_level_domains: azure.mgmt.web.v2020_12_01.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProvider operations + :vartype domain_registration_provider: azure.mgmt.web.v2020_12_01.operations.DomainRegistrationProviderOperations + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.web.v2020_12_01.operations.CertificatesOperations + :ivar deleted_web_apps: DeletedWebApps operations + :vartype deleted_web_apps: azure.mgmt.web.v2020_12_01.operations.DeletedWebAppsOperations + :ivar diagnostics: Diagnostics operations + :vartype diagnostics: azure.mgmt.web.v2020_12_01.operations.DiagnosticsOperations + :ivar global_model: GlobalModel operations + :vartype global_model: azure.mgmt.web.v2020_12_01.operations.GlobalModelOperations + :ivar provider: Provider operations + :vartype provider: azure.mgmt.web.v2020_12_01.operations.ProviderOperations + :ivar recommendations: Recommendations operations + :vartype recommendations: azure.mgmt.web.v2020_12_01.operations.RecommendationsOperations + :ivar web_apps: WebApps operations + :vartype web_apps: azure.mgmt.web.v2020_12_01.operations.WebAppsOperations + :ivar static_sites: StaticSites operations + :vartype static_sites: azure.mgmt.web.v2020_12_01.operations.StaticSitesOperations + :ivar app_service_environments: AppServiceEnvironments operations + :vartype app_service_environments: azure.mgmt.web.v2020_12_01.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlans operations + :vartype app_service_plans: azure.mgmt.web.v2020_12_01.operations.AppServicePlansOperations + :ivar resource_health_metadata: ResourceHealthMetadata operations + :vartype resource_health_metadata: azure.mgmt.web.v2020_12_01.operations.ResourceHealthMetadataOperations + :ivar kube_environments: KubeEnvironments operations + :vartype kube_environments: azure.mgmt.web.v2020_12_01.operations.KubeEnvironmentsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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 + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) + super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-12-01' + self._serialize = Serializer(client_models) + 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 = GlobalModelOperations( + 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) + self.kube_environments = KubeEnvironmentsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py new file mode 100644 index 00000000000..61c8bf6d6ac --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py @@ -0,0 +1,1304 @@ +# 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 ApiManagementConfig + from ._models_py3 import AppInsightsWebAppStackSettings + from ._models_py3 import Apple + from ._models_py3 import AppleRegistration + from ._models_py3 import ApplicationLogsConfig + from ._models_py3 import ApplicationStack + from ._models_py3 import ApplicationStackResource + from ._models_py3 import AppLogsConfiguration + from ._models_py3 import AppRegistration + from ._models_py3 import AppServiceCertificate + from ._models_py3 import AppServiceCertificateOrder + from ._models_py3 import AppServiceCertificateOrderPatchResource + from ._models_py3 import AppServiceCertificatePatchResource + from ._models_py3 import AppServiceCertificateResource + from ._models_py3 import AppServiceEnvironment + from ._models_py3 import AppServiceEnvironmentPatchResource + from ._models_py3 import AppServiceEnvironmentResource + from ._models_py3 import AppserviceGithubToken + from ._models_py3 import AppserviceGithubTokenRequest + from ._models_py3 import AppServicePlan + from ._models_py3 import AppServicePlanPatchResource + from ._models_py3 import ArcConfiguration + 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 BackupRequest + from ._models_py3 import BackupSchedule + from ._models_py3 import BillingMeter + from ._models_py3 import BlobStorageTokenStore + from ._models_py3 import Capability + from ._models_py3 import Certificate + 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 ConnectionStringDictionary + from ._models_py3 import ConnStringInfo + from ._models_py3 import ConnStringValueTypePair + 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 CookieExpiration + from ._models_py3 import CorsSettings + from ._models_py3 import CsmMoveResourceEnvelope + 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 CustomHostnameAnalysisResult + from ._models_py3 import CustomOpenIdConnectProvider + from ._models_py3 import DatabaseBackupSetting + from ._models_py3 import DataProviderMetadata + from ._models_py3 import DataSource + from ._models_py3 import DataTableResponseColumn + from ._models_py3 import DataTableResponseObject + from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException + from ._models_py3 import DefaultErrorResponseError + from ._models_py3 import DefaultErrorResponseErrorDetailsItem + from ._models_py3 import DeletedAppRestoreRequest + from ._models_py3 import DeletedSite + from ._models_py3 import Deployment + 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 DiagnosticAnalysis + from ._models_py3 import DiagnosticCategory + from ._models_py3 import DiagnosticData + 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 DomainControlCenterSsoRequest + from ._models_py3 import DomainOwnershipIdentifier + 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 ExtendedLocation + 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 FrontEndConfiguration + from ._models_py3 import FunctionAppMajorVersion + from ._models_py3 import FunctionAppMinorVersion + from ._models_py3 import FunctionAppRuntimes + from ._models_py3 import FunctionAppRuntimeSettings + from ._models_py3 import FunctionAppStack + from ._models_py3 import FunctionEnvelope + from ._models_py3 import FunctionSecrets + from ._models_py3 import GeoRegion + 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 HostingEnvironmentDeploymentInfo + from ._models_py3 import HostingEnvironmentDiagnostics + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HostKeys + from ._models_py3 import HostName + from ._models_py3 import HostNameBinding + from ._models_py3 import HostNameSslState + from ._models_py3 import HttpLogsConfig + from ._models_py3 import HttpSettings + from ._models_py3 import HttpSettingsRoutes + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import HybridConnectionLimits + from ._models_py3 import Identifier + from ._models_py3 import IdentityProviders + from ._models_py3 import InboundEnvironmentEndpoint + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import JwtClaimChecks + from ._models_py3 import KeyInfo + from ._models_py3 import KeyValuePairStringObject + from ._models_py3 import KubeEnvironment + from ._models_py3 import KubeEnvironmentProfile + from ._models_py3 import LegacyMicrosoftAccount + from ._models_py3 import LinuxJavaContainerSettings + from ._models_py3 import LocalizableString + from ._models_py3 import LogAnalyticsConfiguration + from ._models_py3 import Login + from ._models_py3 import LoginRoutes + from ._models_py3 import LoginScopes + from ._models_py3 import LogSpecification + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricSpecification + from ._models_py3 import MigrateMySqlRequest + from ._models_py3 import MigrateMySqlStatus + from ._models_py3 import MSDeploy + from ._models_py3 import MSDeployLog + from ._models_py3 import MSDeployLogEntry + from ._models_py3 import MSDeployStatus + from ._models_py3 import NameIdentifier + 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 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 PremierAddOnPatchResource + from ._models_py3 import PrivateAccess + from ._models_py3 import PrivateAccessSubnet + from ._models_py3 import PrivateAccessVirtualNetwork + 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 ProcessModuleInfo + from ._models_py3 import ProcessThreadInfo + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PublicCertificate + 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 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 ResourceHealthMetadata + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + 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 SiteConfigurationSnapshotInfo + from ._models_py3 import SiteExtensionInfo + 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 SkuInfos + from ._models_py3 import SlotConfigNamesResource + from ._models_py3 import SlotDifference + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotRecoverySource + from ._models_py3 import SnapshotRestoreRequest + from ._models_py3 import Solution + from ._models_py3 import SourceControl + from ._models_py3 import StackMajorVersion + from ._models_py3 import StackMinorVersion + from ._models_py3 import StampCapacity + from ._models_py3 import StaticSiteARMResource + from ._models_py3 import StaticSiteBuildARMResource + from ._models_py3 import StaticSiteBuildProperties + from ._models_py3 import StaticSiteCustomDomainOverviewARMResource + from ._models_py3 import StaticSiteCustomDomainRequestPropertiesARMResource + from ._models_py3 import StaticSiteFunctionOverviewARMResource + from ._models_py3 import StaticSitePatchResource + from ._models_py3 import StaticSiteResetPropertiesARMResource + from ._models_py3 import StaticSitesWorkflowPreview + from ._models_py3 import StaticSitesWorkflowPreviewRequest + from ._models_py3 import StaticSiteTemplateOptions + from ._models_py3 import StaticSiteUserARMResource + from ._models_py3 import StaticSiteUserInvitationRequestResource + from ._models_py3 import StaticSiteUserInvitationResponseResource + from ._models_py3 import StaticSiteUserProvidedFunctionApp + from ._models_py3 import StaticSiteUserProvidedFunctionAppARMResource + from ._models_py3 import StaticSiteZipDeploymentARMResource + 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 TokenStore + from ._models_py3 import TopLevelDomain + from ._models_py3 import TopLevelDomainAgreementOption + from ._models_py3 import TriggeredJobHistory + from ._models_py3 import TriggeredJobRun + from ._models_py3 import TriggeredWebJob + from ._models_py3 import Twitter + from ._models_py3 import TwitterRegistration + from ._models_py3 import Usage + 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 WebAppMajorVersion + from ._models_py3 import WebAppMinorVersion + from ._models_py3 import WebAppRuntimes + from ._models_py3 import WebAppRuntimeSettings + from ._models_py3 import WebAppStack + from ._models_py3 import WebJob + from ._models_py3 import WebSiteInstanceStatus + from ._models_py3 import WindowsJavaContainerSettings + from ._models_py3 import WorkerAppsConfiguration + from ._models_py3 import WorkerPoolResource +except (SyntaxError, ImportError): + from ._models import AbnormalTimePeriod + from ._models import Address + from ._models import AddressResponse + from ._models import AllowedAudiencesValidation + from ._models import AnalysisData + from ._models import AnalysisDefinition + from ._models import ApiDefinitionInfo + from ._models import ApiKVReference + from ._models import ApiManagementConfig + from ._models import AppInsightsWebAppStackSettings + from ._models import Apple + from ._models import AppleRegistration + from ._models import ApplicationLogsConfig + from ._models import ApplicationStack + from ._models import ApplicationStackResource + from ._models import AppLogsConfiguration + from ._models import AppRegistration + from ._models import AppServiceCertificate + from ._models import AppServiceCertificateOrder + from ._models import AppServiceCertificateOrderPatchResource + from ._models import AppServiceCertificatePatchResource + from ._models import AppServiceCertificateResource + from ._models import AppServiceEnvironment + from ._models import AppServiceEnvironmentPatchResource + from ._models import AppServiceEnvironmentResource + from ._models import AppserviceGithubToken + from ._models import AppserviceGithubTokenRequest + from ._models import AppServicePlan + from ._models import AppServicePlanPatchResource + from ._models import ArcConfiguration + from ._models import ArmIdWrapper + from ._models import AseV3NetworkingConfiguration + from ._models import AuthPlatform + from ._models import AutoHealActions + from ._models import AutoHealCustomAction + from ._models import AutoHealRules + from ._models import AutoHealTriggers + from ._models import AzureActiveDirectory + from ._models import AzureActiveDirectoryLogin + from ._models import AzureActiveDirectoryRegistration + from ._models import AzureActiveDirectoryValidation + from ._models import AzureBlobStorageApplicationLogsConfig + from ._models import AzureBlobStorageHttpLogsConfig + from ._models import AzureStaticWebApps + from ._models import AzureStaticWebAppsRegistration + from ._models import AzureStorageInfoValue + from ._models import AzureStoragePropertyDictionaryResource + from ._models import AzureTableStorageApplicationLogsConfig + from ._models import BackupItem + from ._models import BackupRequest + from ._models import BackupSchedule + from ._models import BillingMeter + from ._models import BlobStorageTokenStore + from ._models import Capability + from ._models import Certificate + from ._models import CertificateDetails + from ._models import CertificateEmail + from ._models import CertificateOrderAction + from ._models import CertificateOrderContact + from ._models import CertificatePatchResource + from ._models import ClientRegistration + from ._models import CloningInfo + from ._models import ConnectionStringDictionary + from ._models import ConnStringInfo + from ._models import ConnStringValueTypePair + from ._models import Contact + from ._models import ContainerCpuStatistics + from ._models import ContainerCpuUsage + from ._models import ContainerInfo + from ._models import ContainerMemoryStatistics + from ._models import ContainerNetworkInterfaceStatistics + from ._models import ContainerThrottlingData + from ._models import ContinuousWebJob + from ._models import CookieExpiration + from ._models import CorsSettings + from ._models import CsmMoveResourceEnvelope + from ._models import CsmOperationDescription + from ._models import CsmOperationDescriptionProperties + from ._models import CsmOperationDisplay + from ._models import CsmPublishingCredentialsPoliciesCollection + from ._models import CsmPublishingCredentialsPoliciesEntity + from ._models import CsmPublishingProfileOptions + from ._models import CsmSlotEntity + from ._models import CsmUsageQuota + from ._models import CustomHostnameAnalysisResult + from ._models import CustomOpenIdConnectProvider + from ._models import DatabaseBackupSetting + from ._models import DataProviderMetadata + from ._models import DataSource + from ._models import DataTableResponseColumn + from ._models import DataTableResponseObject + from ._models import DefaultErrorResponse, DefaultErrorResponseException + from ._models import DefaultErrorResponseError + from ._models import DefaultErrorResponseErrorDetailsItem + from ._models import DeletedAppRestoreRequest + from ._models import DeletedSite + from ._models import Deployment + from ._models import DeploymentLocations + from ._models import DetectorAbnormalTimePeriod + from ._models import DetectorDefinition + from ._models import DetectorInfo + from ._models import DetectorResponse + from ._models import DiagnosticAnalysis + from ._models import DiagnosticCategory + from ._models import DiagnosticData + from ._models import DiagnosticDetectorResponse + from ._models import DiagnosticMetricSample + from ._models import DiagnosticMetricSet + from ._models import Dimension + from ._models import Domain + from ._models import DomainAvailabilityCheckResult + from ._models import DomainControlCenterSsoRequest + from ._models import DomainOwnershipIdentifier + from ._models import DomainPatchResource + from ._models import DomainPurchaseConsent + from ._models import DomainRecommendationSearchParameters + from ._models import EnabledConfig + from ._models import EndpointDependency + from ._models import EndpointDetail + from ._models import ErrorEntity + from ._models import Experiments + from ._models import ExtendedLocation + from ._models import Facebook + from ._models import FileSystemApplicationLogsConfig + from ._models import FileSystemHttpLogsConfig + from ._models import FileSystemTokenStore + from ._models import ForwardProxy + from ._models import FrontEndConfiguration + from ._models import FunctionAppMajorVersion + from ._models import FunctionAppMinorVersion + from ._models import FunctionAppRuntimes + from ._models import FunctionAppRuntimeSettings + from ._models import FunctionAppStack + from ._models import FunctionEnvelope + from ._models import FunctionSecrets + from ._models import GeoRegion + from ._models import GitHub + from ._models import GitHubActionCodeConfiguration + from ._models import GitHubActionConfiguration + from ._models import GitHubActionContainerConfiguration + from ._models import GitHubActionWebAppStackSettings + from ._models import GlobalCsmSkuDescription + from ._models import GlobalValidation + from ._models import Google + from ._models import HandlerMapping + from ._models import HostingEnvironmentDeploymentInfo + from ._models import HostingEnvironmentDiagnostics + from ._models import HostingEnvironmentProfile + from ._models import HostKeys + from ._models import HostName + from ._models import HostNameBinding + from ._models import HostNameSslState + from ._models import HttpLogsConfig + from ._models import HttpSettings + from ._models import HttpSettingsRoutes + from ._models import HybridConnection + from ._models import HybridConnectionKey + from ._models import HybridConnectionLimits + from ._models import Identifier + from ._models import IdentityProviders + from ._models import InboundEnvironmentEndpoint + from ._models import IpSecurityRestriction + from ._models import JwtClaimChecks + from ._models import KeyInfo + from ._models import KeyValuePairStringObject + from ._models import KubeEnvironment + from ._models import KubeEnvironmentProfile + from ._models import LegacyMicrosoftAccount + from ._models import LinuxJavaContainerSettings + from ._models import LocalizableString + from ._models import LogAnalyticsConfiguration + from ._models import Login + from ._models import LoginRoutes + from ._models import LoginScopes + from ._models import LogSpecification + from ._models import ManagedServiceIdentity + from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models import MetricAvailability + from ._models import MetricSpecification + from ._models import MigrateMySqlRequest + from ._models import MigrateMySqlStatus + from ._models import MSDeploy + from ._models import MSDeployLog + from ._models import MSDeployLogEntry + from ._models import MSDeployStatus + from ._models import NameIdentifier + from ._models import NameValuePair + from ._models import NetworkFeatures + from ._models import NetworkTrace + from ._models import Nonce + from ._models import OpenIdConnectClientCredential + from ._models import OpenIdConnectConfig + from ._models import OpenIdConnectLogin + from ._models import OpenIdConnectRegistration + from ._models import Operation + from ._models import OutboundEnvironmentEndpoint + from ._models import PerfMonResponse + from ._models import PerfMonSample + from ._models import PerfMonSet + from ._models import PremierAddOn + from ._models import PremierAddOnOffer + from ._models import PremierAddOnPatchResource + from ._models import PrivateAccess + from ._models import PrivateAccessSubnet + from ._models import PrivateAccessVirtualNetwork + from ._models import PrivateLinkConnectionApprovalRequestResource + from ._models import PrivateLinkConnectionState + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceProperties + from ._models import PrivateLinkResourcesWrapper + from ._models import ProcessInfo + from ._models import ProcessModuleInfo + from ._models import ProcessThreadInfo + from ._models import ProxyOnlyResource + from ._models import PublicCertificate + from ._models import PushSettings + from ._models import QueryUtterancesResult + from ._models import QueryUtterancesResults + from ._models import RampUpRule + from ._models import Recommendation + from ._models import RecommendationRule + from ._models import ReissueCertificateOrderRequest + from ._models import RelayServiceConnectionEntity + from ._models import RemotePrivateEndpointConnectionARMResource + from ._models import Rendering + from ._models import RenewCertificateOrderRequest + from ._models import RequestsBasedTrigger + from ._models import Resource + from ._models import ResourceHealthMetadata + from ._models import ResourceMetricAvailability + from ._models import ResourceMetricDefinition + from ._models import ResourceNameAvailability + from ._models import ResourceNameAvailabilityRequest + from ._models import ResponseMetaData + from ._models import RestoreRequest + from ._models import SampleUtterance + from ._models import ServiceSpecification + from ._models import Site + from ._models import SiteAuthSettings + from ._models import SiteAuthSettingsV2 + from ._models import SiteCloneability + from ._models import SiteCloneabilityCriterion + from ._models import SiteConfig + from ._models import SiteConfigPropertiesDictionary + from ._models import SiteConfigResource + from ._models import SiteConfigurationSnapshotInfo + from ._models import SiteExtensionInfo + from ._models import SiteLimits + from ._models import SiteLogsConfig + from ._models import SiteMachineKey + from ._models import SitePatchResource + from ._models import SitePhpErrorLogFlag + from ._models import SiteSeal + from ._models import SiteSealRequest + from ._models import SiteSourceControl + from ._models import SkuCapacity + from ._models import SkuDescription + from ._models import SkuInfo + from ._models import SkuInfos + from ._models import SlotConfigNamesResource + from ._models import SlotDifference + from ._models import SlotSwapStatus + from ._models import SlowRequestsBasedTrigger + from ._models import Snapshot + from ._models import SnapshotRecoverySource + from ._models import SnapshotRestoreRequest + from ._models import Solution + from ._models import SourceControl + from ._models import StackMajorVersion + from ._models import StackMinorVersion + from ._models import StampCapacity + from ._models import StaticSiteARMResource + from ._models import StaticSiteBuildARMResource + from ._models import StaticSiteBuildProperties + from ._models import StaticSiteCustomDomainOverviewARMResource + from ._models import StaticSiteCustomDomainRequestPropertiesARMResource + from ._models import StaticSiteFunctionOverviewARMResource + from ._models import StaticSitePatchResource + from ._models import StaticSiteResetPropertiesARMResource + from ._models import StaticSitesWorkflowPreview + from ._models import StaticSitesWorkflowPreviewRequest + from ._models import StaticSiteTemplateOptions + from ._models import StaticSiteUserARMResource + from ._models import StaticSiteUserInvitationRequestResource + from ._models import StaticSiteUserInvitationResponseResource + from ._models import StaticSiteUserProvidedFunctionApp + from ._models import StaticSiteUserProvidedFunctionAppARMResource + from ._models import StaticSiteZipDeploymentARMResource + from ._models import Status + from ._models import StatusCodesBasedTrigger + from ._models import StatusCodesRangeBasedTrigger + from ._models import StorageMigrationOptions + from ._models import StorageMigrationResponse + from ._models import StringDictionary + from ._models import StringList + from ._models import SupportTopic + from ._models import SwiftVirtualNetwork + from ._models import TldLegalAgreement + from ._models import TokenStore + from ._models import TopLevelDomain + from ._models import TopLevelDomainAgreementOption + from ._models import TriggeredJobHistory + from ._models import TriggeredJobRun + from ._models import TriggeredWebJob + from ._models import Twitter + from ._models import TwitterRegistration + from ._models import Usage + from ._models import User + from ._models import ValidateRequest + from ._models import ValidateResponse + from ._models import ValidateResponseError + from ._models import VirtualApplication + from ._models import VirtualDirectory + from ._models import VirtualIPMapping + from ._models import VirtualNetworkProfile + from ._models import VnetGateway + from ._models import VnetInfo + from ._models import VnetParameters + from ._models import VnetRoute + from ._models import VnetValidationFailureDetails + from ._models import VnetValidationTestFailure + from ._models import WebAppCollection + from ._models import WebAppMajorVersion + from ._models import WebAppMinorVersion + from ._models import WebAppRuntimes + from ._models import WebAppRuntimeSettings + from ._models import WebAppStack + from ._models import WebJob + from ._models import WebSiteInstanceStatus + from ._models import WindowsJavaContainerSettings + from ._models import WorkerAppsConfiguration + from ._models import WorkerPoolResource +from ._paged_models import AnalysisDefinitionPaged +from ._paged_models import ApiKVReferencePaged +from ._paged_models import ApplicationStackResourcePaged +from ._paged_models import AppServiceCertificateOrderPaged +from ._paged_models import AppServiceCertificateResourcePaged +from ._paged_models import AppServiceEnvironmentResourcePaged +from ._paged_models import AppServicePlanPaged +from ._paged_models import BackupItemPaged +from ._paged_models import BillingMeterPaged +from ._paged_models import CertificatePaged +from ._paged_models import ContinuousWebJobPaged +from ._paged_models import CsmOperationDescriptionPaged +from ._paged_models import CsmUsageQuotaPaged +from ._paged_models import DeletedSitePaged +from ._paged_models import DeploymentPaged +from ._paged_models import DetectorDefinitionPaged +from ._paged_models import DetectorResponsePaged +from ._paged_models import DiagnosticCategoryPaged +from ._paged_models import DomainOwnershipIdentifierPaged +from ._paged_models import DomainPaged +from ._paged_models import FunctionAppStackPaged +from ._paged_models import FunctionEnvelopePaged +from ._paged_models import GeoRegionPaged +from ._paged_models import HostNameBindingPaged +from ._paged_models import HybridConnectionPaged +from ._paged_models import IdentifierPaged +from ._paged_models import InboundEnvironmentEndpointPaged +from ._paged_models import KubeEnvironmentPaged +from ._paged_models import NameIdentifierPaged +from ._paged_models import OutboundEnvironmentEndpointPaged +from ._paged_models import PerfMonResponsePaged +from ._paged_models import PremierAddOnOfferPaged +from ._paged_models import ProcessInfoPaged +from ._paged_models import ProcessModuleInfoPaged +from ._paged_models import ProcessThreadInfoPaged +from ._paged_models import PublicCertificatePaged +from ._paged_models import RecommendationPaged +from ._paged_models import RemotePrivateEndpointConnectionARMResourcePaged +from ._paged_models import ResourceHealthMetadataPaged +from ._paged_models import ResourceMetricDefinitionPaged +from ._paged_models import SiteConfigResourcePaged +from ._paged_models import SiteConfigurationSnapshotInfoPaged +from ._paged_models import SiteExtensionInfoPaged +from ._paged_models import SitePaged +from ._paged_models import SkuInfoPaged +from ._paged_models import SlotDifferencePaged +from ._paged_models import SnapshotPaged +from ._paged_models import SourceControlPaged +from ._paged_models import StampCapacityPaged +from ._paged_models import StaticSiteARMResourcePaged +from ._paged_models import StaticSiteBuildARMResourcePaged +from ._paged_models import StaticSiteCustomDomainOverviewARMResourcePaged +from ._paged_models import StaticSiteFunctionOverviewARMResourcePaged +from ._paged_models import StaticSiteUserARMResourcePaged +from ._paged_models import StaticSiteUserProvidedFunctionAppARMResourcePaged +from ._paged_models import StrPaged +from ._paged_models import TldLegalAgreementPaged +from ._paged_models import TopLevelDomainPaged +from ._paged_models import TriggeredJobHistoryPaged +from ._paged_models import TriggeredWebJobPaged +from ._paged_models import UsagePaged +from ._paged_models import WebAppStackPaged +from ._paged_models import WebJobPaged +from ._paged_models import WebSiteInstanceStatusPaged +from ._paged_models import WorkerPoolResourcePaged +from ._web_site_management_client_enums import ( + KeyVaultSecretStatus, + CertificateProductType, + ProvisioningState, + CertificateOrderStatus, + CertificateOrderActionType, + RouteType, + InsightStatus, + RenderingType, + DetectorType, + ManagedServiceIdentityType, + IpFilterTag, + AutoHealActionType, + ConnectionStringType, + AzureStorageType, + AzureStorageState, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, + SupportedTlsVersions, + FtpsState, + SslState, + HostType, + UsageState, + SiteAvailabilityState, + ClientCertMode, + RedundancyMode, + StatusOptions, + DomainStatus, + AzureResourceType, + CustomHostNameDnsRecordType, + HostNameType, + DnsType, + DomainType, + HostingEnvironmentStatus, + LoadBalancingMode, + OperationStatus, + IssueType, + SolutionType, + StackPreferredOs, + ResourceScopeType, + NotificationLevel, + Channels, + AppServicePlanRestrictions, + InAvailabilityReasonType, + CheckNameResourceTypes, + ValidateResourceTypes, + ResolveStatus, + ConfigReferenceSource, + LogLevel, + BackupItemStatus, + DatabaseType, + FrequencyUnit, + ContinuousWebJobStatus, + WebJobType, + CookieExpirationConvention, + PublishingProfileFormat, + DnsVerificationTestResult, + ClientCredentialMethod, + ForwardProxyConvention, + UnauthenticatedClientActionV2, + MSDeployLogEntryType, + MSDeployProvisioningState, + MySqlMigrationType, + PublicCertificateLocation, + BackupRestoreOperationType, + UnauthenticatedClientAction, + BuiltInAuthenticationProvider, + CloneAbilityResult, + SiteExtensionType, + TriggeredWebJobStatus, + SiteRuntimeState, + BuildStatus, + CustomDomainStatus, + TriggerTypes, + ComputeModeOptions, + WorkerSizeOptions, + StorageType, + FrontEndServiceType, + KubeEnvironmentProvisioningState, + SkuName, +) + +__all__ = [ + 'AbnormalTimePeriod', + 'Address', + 'AddressResponse', + 'AllowedAudiencesValidation', + 'AnalysisData', + 'AnalysisDefinition', + 'ApiDefinitionInfo', + 'ApiKVReference', + 'ApiManagementConfig', + 'AppInsightsWebAppStackSettings', + 'Apple', + 'AppleRegistration', + 'ApplicationLogsConfig', + 'ApplicationStack', + 'ApplicationStackResource', + 'AppLogsConfiguration', + 'AppRegistration', + 'AppServiceCertificate', + 'AppServiceCertificateOrder', + 'AppServiceCertificateOrderPatchResource', + 'AppServiceCertificatePatchResource', + 'AppServiceCertificateResource', + 'AppServiceEnvironment', + 'AppServiceEnvironmentPatchResource', + 'AppServiceEnvironmentResource', + 'AppserviceGithubToken', + 'AppserviceGithubTokenRequest', + 'AppServicePlan', + 'AppServicePlanPatchResource', + 'ArcConfiguration', + 'ArmIdWrapper', + 'AseV3NetworkingConfiguration', + 'AuthPlatform', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'AzureActiveDirectory', + 'AzureActiveDirectoryLogin', + 'AzureActiveDirectoryRegistration', + 'AzureActiveDirectoryValidation', + 'AzureBlobStorageApplicationLogsConfig', + 'AzureBlobStorageHttpLogsConfig', + 'AzureStaticWebApps', + 'AzureStaticWebAppsRegistration', + 'AzureStorageInfoValue', + 'AzureStoragePropertyDictionaryResource', + 'AzureTableStorageApplicationLogsConfig', + 'BackupItem', + 'BackupRequest', + 'BackupSchedule', + 'BillingMeter', + 'BlobStorageTokenStore', + 'Capability', + 'Certificate', + 'CertificateDetails', + 'CertificateEmail', + 'CertificateOrderAction', + 'CertificateOrderContact', + 'CertificatePatchResource', + 'ClientRegistration', + 'CloningInfo', + 'ConnectionStringDictionary', + 'ConnStringInfo', + 'ConnStringValueTypePair', + 'Contact', + 'ContainerCpuStatistics', + 'ContainerCpuUsage', + 'ContainerInfo', + 'ContainerMemoryStatistics', + 'ContainerNetworkInterfaceStatistics', + 'ContainerThrottlingData', + 'ContinuousWebJob', + 'CookieExpiration', + 'CorsSettings', + 'CsmMoveResourceEnvelope', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'CsmPublishingCredentialsPoliciesCollection', + 'CsmPublishingCredentialsPoliciesEntity', + 'CsmPublishingProfileOptions', + 'CsmSlotEntity', + 'CsmUsageQuota', + 'CustomHostnameAnalysisResult', + 'CustomOpenIdConnectProvider', + 'DatabaseBackupSetting', + 'DataProviderMetadata', + 'DataSource', + 'DataTableResponseColumn', + 'DataTableResponseObject', + 'DefaultErrorResponse', 'DefaultErrorResponseException', + 'DefaultErrorResponseError', + 'DefaultErrorResponseErrorDetailsItem', + 'DeletedAppRestoreRequest', + 'DeletedSite', + 'Deployment', + 'DeploymentLocations', + 'DetectorAbnormalTimePeriod', + 'DetectorDefinition', + 'DetectorInfo', + 'DetectorResponse', + 'DiagnosticAnalysis', + 'DiagnosticCategory', + 'DiagnosticData', + 'DiagnosticDetectorResponse', + 'DiagnosticMetricSample', + 'DiagnosticMetricSet', + 'Dimension', + 'Domain', + 'DomainAvailabilityCheckResult', + 'DomainControlCenterSsoRequest', + 'DomainOwnershipIdentifier', + 'DomainPatchResource', + 'DomainPurchaseConsent', + 'DomainRecommendationSearchParameters', + 'EnabledConfig', + 'EndpointDependency', + 'EndpointDetail', + 'ErrorEntity', + 'Experiments', + 'ExtendedLocation', + 'Facebook', + 'FileSystemApplicationLogsConfig', + 'FileSystemHttpLogsConfig', + 'FileSystemTokenStore', + 'ForwardProxy', + 'FrontEndConfiguration', + 'FunctionAppMajorVersion', + 'FunctionAppMinorVersion', + 'FunctionAppRuntimes', + 'FunctionAppRuntimeSettings', + 'FunctionAppStack', + 'FunctionEnvelope', + 'FunctionSecrets', + 'GeoRegion', + 'GitHub', + 'GitHubActionCodeConfiguration', + 'GitHubActionConfiguration', + 'GitHubActionContainerConfiguration', + 'GitHubActionWebAppStackSettings', + 'GlobalCsmSkuDescription', + 'GlobalValidation', + 'Google', + 'HandlerMapping', + 'HostingEnvironmentDeploymentInfo', + 'HostingEnvironmentDiagnostics', + 'HostingEnvironmentProfile', + 'HostKeys', + 'HostName', + 'HostNameBinding', + 'HostNameSslState', + 'HttpLogsConfig', + 'HttpSettings', + 'HttpSettingsRoutes', + 'HybridConnection', + 'HybridConnectionKey', + 'HybridConnectionLimits', + 'Identifier', + 'IdentityProviders', + 'InboundEnvironmentEndpoint', + 'IpSecurityRestriction', + 'JwtClaimChecks', + 'KeyInfo', + 'KeyValuePairStringObject', + 'KubeEnvironment', + 'KubeEnvironmentProfile', + 'LegacyMicrosoftAccount', + 'LinuxJavaContainerSettings', + 'LocalizableString', + 'LogAnalyticsConfiguration', + 'Login', + 'LoginRoutes', + 'LoginScopes', + 'LogSpecification', + 'ManagedServiceIdentity', + 'ManagedServiceIdentityUserAssignedIdentitiesValue', + 'MetricAvailability', + 'MetricSpecification', + 'MigrateMySqlRequest', + 'MigrateMySqlStatus', + 'MSDeploy', + 'MSDeployLog', + 'MSDeployLogEntry', + 'MSDeployStatus', + 'NameIdentifier', + 'NameValuePair', + 'NetworkFeatures', + 'NetworkTrace', + 'Nonce', + 'OpenIdConnectClientCredential', + 'OpenIdConnectConfig', + 'OpenIdConnectLogin', + 'OpenIdConnectRegistration', + 'Operation', + 'OutboundEnvironmentEndpoint', + 'PerfMonResponse', + 'PerfMonSample', + 'PerfMonSet', + 'PremierAddOn', + 'PremierAddOnOffer', + 'PremierAddOnPatchResource', + 'PrivateAccess', + 'PrivateAccessSubnet', + 'PrivateAccessVirtualNetwork', + 'PrivateLinkConnectionApprovalRequestResource', + 'PrivateLinkConnectionState', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'PrivateLinkResourcesWrapper', + 'ProcessInfo', + 'ProcessModuleInfo', + 'ProcessThreadInfo', + 'ProxyOnlyResource', + 'PublicCertificate', + 'PushSettings', + 'QueryUtterancesResult', + 'QueryUtterancesResults', + 'RampUpRule', + 'Recommendation', + 'RecommendationRule', + 'ReissueCertificateOrderRequest', + 'RelayServiceConnectionEntity', + 'RemotePrivateEndpointConnectionARMResource', + 'Rendering', + 'RenewCertificateOrderRequest', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceHealthMetadata', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceNameAvailability', + 'ResourceNameAvailabilityRequest', + 'ResponseMetaData', + 'RestoreRequest', + 'SampleUtterance', + 'ServiceSpecification', + 'Site', + 'SiteAuthSettings', + 'SiteAuthSettingsV2', + 'SiteCloneability', + 'SiteCloneabilityCriterion', + 'SiteConfig', + 'SiteConfigPropertiesDictionary', + 'SiteConfigResource', + 'SiteConfigurationSnapshotInfo', + 'SiteExtensionInfo', + 'SiteLimits', + 'SiteLogsConfig', + 'SiteMachineKey', + 'SitePatchResource', + 'SitePhpErrorLogFlag', + 'SiteSeal', + 'SiteSealRequest', + 'SiteSourceControl', + 'SkuCapacity', + 'SkuDescription', + 'SkuInfo', + 'SkuInfos', + 'SlotConfigNamesResource', + 'SlotDifference', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'Snapshot', + 'SnapshotRecoverySource', + 'SnapshotRestoreRequest', + 'Solution', + 'SourceControl', + 'StackMajorVersion', + 'StackMinorVersion', + 'StampCapacity', + 'StaticSiteARMResource', + 'StaticSiteBuildARMResource', + 'StaticSiteBuildProperties', + 'StaticSiteCustomDomainOverviewARMResource', + 'StaticSiteCustomDomainRequestPropertiesARMResource', + 'StaticSiteFunctionOverviewARMResource', + 'StaticSitePatchResource', + 'StaticSiteResetPropertiesARMResource', + 'StaticSitesWorkflowPreview', + 'StaticSitesWorkflowPreviewRequest', + 'StaticSiteTemplateOptions', + 'StaticSiteUserARMResource', + 'StaticSiteUserInvitationRequestResource', + 'StaticSiteUserInvitationResponseResource', + 'StaticSiteUserProvidedFunctionApp', + 'StaticSiteUserProvidedFunctionAppARMResource', + 'StaticSiteZipDeploymentARMResource', + 'Status', + 'StatusCodesBasedTrigger', + 'StatusCodesRangeBasedTrigger', + 'StorageMigrationOptions', + 'StorageMigrationResponse', + 'StringDictionary', + 'StringList', + 'SupportTopic', + 'SwiftVirtualNetwork', + 'TldLegalAgreement', + 'TokenStore', + 'TopLevelDomain', + 'TopLevelDomainAgreementOption', + 'TriggeredJobHistory', + 'TriggeredJobRun', + 'TriggeredWebJob', + 'Twitter', + 'TwitterRegistration', + 'Usage', + 'User', + 'ValidateRequest', + 'ValidateResponse', + 'ValidateResponseError', + 'VirtualApplication', + 'VirtualDirectory', + 'VirtualIPMapping', + 'VirtualNetworkProfile', + 'VnetGateway', + 'VnetInfo', + 'VnetParameters', + 'VnetRoute', + 'VnetValidationFailureDetails', + 'VnetValidationTestFailure', + 'WebAppCollection', + 'WebAppMajorVersion', + 'WebAppMinorVersion', + 'WebAppRuntimes', + 'WebAppRuntimeSettings', + 'WebAppStack', + 'WebJob', + 'WebSiteInstanceStatus', + 'WindowsJavaContainerSettings', + 'WorkerAppsConfiguration', + 'WorkerPoolResource', + 'AppServiceCertificateOrderPaged', + 'AppServiceCertificateResourcePaged', + 'DetectorResponsePaged', + 'CsmOperationDescriptionPaged', + 'DomainPaged', + 'NameIdentifierPaged', + 'DomainOwnershipIdentifierPaged', + 'TopLevelDomainPaged', + 'TldLegalAgreementPaged', + 'CertificatePaged', + 'DeletedSitePaged', + 'DiagnosticCategoryPaged', + 'AnalysisDefinitionPaged', + 'DetectorDefinitionPaged', + 'ApplicationStackResourcePaged', + 'FunctionAppStackPaged', + 'WebAppStackPaged', + 'RecommendationPaged', + 'SourceControlPaged', + 'BillingMeterPaged', + 'GeoRegionPaged', + 'IdentifierPaged', + 'PremierAddOnOfferPaged', + 'SitePaged', + 'BackupItemPaged', + 'SiteConfigResourcePaged', + 'ApiKVReferencePaged', + 'SiteConfigurationSnapshotInfoPaged', + 'ContinuousWebJobPaged', + 'DeploymentPaged', + 'FunctionEnvelopePaged', + 'HostNameBindingPaged', + 'WebSiteInstanceStatusPaged', + 'ProcessInfoPaged', + 'ProcessModuleInfoPaged', + 'ProcessThreadInfoPaged', + 'PerfMonResponsePaged', + 'RemotePrivateEndpointConnectionARMResourcePaged', + 'PublicCertificatePaged', + 'SiteExtensionInfoPaged', + 'SlotDifferencePaged', + 'SnapshotPaged', + 'TriggeredWebJobPaged', + 'TriggeredJobHistoryPaged', + 'CsmUsageQuotaPaged', + 'WebJobPaged', + 'StaticSiteARMResourcePaged', + 'StaticSiteUserARMResourcePaged', + 'StaticSiteBuildARMResourcePaged', + 'StaticSiteFunctionOverviewARMResourcePaged', + 'StaticSiteUserProvidedFunctionAppARMResourcePaged', + 'StaticSiteCustomDomainOverviewARMResourcePaged', + 'AppServiceEnvironmentResourcePaged', + 'StampCapacityPaged', + 'InboundEnvironmentEndpointPaged', + 'WorkerPoolResourcePaged', + 'ResourceMetricDefinitionPaged', + 'SkuInfoPaged', + 'UsagePaged', + 'OutboundEnvironmentEndpointPaged', + 'AppServicePlanPaged', + 'StrPaged', + 'HybridConnectionPaged', + 'ResourceHealthMetadataPaged', + 'KubeEnvironmentPaged', + 'KeyVaultSecretStatus', + 'CertificateProductType', + 'ProvisioningState', + 'CertificateOrderStatus', + 'CertificateOrderActionType', + 'RouteType', + 'InsightStatus', + 'RenderingType', + 'DetectorType', + 'ManagedServiceIdentityType', + 'IpFilterTag', + 'AutoHealActionType', + 'ConnectionStringType', + 'AzureStorageType', + 'AzureStorageState', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', + 'SupportedTlsVersions', + 'FtpsState', + 'SslState', + 'HostType', + 'UsageState', + 'SiteAvailabilityState', + 'ClientCertMode', + 'RedundancyMode', + 'StatusOptions', + 'DomainStatus', + 'AzureResourceType', + 'CustomHostNameDnsRecordType', + 'HostNameType', + 'DnsType', + 'DomainType', + 'HostingEnvironmentStatus', + 'LoadBalancingMode', + 'OperationStatus', + 'IssueType', + 'SolutionType', + 'StackPreferredOs', + 'ResourceScopeType', + 'NotificationLevel', + 'Channels', + 'AppServicePlanRestrictions', + 'InAvailabilityReasonType', + 'CheckNameResourceTypes', + 'ValidateResourceTypes', + 'ResolveStatus', + 'ConfigReferenceSource', + 'LogLevel', + 'BackupItemStatus', + 'DatabaseType', + 'FrequencyUnit', + 'ContinuousWebJobStatus', + 'WebJobType', + 'CookieExpirationConvention', + 'PublishingProfileFormat', + 'DnsVerificationTestResult', + 'ClientCredentialMethod', + 'ForwardProxyConvention', + 'UnauthenticatedClientActionV2', + 'MSDeployLogEntryType', + 'MSDeployProvisioningState', + 'MySqlMigrationType', + 'PublicCertificateLocation', + 'BackupRestoreOperationType', + 'UnauthenticatedClientAction', + 'BuiltInAuthenticationProvider', + 'CloneAbilityResult', + 'SiteExtensionType', + 'TriggeredWebJobStatus', + 'SiteRuntimeState', + 'BuildStatus', + 'CustomDomainStatus', + 'TriggerTypes', + 'ComputeModeOptions', + 'WorkerSizeOptions', + 'StorageType', + 'FrontEndServiceType', + 'KubeEnvironmentProvisioningState', + 'SkuName', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py new file mode 100644 index 00000000000..e13ccf6571e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py @@ -0,0 +1,16860 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: 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(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.get('address1', None) + self.address2 = kwargs.get('address2', None) + self.city = kwargs.get('city', None) + self.country = kwargs.get('country', None) + self.postal_code = kwargs.get('postal_code', None) + self.state = kwargs.get('state', None) + + +class ProxyOnlyResource(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(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(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: + :type identity_type: + ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :param details: + :type details: str + :param source: Possible values include: 'KeyVault' + :type source: str or + ~azure.mgmt.web.v2020_12_01.models.ConfigReferenceSource + :param active_version: + :type active_version: 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'}, + 'reference': {'key': 'properties.reference', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'ResolveStatus'}, + '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': 'ConfigReferenceSource'}, + 'active_version': {'key': 'properties.activeVersion', 'type': 'str'}, + } + + 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.source = kwargs.get('source', None) + self.active_version = kwargs.get('active_version', None) + + +class ApiManagementConfig(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(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: true if remote Application Insights is + supported for the stack; otherwise, false. + :vartype is_supported: bool + :ivar is_default_off: true if Application Insights is + disabled by default for the stack; otherwise, 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(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(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: true if this is the stack is + deprecated; otherwise, 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 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 application_stack_resource_name: Application stack name. + :type application_stack_resource_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: true if this is the stack is + deprecated; otherwise, 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'}, + 'application_stack_resource_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.application_stack_resource_name = kwargs.get('application_stack_resource_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 AppLogsConfiguration(Model): + """AppLogsConfiguration. + + :param destination: + :type destination: str + :param log_analytics_configuration: + :type log_analytics_configuration: + ~azure.mgmt.web.v2020_12_01.models.LogAnalyticsConfiguration + """ + + _attribute_map = { + 'destination': {'key': 'destination', 'type': 'str'}, + 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, + } + + def __init__(self, **kwargs): + super(AppLogsConfiguration, self).__init__(**kwargs) + self.destination = kwargs.get('destination', None) + self.log_analytics_configuration = kwargs.get('log_analytics_configuration', 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(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': 'KeyVaultSecretStatus'}, + } + + 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 Resource(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: 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.get('location', None) + 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: 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). Default value: 1 + . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_12_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: 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}, + 'product_type': {'required': 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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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 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. + + 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 + :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). Default value: 1 + . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_12_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: 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}, + 'product_type': {'required': 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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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': 'KeyVaultSecretStatus'}, + } + + 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: 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': 'KeyVaultSecretStatus'}, + } + + 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(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: true if the App Service Environment is + suspended; otherwise, 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': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + '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.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 AppServiceEnvironmentPatchResource(ProxyOnlyResource): + """ARM resource for a 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 id: Resource Id. + :vartype 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: 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: true if the App Service Environment is + suspended; otherwise, 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}, + '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 = { + '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': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + '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: 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: 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: true if the App Service Environment is + suspended; otherwise, 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}, + '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 = { + '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': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + '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(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(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.get('code', None) + self.state = kwargs.get('state', None) + + +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: Resource tags. + :type tags: dict[str, 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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + :param sku: + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(AppServicePlan, 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) + self.sku = kwargs.get('sku', 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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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': 'StatusOptions'}, + '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': 'ProvisioningState'}, + '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 ArcConfiguration(Model): + """ArcConfiguration. + + :param artifacts_storage_type: Possible values include: 'LocalNode', + 'NetworkFileSystem' + :type artifacts_storage_type: str or + ~azure.mgmt.web.v2020_12_01.models.StorageType + :param artifact_storage_class_name: + :type artifact_storage_class_name: str + :param artifact_storage_mount_path: + :type artifact_storage_mount_path: str + :param artifact_storage_node_name: + :type artifact_storage_node_name: str + :param artifact_storage_access_mode: + :type artifact_storage_access_mode: str + :param front_end_service_configuration: + :type front_end_service_configuration: + ~azure.mgmt.web.v2020_12_01.models.FrontEndConfiguration + :param kube_config: + :type kube_config: str + """ + + _attribute_map = { + 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, + 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, + 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, + 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, + 'artifact_storage_access_mode': {'key': 'artifactStorageAccessMode', 'type': 'str'}, + 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, + 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArcConfiguration, self).__init__(**kwargs) + self.artifacts_storage_type = kwargs.get('artifacts_storage_type', None) + self.artifact_storage_class_name = kwargs.get('artifact_storage_class_name', None) + self.artifact_storage_mount_path = kwargs.get('artifact_storage_mount_path', None) + self.artifact_storage_node_name = kwargs.get('artifact_storage_node_name', None) + self.artifact_storage_access_mode = kwargs.get('artifact_storage_access_mode', None) + self.front_end_service_configuration = kwargs.get('front_end_service_configuration', None) + self.kube_config = kwargs.get('kube_config', None) + + +class ArmIdWrapper(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(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': 'AutoHealActionType'}, + '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(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(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(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(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': 'LogLevel'}, + '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(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(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': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + 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(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': 'LogLevel'}, + '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.get('sas_url', None) + + +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 backup_item_name: Name of this backup. + :vartype backup_item_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 + :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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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.backup_item_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 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. + + 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 + :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: Required. 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}, + 'storage_account_url': {'required': 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(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). Default value: 7 . + :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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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 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(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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: 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': 'KeyVaultSecretStatus'}, + '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 CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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 + """ + + _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 + """ + + _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': 'CertificateOrderActionType'}, + '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(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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: 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': 'KeyVaultSecretStatus'}, + '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(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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.get('source_web_app_id', None) + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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(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': 'ConnectionStringType'}, + } + + 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(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': 'ConnectionStringType'}, + } + + def __init__(self, **kwargs): + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) + + +class Contact(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.get('email', None) + self.fax = kwargs.get('fax', None) + self.job_title = kwargs.get('job_title', None) + self.name_first = kwargs.get('name_first', None) + self.name_last = kwargs.get('name_last', None) + self.name_middle = kwargs.get('name_middle', None) + self.organization = kwargs.get('organization', None) + self.phone = kwargs.get('phone', None) + + +class ContainerCpuStatistics(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(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(Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: datetime + :param previous_time_stamp: + :type previous_time_stamp: 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(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(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(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': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + '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 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': 'CookieExpirationConvention'}, + '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(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(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 CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2020_12_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :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(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :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(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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param ftp: Required. Whether FTP is allowed. + :type ftp: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Required. 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}, + 'ftp': {'required': True}, + 'scm': {'required': 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param allow: Required. true to allow access to a publishing + method; otherwise, false. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allow': {'required': 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(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(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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.get('target_slot', None) + self.preserve_vnet = kwargs.get('preserve_vnet', None) + + +class CsmUsageQuota(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 + :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 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: true if hostname is + already verified; otherwise, 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: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_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_cname_records = kwargs.get('alternate_cname_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(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.get('database_type', None) + 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(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(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(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(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(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 DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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(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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_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.deleted_site_kind = None + self.geo_region_name = 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 + :param end_time: End time. + :type end_time: 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 DeploymentLocations(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(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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': 'IssueType'}, + '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(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': 'DetectorType'}, + '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 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 + :param end_time: End time of the period + :type end_time: 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 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 DiagnosticData(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 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 + :param end_time: End time of the period + :type end_time: 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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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(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 + :param end_time: End time of the period + :type end_time: 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(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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_tech: Required. 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: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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: Required. 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] + :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}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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': 'DomainType'}, + } + + 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 DomainControlCenterSsoRequest(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 DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_tech: Required. 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: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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: Required. 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] + :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}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + '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(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 + 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 + """ + + _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(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(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(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(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(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(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 ExtendedLocation(Model): + """ExtendedLocation. + + :param custom_location: + :type custom_location: str + """ + + _attribute_map = { + 'custom_location': {'key': 'customLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExtendedLocation, self).__init__(**kwargs) + self.custom_location = kwargs.get('custom_location', 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(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, **kwargs): + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', "Off") + + +class FileSystemHttpLogsConfig(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': 'ForwardProxyConvention'}, + '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 FrontEndConfiguration(Model): + """FrontEndConfiguration. + + :param kind: Possible values include: 'NodePort', 'LoadBalancer' + :type kind: str or ~azure.mgmt.web.v2020_12_01.models.FrontEndServiceType + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, + } + + def __init__(self, **kwargs): + super(FrontEndConfiguration, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class FunctionAppMajorVersion(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(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(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(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: true if remote debugging is + supported for the stack; otherwise, 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: true if the stack is in preview; otherwise, + false. + :vartype is_preview: bool + :ivar is_deprecated: true if the stack is deprecated; + otherwise, false. + :vartype is_deprecated: bool + :ivar is_hidden: true if the stack should be hidden; + otherwise, false. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: datetime + :ivar is_auto_update: true if the stack version is + auto-updated; otherwise, false. + :vartype is_auto_update: bool + :ivar is_early_access: true if the minor version is + early-access; otherwise, false. + :vartype is_early_access: bool + :ivar is_default: true if the minor version the default; + otherwise, 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': 'StackPreferredOs'}, + } + + 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 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 FunctionSecrets(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 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(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(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(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(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: true if GitHub Actions is supported for + the stack; otherwise, 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(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': 'UnauthenticatedClientActionV2'}, + '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(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(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(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(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(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(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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + 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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + '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 HostNameSslState(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 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': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + 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(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 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 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: + :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(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 IpSecurityRestriction(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(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(Model): + """KeyValuePairStringObject. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key: + :vartype key: str + :ivar value: + :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 KubeEnvironment(Resource): + """A Kubernetes cluster specialized for web workloads by Azure App Service. + + 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: Resource tags. + :type tags: dict[str, str] + :param kube_environment_type: Type of the Kubernetes Environment. + Only Set for WorkerApps as Managed + :type kube_environment_type: str + :param extended_location: + :type extended_location: + ~azure.mgmt.web.v2020_12_01.models.ExtendedLocation + :ivar provisioning_state: Provisioning state of the Kubernetes + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Waiting', 'InitializationInProgress', 'InfrastructureSetupInProgress', + 'InfrastructureSetupComplete', 'ScheduledForDelete', 'UpgradeRequested', + 'UpgradeFailed', 'AKSProvisionComplete' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProvisioningState + :ivar deployment_errors: Any errors that occurred during deployment or + deployment validation + :vartype deployment_errors: str + :param internal_load_balancer_enabled: Only visible within Vnet/Subnet + :type internal_load_balancer_enabled: bool + :ivar default_domain: Default Domain Name for the cluster + :vartype default_domain: str + :param static_ip: Static IP of the KubeEnvironment + :type static_ip: str + :param arc_configuration: Cluster configuration which determines the ARC + cluster + components types. Eg: Choosing between BuildService kind, + FrontEnd Service ArtifactsStorageType etc. + :type arc_configuration: + ~azure.mgmt.web.v2020_12_01.models.ArcConfiguration + :param app_logs_configuration: Cluster configuration which enables the log + daemon to export + app logs to a destination. Currently only "log-analytics" is + supported + :type app_logs_configuration: + ~azure.mgmt.web.v2020_12_01.models.AppLogsConfiguration + :param worker_apps_configuration: Cluster configuration which enables + users to create Worker Apps + enabled dedicated Kube Environments + :type worker_apps_configuration: + ~azure.mgmt.web.v2020_12_01.models.WorkerAppsConfiguration + :param aks_resource_id: + :type aks_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'deployment_errors': {'readonly': True}, + 'default_domain': {'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}'}, + 'kube_environment_type': {'key': 'properties.type', 'type': 'str'}, + 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KubeEnvironmentProvisioningState'}, + 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, + 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, + 'default_domain': {'key': 'properties.defaultDomain', 'type': 'str'}, + 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, + 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, + 'app_logs_configuration': {'key': 'properties.appLogsConfiguration', 'type': 'AppLogsConfiguration'}, + 'worker_apps_configuration': {'key': 'properties.workerAppsConfiguration', 'type': 'WorkerAppsConfiguration'}, + 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubeEnvironment, self).__init__(**kwargs) + self.kube_environment_type = kwargs.get('kube_environment_type', None) + self.extended_location = kwargs.get('extended_location', None) + self.provisioning_state = None + self.deployment_errors = None + self.internal_load_balancer_enabled = kwargs.get('internal_load_balancer_enabled', None) + self.default_domain = None + self.static_ip = kwargs.get('static_ip', None) + self.arc_configuration = kwargs.get('arc_configuration', None) + self.app_logs_configuration = kwargs.get('app_logs_configuration', None) + self.worker_apps_configuration = kwargs.get('worker_apps_configuration', None) + self.aks_resource_id = kwargs.get('aks_resource_id', None) + + +class KubeEnvironmentProfile(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(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: true if the stack is in preview; otherwise, + false. + :vartype is_preview: bool + :ivar is_deprecated: true if the stack is deprecated; + otherwise, false. + :vartype is_deprecated: bool + :ivar is_hidden: true if the stack should be hidden; + otherwise, false. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: datetime + :ivar is_auto_update: true if the stack version is + auto-updated; otherwise, false. + :vartype is_auto_update: bool + :ivar is_early_access: true if the minor version is + early-access; otherwise, 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(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 LogAnalyticsConfiguration(Model): + """LogAnalyticsConfiguration. + + :param customer_id: + :type customer_id: str + :param shared_key: + :type shared_key: str + """ + + _attribute_map = { + 'customer_id': {'key': 'customerId', 'type': 'str'}, + 'shared_key': {'key': 'sharedKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsConfiguration, self).__init__(**kwargs) + self.customer_id = kwargs.get('customer_id', None) + self.shared_key = kwargs.get('shared_key', 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(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(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.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailability(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(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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. 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}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + 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': 'OperationStatus'}, + '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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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(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 + :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': 'MSDeployLogEntryType'}, + '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 + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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(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 NameValuePair(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(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 + :param method: Possible values include: 'ClientSecretPost' + :type method: str or + ~azure.mgmt.web.v2020_12_01.models.ClientCredentialMethod + :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'}, + 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenIdConnectClientCredential, self).__init__(**kwargs) + self.method = kwargs.get('method', None) + 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(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 + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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(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 PerfMonResponse(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(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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(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 + :param end_time: End time of the period. + :type end_time: 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: 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: true if promotion code is + required; otherwise, 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': 'AppServicePlanRestrictions'}, + '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 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(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(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 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: + :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(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(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.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.properties = kwargs.get('properties', None) + + +class PrivateLinkResourceProperties(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(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.get('value', None) + + +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 + :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 + :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 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 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 + :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 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': 'PublicCertificateLocation'}, + '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 PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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(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(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(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + \\nMinReroutePercentage or + MaxReroutePercentage. Site metrics are checked every N + minutes specified in ChangeIntervalInMinutes.\\nCustom + decision algorithm + can be provided in TiPCallback site extension which URL can be specified + in 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 + :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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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 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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: + :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(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': 'RenderingType'}, + '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(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 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 ResourceMetricAvailability(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 ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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(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.get('name', None) + self.type = kwargs.get('type', None) + self.is_fqdn = kwargs.get('is_fqdn', None) + + +class ResponseMetaData(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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + '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(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(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: Resource tags. + :type tags: dict[str, str] + :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: true if the app is enabled; otherwise, + 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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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: true if the app is a default + container; otherwise, 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 + :param identity: + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + 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) + self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested + as part of GitHub Login authentication. + This setting is optional + :type git_hub_oauth_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_oauth_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_oauth_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': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes = kwargs.get('google_oauth_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_oauth_scopes = kwargs.get('facebook_oauth_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_oauth_scopes = kwargs.get('git_hub_oauth_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_oauth_scopes = kwargs.get('microsoft_account_oauth_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(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': 'CloneAbilityResult'}, + '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(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(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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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: true if Auto Heal is enabled; + otherwise, 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: true to enable local MySQL; + otherwise, false. Default value: 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. Default value: True . + :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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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(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: true if use32BitWorkerProcess + should be set to true for the stack; otherwise, 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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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: true if Auto Heal is enabled; + otherwise, 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: true to enable local MySQL; + otherwise, false. Default value: 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. Default value: True . + :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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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 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 + :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 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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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': 'SiteExtensionType'}, + '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 SiteLimits(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(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 + :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: true if the app is enabled; otherwise, + 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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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: true if the app is a default + container; otherwise, 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 + :param identity: + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + """ + + _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'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(SitePatchResource, self).__init__(**kwargs) + 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) + self.identity = kwargs.get('identity', 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(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.get('html', None) + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param is_git_hub_action: true if this is deployed via GitHub + action. + :type is_git_hub_action: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + 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(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(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(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 SkuInfos(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 SlotSwapStatus(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 + :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(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 SnapshotRecoverySource(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. + + 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 + :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: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': 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(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': 'SolutionType'}, + '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 + """ + + _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 StackMajorVersion(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: true if this is the default major version; + otherwise, 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: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool + :param app_settings_dictionary: + + + 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: + + + Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to + 0 + :type site_config_properties_dictionary: dict[str, object] + :param is_preview: true if this stack is in Preview, + otherwise false. + :type is_preview: bool + :param is_deprecated: true if this stack has been deprecated, + otherwise false. + :type is_deprecated: bool + :param is_hidden: true if this stack should be hidden for new + customers on portal, otherwise 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(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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(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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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 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: Resource tags. + :type tags: dict[str, 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] + :param sku: + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param identity: + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(StaticSiteARMResource, 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 + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', 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 + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: 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 StaticSiteBuildProperties(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 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 + :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 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. + Default value: "cname-delegation" . + :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 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(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 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 + :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 + """ + + _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 + """ + + _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 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(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': 'InsightStatus'}, + } + + 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(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(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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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(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(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.get('agreement_key', None) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) + self.url = kwargs.get('url', 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 true, then the top level domain supports + domain privacy; otherwise, 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(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + 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 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 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 + :param end_time: End time. + :type end_time: 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': 'TriggeredWebJobStatus'}, + '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': 'WebJobType'}, + '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 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 + :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': 'ComputeModeOptions'}, + '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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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(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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: 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.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + 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(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(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(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: true if preloading is enabled; + otherwise, 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(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(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(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.get('id', None) + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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: true if a resync is required; + otherwise, 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(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.get('value', None) + self.next_link = None + + +class WebAppMajorVersion(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(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(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(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: true if remote debugging is + supported for the stack; otherwise, 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: true if the stack is in preview; otherwise, + false. + :vartype is_preview: bool + :ivar is_deprecated: true if the stack is deprecated; + otherwise, false. + :vartype is_deprecated: bool + :ivar is_hidden: true if the stack should be hidden; + otherwise, false. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: datetime + :ivar is_auto_update: true if the stack version is + auto-updated; otherwise, false. + :vartype is_auto_update: bool + :ivar is_early_access: true if the minor version is + early-access; otherwise, 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': 'StackPreferredOs'}, + } + + 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 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': 'WebJobType'}, + '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 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: + :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': 'SiteRuntimeState'}, + '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(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: true if the stack is in preview; otherwise, + false. + :vartype is_preview: bool + :ivar is_deprecated: true if the stack is deprecated; + otherwise, false. + :vartype is_deprecated: bool + :ivar is_hidden: true if the stack should be hidden; + otherwise, false. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: datetime + :ivar is_auto_update: true if the stack version is + auto-updated; otherwise, false. + :vartype is_auto_update: bool + :ivar is_early_access: true if the minor version is + early-access; otherwise, 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 WorkerAppsConfiguration(Model): + """Configuration required deploy Kube Environment Dedicated + to Worker Apps. + Create request is not accepted, if ArcConfiguration or AksResourceId is + provided + with WorkerAppsConfiguration. + + :param subnet_resource_id: Service Principle Secret used to provision + WorkerApps Kube Environment + VnetResource + :type subnet_resource_id: str + """ + + _attribute_map = { + 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkerAppsConfiguration, self).__init__(**kwargs) + self.subnet_resource_id = kwargs.get('subnet_resource_id', 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 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] + :param sku: + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, **kwargs): + super(WorkerPoolResource, self).__init__(**kwargs) + 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 + self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py new file mode 100644 index 00000000000..9074741abde --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py @@ -0,0 +1,16860 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: 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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: + super(AbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.events = events + self.solutions = solutions + + +class Address(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: str=None, **kwargs) -> None: + 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(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: str=None, **kwargs) -> None: + 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: str=None, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: + 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: str=None, allowed_audiences=None, **kwargs) -> None: + super(AllowedAudiencesValidation, self).__init__(kind=kind, **kwargs) + self.allowed_audiences = allowed_audiences + + +class AnalysisData(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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) + self.description = None + + +class ApiDefinitionInfo(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: str=None, **kwargs) -> None: + 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: + :type identity_type: + ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :param details: + :type details: str + :param source: Possible values include: 'KeyVault' + :type source: str or + ~azure.mgmt.web.v2020_12_01.models.ConfigReferenceSource + :param active_version: + :type active_version: 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'}, + 'reference': {'key': 'properties.reference', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'ResolveStatus'}, + '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': 'ConfigReferenceSource'}, + 'active_version': {'key': 'properties.activeVersion', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, reference: str=None, status=None, vault_name: str=None, secret_name: str=None, secret_version: str=None, identity_type=None, details: str=None, source=None, active_version: str=None, **kwargs) -> None: + 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.source = source + self.active_version = active_version + + +class ApiManagementConfig(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: str=None, **kwargs) -> None: + super(ApiManagementConfig, self).__init__(**kwargs) + self.id = id + + +class AppInsightsWebAppStackSettings(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: true if remote Application Insights is + supported for the stack; otherwise, false. + :vartype is_supported: bool + :ivar is_default_off: true if Application Insights is + disabled by default for the stack; otherwise, 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) -> None: + 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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: + 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: str=None, client_id: str=None, client_secret_setting_name: str=None, **kwargs) -> None: + super(AppleRegistration, self).__init__(kind=kind, **kwargs) + self.client_id = client_id + self.client_secret_setting_name = client_secret_setting_name + + +class ApplicationLogsConfig(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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: + 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(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: true if this is the stack is + deprecated; otherwise, 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: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, is_deprecated=None, **kwargs) -> None: + 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 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 application_stack_resource_name: Application stack name. + :type application_stack_resource_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: true if this is the stack is + deprecated; otherwise, 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'}, + 'application_stack_resource_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: str=None, application_stack_resource_name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, is_deprecated=None, **kwargs) -> None: + super(ApplicationStackResource, self).__init__(kind=kind, **kwargs) + self.application_stack_resource_name = application_stack_resource_name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + self.is_deprecated = is_deprecated + + +class AppLogsConfiguration(Model): + """AppLogsConfiguration. + + :param destination: + :type destination: str + :param log_analytics_configuration: + :type log_analytics_configuration: + ~azure.mgmt.web.v2020_12_01.models.LogAnalyticsConfiguration + """ + + _attribute_map = { + 'destination': {'key': 'destination', 'type': 'str'}, + 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, + } + + def __init__(self, *, destination: str=None, log_analytics_configuration=None, **kwargs) -> None: + super(AppLogsConfiguration, self).__init__(**kwargs) + self.destination = destination + self.log_analytics_configuration = log_analytics_configuration + + +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: str=None, app_id: str=None, app_secret_setting_name: str=None, **kwargs) -> None: + super(AppRegistration, self).__init__(kind=kind, **kwargs) + self.app_id = app_id + self.app_secret_setting_name = app_secret_setting_name + + +class AppServiceCertificate(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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: + 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: 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). Default value: 1 + . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_12_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: 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}, + 'product_type': {'required': 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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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 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. + + 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 + :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). Default value: 1 + . + :type validity_in_years: int + :param key_size: Certificate key size. Default value: 2048 . + :type key_size: int + :param product_type: Required. Certificate product type. Possible values + include: 'StandardDomainValidatedSsl', + 'StandardDomainValidatedWildCardSsl' + :type product_type: str or + ~azure.mgmt.web.v2020_12_01.models.CertificateProductType + :param auto_renew: true if the certificate should be + automatically renewed when it expires; otherwise, false. + Default value: True . + :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 + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: datetime + :ivar is_private_key_external: true if private key is + external; otherwise, 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] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would + be auto renewed next + :vartype next_auto_renewal_time_stamp: 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}, + 'product_type': {'required': 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': 'CertificateProductType'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, + '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, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: + 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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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: 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': 'KeyVaultSecretStatus'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: + 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(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: true if the App Service Environment is + suspended; otherwise, 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': 'ProvisioningState'}, + 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, + '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, internal_load_balancing_mode=None, multi_size: str=None, ipssl_address_count: int=None, dns_suffix: str=None, front_end_scale_factor: int=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + 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 AppServiceEnvironmentPatchResource(ProxyOnlyResource): + """ARM resource for a 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 id: Resource Id. + :vartype 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: 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: true if the App Service Environment is + suspended; otherwise, 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}, + '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 = { + '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': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + '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, *, virtual_network, kind: str=None, internal_load_balancing_mode=None, multi_size: str=None, ipssl_address_count: int=None, dns_suffix: str=None, front_end_scale_factor: int=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + 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: 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: 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: true if the App Service Environment is + suspended; otherwise, 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}, + '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 = { + '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': 'ProvisioningState'}, + 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, + '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, virtual_network, kind: str=None, tags=None, internal_load_balancing_mode=None, multi_size: str=None, ipssl_address_count: int=None, dns_suffix: str=None, front_end_scale_factor: int=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + 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(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: str=None, scope: str=None, token_type: str=None, got_token: bool=None, error_message: str=None, **kwargs) -> None: + 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(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) -> None: + 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: Resource tags. + :type tags: dict[str, 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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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 + :param sku: + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + """ + + _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}'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, sku=None, **kwargs) -> None: + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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 + self.sku = sku + + +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 true, apps assigned to this App + Service plan can be scaled independently. + If false, apps assigned to this App Service plan will scale + to all instances of the plan. Default value: False . + :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 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 + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :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': 'StatusOptions'}, + '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': 'ProvisioningState'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + } + + def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, **kwargs) -> None: + 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 ArcConfiguration(Model): + """ArcConfiguration. + + :param artifacts_storage_type: Possible values include: 'LocalNode', + 'NetworkFileSystem' + :type artifacts_storage_type: str or + ~azure.mgmt.web.v2020_12_01.models.StorageType + :param artifact_storage_class_name: + :type artifact_storage_class_name: str + :param artifact_storage_mount_path: + :type artifact_storage_mount_path: str + :param artifact_storage_node_name: + :type artifact_storage_node_name: str + :param artifact_storage_access_mode: + :type artifact_storage_access_mode: str + :param front_end_service_configuration: + :type front_end_service_configuration: + ~azure.mgmt.web.v2020_12_01.models.FrontEndConfiguration + :param kube_config: + :type kube_config: str + """ + + _attribute_map = { + 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, + 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, + 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, + 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, + 'artifact_storage_access_mode': {'key': 'artifactStorageAccessMode', 'type': 'str'}, + 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, + 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, + } + + def __init__(self, *, artifacts_storage_type=None, artifact_storage_class_name: str=None, artifact_storage_mount_path: str=None, artifact_storage_node_name: str=None, artifact_storage_access_mode: str=None, front_end_service_configuration=None, kube_config: str=None, **kwargs) -> None: + super(ArcConfiguration, self).__init__(**kwargs) + self.artifacts_storage_type = artifacts_storage_type + self.artifact_storage_class_name = artifact_storage_class_name + self.artifact_storage_mount_path = artifact_storage_mount_path + self.artifact_storage_node_name = artifact_storage_node_name + self.artifact_storage_access_mode = artifact_storage_access_mode + self.front_end_service_configuration = front_end_service_configuration + self.kube_config = kube_config + + +class ArmIdWrapper(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) -> None: + 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: str=None, allow_new_private_endpoint_connections: bool=None, **kwargs) -> None: + 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: str=None, enabled: bool=None, runtime_version: str=None, config_file_path: str=None, **kwargs) -> None: + super(AuthPlatform, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_version + self.config_file_path = config_file_path + + +class AutoHealActions(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': 'AutoHealActionType'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: + 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(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: str=None, parameters: str=None, **kwargs) -> None: + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(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=None, actions=None, **kwargs) -> None: + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(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=None, private_bytes_in_kb: int=None, status_codes=None, status_codes_range=None, slow_requests=None, slow_requests_with_path=None, **kwargs) -> None: + 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: str=None, enabled: bool=None, registration=None, login=None, validation=None, is_auto_provisioned: bool=None, **kwargs) -> None: + 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: str=None, disable_www_authenticate: bool=None, login_parameters=None, **kwargs) -> None: + 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: str=None, open_id_issuer: str=None, client_id: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, **kwargs) -> None: + 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: str=None, jwt_claim_checks=None, allowed_audiences=None, **kwargs) -> None: + super(AzureActiveDirectoryValidation, self).__init__(kind=kind, **kwargs) + self.jwt_claim_checks = jwt_claim_checks + self.allowed_audiences = allowed_audiences + + +class AzureBlobStorageApplicationLogsConfig(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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + } + + def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: + super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + self.retention_in_days = retention_in_days + + +class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + 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: str=None, enabled: bool=None, registration=None, **kwargs) -> None: + 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: str=None, client_id: str=None, **kwargs) -> None: + super(AzureStaticWebAppsRegistration, self).__init__(kind=kind, **kwargs) + self.client_id = client_id + + +class AzureStorageInfoValue(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': 'AzureStorageType'}, + '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': 'AzureStorageState'}, + } + + def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: + 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: str=None, properties=None, **kwargs) -> None: + super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class AzureTableStorageApplicationLogsConfig(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': 'LogLevel'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: + 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 backup_item_name: Name of this backup. + :vartype backup_item_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 + :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 + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: 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}, + 'backup_item_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'}, + 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, + '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: str=None, **kwargs) -> None: + super(BackupItem, self).__init__(kind=kind, **kwargs) + self.backup_id = None + self.storage_account_url = None + self.blob_name = None + self.backup_item_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 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. + + 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 + :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: Required. 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}, + 'storage_account_url': {'required': 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, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: + 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(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). Default value: 7 . + :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. Default value: True . + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups + should be deleted. Default value: 30 . + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: 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': 'FrequencyUnit'}, + '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: + 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: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, multiplier: float=None, **kwargs) -> None: + 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 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: str=None, sas_url_setting_name: str=None, **kwargs) -> None: + super(BlobStorageTokenStore, self).__init__(kind=kind, **kwargs) + self.sas_url_setting_name = sas_url_setting_name + + +class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: + 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: 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: 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': 'KeyVaultSecretStatus'}, + '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: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, password: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, domain_validation_method: str=None, **kwargs) -> None: + 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 CertificateDetails(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 + :ivar not_after: Date Certificate is valid to. + :vartype not_after: 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) -> None: + 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 + """ + + _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: + 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 + """ + + _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': 'CertificateOrderActionType'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) + self.action_type = None + self.created_at = None + + +class CertificateOrderContact(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: str=None, name_first: str=None, name_last: str=None, phone: str=None, **kwargs) -> None: + 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 + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: 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': 'KeyVaultSecretStatus'}, + '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: str=None, host_names=None, pfx_blob: bytearray=None, password: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, domain_validation_method: str=None, **kwargs) -> None: + 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: str=None, client_id: str=None, client_secret_setting_name: str=None, **kwargs) -> None: + super(ClientRegistration, self).__init__(kind=kind, **kwargs) + self.client_id = client_id + self.client_secret_setting_name = client_secret_setting_name + + +class CloningInfo(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: true to overwrite destination app; + otherwise, false. + :type overwrite: bool + :param clone_custom_host_names: true to clone custom + hostnames from source app; otherwise, false. + :type clone_custom_host_names: bool + :param clone_source_control: true to clone source control + from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: + 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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: str=None, properties=None, **kwargs) -> None: + super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class ConnStringInfo(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': 'ConnectionStringType'}, + } + + def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class ConnStringValueTypePair(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': 'ConnectionStringType'}, + } + + def __init__(self, *, value: str, type, **kwargs) -> None: + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = value + self.type = type + + +class Contact(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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: + 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(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=None, system_cpu_usage: int=None, online_cpu_count: int=None, throttling_data=None, **kwargs) -> None: + 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(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: int=None, per_cpu_usage=None, kernel_mode_usage: int=None, user_mode_usage: int=None, **kwargs) -> None: + 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(Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: datetime + :param previous_time_stamp: + :type previous_time_stamp: 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=None, previous_time_stamp=None, current_cpu_stats=None, previous_cpu_stats=None, memory_stats=None, name: str=None, id: str=None, eth0=None, **kwargs) -> None: + 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(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: int=None, max_usage: int=None, limit: int=None, **kwargs) -> None: + super(ContainerMemoryStatistics, self).__init__(**kwargs) + self.usage = usage + self.max_usage = max_usage + self.limit = limit + + +class ContainerNetworkInterfaceStatistics(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: int=None, rx_packets: int=None, rx_errors: int=None, rx_dropped: int=None, tx_bytes: int=None, tx_packets: int=None, tx_errors: int=None, tx_dropped: int=None, **kwargs) -> None: + 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(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: int=None, throttled_periods: int=None, throttled_time: int=None, **kwargs) -> None: + 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': 'ContinuousWebJobStatus'}, + '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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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': 'CookieExpirationConvention'}, + 'time_to_expiration': {'key': 'properties.timeToExpiration', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, convention=None, time_to_expiration: str=None, **kwargs) -> None: + super(CookieExpiration, self).__init__(kind=kind, **kwargs) + self.convention = convention + self.time_to_expiration = time_to_expiration + + +class CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.support_credentials = support_credentials + + +class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: + super(CsmMoveResourceEnvelope, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class CsmOperationDescription(Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.web.v2020_12_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: + :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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: + :type service_specification: + ~azure.mgmt.web.v2020_12_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param ftp: Required. Whether FTP is allowed. + :type ftp: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Required. 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}, + 'ftp': {'required': True}, + 'scm': {'required': 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, *, ftp, scm, kind: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param allow: Required. true to allow access to a publishing + method; otherwise, false. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allow': {'required': 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, *, allow: bool, kind: str=None, **kwargs) -> None: + super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, **kwargs) + self.allow = allow + + +class CsmPublishingProfileOptions(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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = format + self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints + + +class CsmSlotEntity(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. true to preserve Virtual + Network to the slot during swap; otherwise, 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) -> None: + super(CsmSlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.preserve_vnet = preserve_vnet + + +class CsmUsageQuota(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 + :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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + 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 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: true if hostname is + already verified; otherwise, 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: true if there is a conflict + on a scale unit; otherwise, false. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: true if there is a + conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see + for this hostname. + :type alternate_cname_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': 'DnsVerificationTestResult'}, + '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, + 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: + 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_cname_records = alternate_cname_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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: + super(CustomOpenIdConnectProvider, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class DatabaseBackupSetting(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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: + 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(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: str=None, **kwargs) -> None: + super(DataProviderMetadata, self).__init__(**kwargs) + self.provider_name = provider_name + self.property_bag = None + + +class DataSource(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=None, data_source_uri=None, **kwargs) -> None: + super(DataSource, self).__init__(**kwargs) + self.instructions = instructions + self.data_source_uri = data_source_uri + + +class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: + super(DataTableResponseColumn, self).__init__(**kwargs) + self.column_name = column_name + self.data_type = data_type + self.column_type = column_type + + +class DataTableResponseObject(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: str=None, columns=None, rows=None, **kwargs) -> None: + super(DataTableResponseObject, self).__init__(**kwargs) + self.table_name = table_name + self.columns = columns + self.rows = rows + + +class DefaultErrorResponse(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) -> None: + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DefaultErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) + + +class DefaultErrorResponseError(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=None, **kwargs) -> None: + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(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) -> None: + 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: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: + 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 deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_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}, + 'deleted_site_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'}, + 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, + 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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.deleted_site_kind = None + self.geo_region_name = 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 + :param end_time: End time. + :type end_time: 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: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: + 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 DeploymentLocations(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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: + super(DeploymentLocations, self).__init__(**kwargs) + self.locations = locations + self.hosting_environments = hosting_environments + self.hosting_environment_deployment_infos = hosting_environment_deployment_infos + + +class DetectorAbnormalTimePeriod(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event + :type start_time: datetime + :param end_time: End time of the correlated event + :type end_time: 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': 'IssueType'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(DetectorDefinition, self).__init__(kind=kind, **kwargs) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None + + +class DetectorInfo(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': 'DetectorType'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + 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: str=None, metadata=None, dataset=None, status=None, data_providers_metadata=None, suggested_utterances=None, **kwargs) -> None: + 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 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 + :param end_time: End time of the period + :type end_time: 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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) + self.description = None + + +class DiagnosticData(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=None, rendering_properties=None, **kwargs) -> None: + super(DiagnosticData, self).__init__(**kwargs) + self.table = table + self.rendering_properties = rendering_properties + + +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 + :param end_time: End time of the period + :type end_time: 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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: + 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(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: + 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(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 + :param end_time: End time of the period + :type end_time: 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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_tech: Required. 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: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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: Required. 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] + :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}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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(Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: true if domain can be purchased using + CreateDomain API; otherwise, 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': 'DomainType'}, + } + + def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: + super(DomainAvailabilityCheckResult, self).__init__(**kwargs) + self.name = name + self.available = available + self.domain_type = domain_type + + +class DomainControlCenterSsoRequest(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) -> None: + 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: str=None, ownership_id: str=None, **kwargs) -> None: + super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) + self.ownership_id = ownership_id + + +class DomainPatchResource(ProxyOnlyResource): + """ARM resource for 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 + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Required. Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_billing: Required. Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_registrant: Required. Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_tech: Required. 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: true if domain privacy is enabled for this + domain; otherwise, false. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: datetime + :param auto_renew: true if the domain should be automatically + renewed; otherwise, false. Default value: True . + :type auto_renew: bool + :ivar ready_for_dns_record_management: true if Azure can + assign this domain to App Service apps; otherwise, false. + This value will be 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: Required. 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] + :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}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': 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}, + 'consent': {'required': 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': 'DomainStatus'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + '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': 'DnsType'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: + 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(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 + 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 + """ + + _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: + super(DomainPurchaseConsent, self).__init__(**kwargs) + self.agreement_keys = agreement_keys + self.agreed_by = agreed_by + self.agreed_at = agreed_at + + +class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: + super(DomainRecommendationSearchParameters, self).__init__(**kwargs) + self.keywords = keywords + self.max_domain_recommendations = max_domain_recommendations + + +class EnabledConfig(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: bool=None, **kwargs) -> None: + super(EnabledConfig, self).__init__(**kwargs) + self.enabled = enabled + + +class EndpointDependency(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: str=None, endpoint_details=None, **kwargs) -> None: + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(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: str=None, port: int=None, latency: float=None, is_accessible: bool=None, **kwargs) -> None: + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.latency = latency + self.is_accessible = is_accessible + + +class ErrorEntity(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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: + 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(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=None, **kwargs) -> None: + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class ExtendedLocation(Model): + """ExtendedLocation. + + :param custom_location: + :type custom_location: str + """ + + _attribute_map = { + 'custom_location': {'key': 'customLocation', 'type': 'str'}, + } + + def __init__(self, *, custom_location: str=None, **kwargs) -> None: + super(ExtendedLocation, self).__init__(**kwargs) + self.custom_location = custom_location + + +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: str=None, enabled: bool=None, registration=None, graph_api_version: str=None, login=None, **kwargs) -> None: + 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(Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: 'Off', 'Verbose', + 'Information', 'Warning', 'Error'. Default value: "Off" . + :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'LogLevel'}, + } + + def __init__(self, *, level="Off", **kwargs) -> None: + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + + +class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: + 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: str=None, directory: str=None, **kwargs) -> None: + 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': 'ForwardProxyConvention'}, + 'custom_host_header_name': {'key': 'properties.customHostHeaderName', 'type': 'str'}, + 'custom_proto_header_name': {'key': 'properties.customProtoHeaderName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, convention=None, custom_host_header_name: str=None, custom_proto_header_name: str=None, **kwargs) -> None: + 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 FrontEndConfiguration(Model): + """FrontEndConfiguration. + + :param kind: Possible values include: 'NodePort', 'LoadBalancer' + :type kind: str or ~azure.mgmt.web.v2020_12_01.models.FrontEndServiceType + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(FrontEndConfiguration, self).__init__(**kwargs) + self.kind = kind + + +class FunctionAppMajorVersion(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) -> None: + super(FunctionAppMajorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.minor_versions = None + + +class FunctionAppMinorVersion(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) -> None: + super(FunctionAppMinorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.stack_settings = None + + +class FunctionAppRuntimes(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) -> None: + super(FunctionAppRuntimes, self).__init__(**kwargs) + self.linux_runtime_settings = None + self.windows_runtime_settings = None + + +class FunctionAppRuntimeSettings(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: true if remote debugging is + supported for the stack; otherwise, 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: true if the stack is in preview; otherwise, + false. + :vartype is_preview: bool + :ivar is_deprecated: true if the stack is deprecated; + otherwise, false. + :vartype is_deprecated: bool + :ivar is_hidden: true if the stack should be hidden; + otherwise, false. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: datetime + :ivar is_auto_update: true if the stack version is + auto-updated; otherwise, false. + :vartype is_auto_update: bool + :ivar is_early_access: true if the minor version is + early-access; otherwise, false. + :vartype is_early_access: bool + :ivar is_default: true if the minor version the default; + otherwise, 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) -> None: + 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': 'StackPreferredOs'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 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: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: + 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 FunctionSecrets(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: str=None, trigger_url: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(GeoRegion, self).__init__(kind=kind, **kwargs) + self.description = None + self.display_name = None + self.org_domain = 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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: + super(GitHub, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class GitHubActionCodeConfiguration(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: str=None, runtime_version: str=None, **kwargs) -> None: + super(GitHubActionCodeConfiguration, self).__init__(**kwargs) + self.runtime_stack = runtime_stack + self.runtime_version = runtime_version + + +class GitHubActionConfiguration(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=None, container_configuration=None, is_linux: bool=None, generate_workflow_file: bool=None, **kwargs) -> None: + 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(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: str=None, image_name: str=None, username: str=None, password: str=None, **kwargs) -> None: + super(GitHubActionContainerConfiguration, self).__init__(**kwargs) + self.server_url = server_url + self.image_name = image_name + self.username = username + self.password = password + + +class GitHubActionWebAppStackSettings(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: true if GitHub Actions is supported for + the stack; otherwise, 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) -> None: + super(GitHubActionWebAppStackSettings, self).__init__(**kwargs) + self.is_supported = None + self.supported_version = None + + +class GlobalCsmSkuDescription(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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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': 'UnauthenticatedClientActionV2'}, + 'redirect_to_provider': {'key': 'properties.redirectToProvider', 'type': 'str'}, + 'excluded_paths': {'key': 'properties.excludedPaths', 'type': '[str]'}, + } + + def __init__(self, *, kind: str=None, require_authentication: bool=None, unauthenticated_client_action=None, redirect_to_provider: str=None, excluded_paths=None, **kwargs) -> None: + 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: str=None, enabled: bool=None, registration=None, login=None, validation=None, **kwargs) -> None: + super(Google, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + self.validation = validation + + +class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: + super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) + self.name = name + self.location = location + + +class HostingEnvironmentDiagnostics(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: str=None, diagnostics_output: str=None, **kwargs) -> None: + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = name + self.diagnostics_output = diagnostics_output + + +class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: + super(HostKeys, self).__init__(**kwargs) + self.master_key = master_key + self.function_keys = function_keys + self.system_keys = system_keys + + +class HostName(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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, + } + + def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: + 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': 'AzureResourceType'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: + 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 HostNameSslState(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 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': 'SslState'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, + } + + def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: + 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(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=None, azure_blob_storage=None, **kwargs) -> None: + 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: str=None, require_https: bool=None, routes=None, forward_proxy=None, **kwargs) -> None: + 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: str=None, api_prefix: str=None, **kwargs) -> None: + 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: + 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 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: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, value: str=None, **kwargs) -> None: + super(Identifier, self).__init__(kind=kind, **kwargs) + self.value = value + + +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: + :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: str=None, azure_active_directory=None, facebook=None, git_hub=None, google=None, legacy_microsoft_account=None, twitter=None, apple=None, azure_static_web_apps=None, custom_open_id_connect_providers=None, **kwargs) -> None: + 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(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: str=None, endpoints=None, ports=None, **kwargs) -> None: + super(InboundEnvironmentEndpoint, self).__init__(**kwargs) + self.description = description + self.endpoints = endpoints + self.ports = ports + + +class IpSecurityRestriction(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: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, headers=None, **kwargs) -> None: + 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: str=None, allowed_groups=None, allowed_client_applications=None, **kwargs) -> None: + super(JwtClaimChecks, self).__init__(kind=kind, **kwargs) + self.allowed_groups = allowed_groups + self.allowed_client_applications = allowed_client_applications + + +class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: + super(KeyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class KeyValuePairStringObject(Model): + """KeyValuePairStringObject. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key: + :vartype key: str + :ivar value: + :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) -> None: + super(KeyValuePairStringObject, self).__init__(**kwargs) + self.key = None + self.value = None + + +class KubeEnvironment(Resource): + """A Kubernetes cluster specialized for web workloads by Azure App Service. + + 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: Resource tags. + :type tags: dict[str, str] + :param kube_environment_type: Type of the Kubernetes Environment. + Only Set for WorkerApps as Managed + :type kube_environment_type: str + :param extended_location: + :type extended_location: + ~azure.mgmt.web.v2020_12_01.models.ExtendedLocation + :ivar provisioning_state: Provisioning state of the Kubernetes + Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Waiting', 'InitializationInProgress', 'InfrastructureSetupInProgress', + 'InfrastructureSetupComplete', 'ScheduledForDelete', 'UpgradeRequested', + 'UpgradeFailed', 'AKSProvisionComplete' + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProvisioningState + :ivar deployment_errors: Any errors that occurred during deployment or + deployment validation + :vartype deployment_errors: str + :param internal_load_balancer_enabled: Only visible within Vnet/Subnet + :type internal_load_balancer_enabled: bool + :ivar default_domain: Default Domain Name for the cluster + :vartype default_domain: str + :param static_ip: Static IP of the KubeEnvironment + :type static_ip: str + :param arc_configuration: Cluster configuration which determines the ARC + cluster + components types. Eg: Choosing between BuildService kind, + FrontEnd Service ArtifactsStorageType etc. + :type arc_configuration: + ~azure.mgmt.web.v2020_12_01.models.ArcConfiguration + :param app_logs_configuration: Cluster configuration which enables the log + daemon to export + app logs to a destination. Currently only "log-analytics" is + supported + :type app_logs_configuration: + ~azure.mgmt.web.v2020_12_01.models.AppLogsConfiguration + :param worker_apps_configuration: Cluster configuration which enables + users to create Worker Apps + enabled dedicated Kube Environments + :type worker_apps_configuration: + ~azure.mgmt.web.v2020_12_01.models.WorkerAppsConfiguration + :param aks_resource_id: + :type aks_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'deployment_errors': {'readonly': True}, + 'default_domain': {'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}'}, + 'kube_environment_type': {'key': 'properties.type', 'type': 'str'}, + 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KubeEnvironmentProvisioningState'}, + 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, + 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, + 'default_domain': {'key': 'properties.defaultDomain', 'type': 'str'}, + 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, + 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, + 'app_logs_configuration': {'key': 'properties.appLogsConfiguration', 'type': 'AppLogsConfiguration'}, + 'worker_apps_configuration': {'key': 'properties.workerAppsConfiguration', 'type': 'WorkerAppsConfiguration'}, + 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, kube_environment_type: str=None, extended_location=None, internal_load_balancer_enabled: bool=None, static_ip: str=None, arc_configuration=None, app_logs_configuration=None, worker_apps_configuration=None, aks_resource_id: str=None, **kwargs) -> None: + super(KubeEnvironment, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.kube_environment_type = kube_environment_type + self.extended_location = extended_location + self.provisioning_state = None + self.deployment_errors = None + self.internal_load_balancer_enabled = internal_load_balancer_enabled + self.default_domain = None + self.static_ip = static_ip + self.arc_configuration = arc_configuration + self.app_logs_configuration = app_logs_configuration + self.worker_apps_configuration = worker_apps_configuration + self.aks_resource_id = aks_resource_id + + +class KubeEnvironmentProfile(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: str=None, **kwargs) -> None: + 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: str=None, enabled: bool=None, registration=None, login=None, validation=None, **kwargs) -> None: + super(LegacyMicrosoftAccount, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + self.validation = validation + + +class LinuxJavaContainerSettings(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: true if the stack is in preview; otherwise, + false. + :vartype is_preview: bool + :ivar is_deprecated: true if the stack is deprecated; + otherwise, false. + :vartype is_deprecated: bool + :ivar is_hidden: true if the stack should be hidden; + otherwise, false. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: datetime + :ivar is_auto_update: true if the stack version is + auto-updated; otherwise, false. + :vartype is_auto_update: bool + :ivar is_early_access: true if the minor version is + early-access; otherwise, 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) -> None: + 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(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: str=None, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class LogAnalyticsConfiguration(Model): + """LogAnalyticsConfiguration. + + :param customer_id: + :type customer_id: str + :param shared_key: + :type shared_key: str + """ + + _attribute_map = { + 'customer_id': {'key': 'customerId', 'type': 'str'}, + 'shared_key': {'key': 'sharedKey', 'type': 'str'}, + } + + def __init__(self, *, customer_id: str=None, shared_key: str=None, **kwargs) -> None: + super(LogAnalyticsConfiguration, self).__init__(**kwargs) + self.customer_id = customer_id + self.shared_key = shared_key + + +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: str=None, routes=None, token_store=None, preserve_url_fragments_for_logins: bool=None, allowed_external_redirect_urls=None, cookie_expiration=None, nonce=None, **kwargs) -> None: + 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: str=None, logout_endpoint: str=None, **kwargs) -> None: + 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: str=None, scopes=None, **kwargs) -> None: + super(LoginScopes, self).__init__(kind=kind, **kwargs) + self.scopes = scopes + + +class LogSpecification(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: str=None, display_name: str=None, blob_duration: str=None, log_filter_pattern: str=None, **kwargs) -> None: + 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(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.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = user_assigned_identities + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + 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) -> None: + super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricSpecification(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: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param connection_string: Required. Connection string to the remote MySQL + database. + :type connection_string: str + :param migration_type: Required. 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}, + 'connection_string': {'required': True}, + 'migration_type': {'required': 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': 'MySqlMigrationType'}, + } + + def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: + 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': 'OperationStatus'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 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 false by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(MSDeployLog, self).__init__(kind=kind, **kwargs) + self.entries = None + + +class MSDeployLogEntry(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 + :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': 'MSDeployLogEntryType'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + 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 + :ivar end_time: End time of deploy operation + :vartype end_time: 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': 'MSDeployProvisioningState'}, + '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: str=None, **kwargs) -> None: + 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(Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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(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: str=None, status: str=None, message: str=None, **kwargs) -> None: + 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: str=None, validate_nonce: bool=None, nonce_expiration_interval: str=None, **kwargs) -> None: + 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 + :param method: Possible values include: 'ClientSecretPost' + :type method: str or + ~azure.mgmt.web.v2020_12_01.models.ClientCredentialMethod + :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'}, + 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, method=None, client_secret_setting_name: str=None, **kwargs) -> None: + super(OpenIdConnectClientCredential, self).__init__(kind=kind, **kwargs) + self.method = method + 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: str=None, authorization_endpoint: str=None, token_endpoint: str=None, issuer: str=None, certification_uri: str=None, well_known_open_id_configuration: str=None, **kwargs) -> None: + 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: str=None, name_claim_type: str=None, scopes=None, **kwargs) -> None: + 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: str=None, client_id: str=None, client_credential=None, open_id_connect_configuration=None, **kwargs) -> None: + 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(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 + :param modified_time: Time when operation has been updated. + :type modified_time: datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: 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': 'OperationStatus'}, + '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: + 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(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: str=None, endpoints=None, **kwargs) -> None: + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class PerfMonResponse(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: str=None, message: str=None, data=None, **kwargs) -> None: + super(PerfMonResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.data = data + + +class PerfMonSample(Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: + super(PerfMonSample, self).__init__(**kwargs) + self.time = time + self.instance_name = instance_name + self.value = value + + +class PerfMonSet(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 + :param end_time: End time of the period. + :type end_time: 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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: + 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: 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: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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: true if promotion code is + required; otherwise, 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': 'AppServicePlanRestrictions'}, + '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: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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 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: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + 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: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: + super(PrivateAccess, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.virtual_networks = virtual_networks + + +class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = name + self.key = key + + +class PrivateAccessVirtualNetwork(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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = name + self.key = key + self.resource_id = resource_id + self.subnets = subnets + + +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: + :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: str=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, **kwargs) + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkConnectionState(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: str=None, description: str=None, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkResource(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, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.properties = properties + + +class PrivateLinkResourceProperties(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) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkResourcesWrapper(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, **kwargs) -> None: + 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 + :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 + :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: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: + 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 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: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: + 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 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 + :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: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: + 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 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': 'PublicCertificateLocation'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: + super(PublicCertificate, self).__init__(kind=kind, **kwargs) + self.blob = blob + self.public_certificate_location = public_certificate_location + self.thumbprint = None + + +class PushSettings(ProxyOnlyResource): + """Push settings for the 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 + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Required. 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}, + 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: + 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(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=None, score: float=None, **kwargs) -> None: + super(QueryUtterancesResult, self).__init__(**kwargs) + self.sample_utterance = sample_utterance + self.score = score + + +class QueryUtterancesResults(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: str=None, results=None, **kwargs) -> None: + super(QueryUtterancesResults, self).__init__(**kwargs) + self.query = query + self.results = results + + +class RampUpRule(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 ActionHostName. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to + add/remove from ReroutePercentage until it reaches + \\nMinReroutePercentage or + MaxReroutePercentage. Site metrics are checked every N + minutes specified in ChangeIntervalInMinutes.\\nCustom + decision algorithm + can be provided in TiPCallback site extension which URL can be specified + in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: + 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 + :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 + :param end_time: The end time in UTC of a range that the recommendation + refers to. + :type end_time: 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 + :param notification_expiration_time: Date and time in UTC when this + notification expires. + :type notification_expiration_time: 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 + :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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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 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': 'NotificationLevel'}, + 'channels': {'key': 'properties.channels', 'type': 'Channels'}, + '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: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: + 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: + :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: str=None, private_endpoint=None, private_link_service_connection_state=None, ip_addresses=None, **kwargs) -> None: + 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(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': 'RenderingType'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: + 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: + 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(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: int=None, time_interval: str=None, **kwargs) -> None: + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: + super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) + self.category = category + self.signal_availability = signal_availability + + +class ResourceMetricAvailability(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) -> None: + 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: str=None, **kwargs) -> None: + 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 ResourceNameAvailability(Model): + """Information regarding availability of a resource name. + + :param name_available: true indicates name is valid and + available. false indicates the name is invalid, unavailable, + or both. + :type name_available: bool + :param reason: Invalid indicates the name provided does not + match Azure App Service naming requirements. 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: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(ResourceNameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class ResourceNameAvailabilityRequest(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, is_fqdn: bool=None, **kwargs) -> None: + super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.is_fqdn = is_fqdn + + +class ResponseMetaData(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=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: Required. 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: Required. true if the restore operation can + overwrite target app; otherwise, false. 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. true to remove custom domains + automatically. If 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. Default value: False . + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :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: true if + SiteConfig.ConnectionStrings should be set in new app; otherwise, + 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}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, + 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + } + + def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: + 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(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: str=None, links=None, qid: str=None, **kwargs) -> None: + super(SampleUtterance, self).__init__(**kwargs) + self.text = text + self.links = links + self.qid = qid + + +class ServiceSpecification(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=None, log_specifications=None, **kwargs) -> None: + 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: Resource tags. + :type tags: dict[str, str] + :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: true if the app is enabled; otherwise, + 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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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: true if the app is a default + container; otherwise, 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 + :param identity: + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, key_vault_reference_identity: str=None, https_only: bool=None, redundancy_mode=None, storage_account_required: bool=None, identity=None, **kwargs) -> None: + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + 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 + self.identity = identity + + +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: true if the Authentication / Authorization + feature is enabled for the current app; otherwise, 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: true to durably store + platform-specific security tokens that are obtained during login flows; + otherwise, false. + The default is 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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested + as part of GitHub Login authentication. + This setting is optional + :type git_hub_oauth_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_oauth_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_oauth_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': 'UnauthenticatedClientAction'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, + '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_oauth_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_oauth_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_oauth_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_oauth_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: str=None, enabled: bool=None, runtime_version: str=None, config_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, aad_claims_authorization: str=None, google_client_id: str=None, google_client_secret: str=None, google_client_secret_setting_name: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_app_secret_setting_name: str=None, facebook_oauth_scopes=None, git_hub_client_id: str=None, git_hub_client_secret: str=None, git_hub_client_secret_setting_name: str=None, git_hub_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, twitter_consumer_secret_setting_name: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_client_secret_setting_name: str=None, microsoft_account_oauth_scopes=None, is_auth_from_file: str=None, auth_file_path: str=None, **kwargs) -> None: + 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_oauth_scopes = google_oauth_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_oauth_scopes = facebook_oauth_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_oauth_scopes = git_hub_oauth_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_oauth_scopes = microsoft_account_oauth_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: str=None, platform=None, global_validation=None, identity_providers=None, login=None, http_settings=None, **kwargs) -> None: + 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(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': 'CloneAbilityResult'}, + 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, + } + + def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: + 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(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: str=None, description: str=None, **kwargs) -> None: + super(SiteCloneabilityCriterion, self).__init__(**kwargs) + self.name = name + self.description = description + + +class SiteConfig(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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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: true if Auto Heal is enabled; + otherwise, 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: true to enable local MySQL; + otherwise, false. Default value: 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. Default value: True . + :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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, + '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: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, key_vault_reference_identity: str=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, function_app_scale_limit: int=None, health_check_path: str=None, functions_runtime_scale_monitoring_enabled: bool=None, website_time_zone: str=None, minimum_elastic_instance_count: int=None, **kwargs) -> None: + 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(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: true if use32BitWorkerProcess + should be set to true for the stack; otherwise, 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) -> None: + 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. Default value: + "v4.6" . + :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: true if request tracing is + enabled; otherwise, false. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: datetime + :param remote_debugging_enabled: true if remote debugging is + enabled; otherwise, false. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: true if HTTP logging is enabled; + otherwise, 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: true if detailed error + logging is enabled; otherwise, 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: true to use 32-bit worker + process; otherwise, false. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: true if WebSocket is enabled; + otherwise, false. + :type web_sockets_enabled: bool + :param always_on: true if Always On is enabled; otherwise, + 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: true if Auto Heal is enabled; + otherwise, 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: true to enable local MySQL; + otherwise, false. Default value: 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. Default value: True . + :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': 'ManagedPipelineMode'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, + '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: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, key_vault_reference_identity: str=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, function_app_scale_limit: int=None, health_check_path: str=None, functions_runtime_scale_monitoring_enabled: bool=None, website_time_zone: str=None, minimum_elastic_instance_count: int=None, **kwargs) -> None: + 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 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 + :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: str=None, **kwargs) -> None: + super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) + self.time = None + self.snapshot_id = 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 + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: true if the local version is + the latest version; 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 + :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': 'SiteExtensionType'}, + '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: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: + 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 SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: + 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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: + 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: + 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 + :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: true if the app is enabled; otherwise, + 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: true if reserved; otherwise, + false. Default value: False . + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :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 + :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: true to stop SCM (KUDU) site + when the app is stopped; otherwise, false. The default is + false. Default value: 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: true to enable client + affinity; false to stop sending session affinity cookies, + which route client requests in the same session to the same instance. + Default is true. + :type client_affinity_enabled: bool + :param client_cert_enabled: true to enable client certificate + authentication (TLS mutual authentication); otherwise, false. + Default is 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: true to disable the public + hostnames of the app; otherwise, false. + If 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 + :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: true if the app is a default + container; otherwise, 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 + :param identity: + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + """ + + _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'}, + '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': 'UsageState'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, + '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': 'ClientCertMode'}, + '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': 'RedundancyMode'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, key_vault_reference_identity: str=None, https_only: bool=None, redundancy_mode=None, storage_account_required: bool=None, identity=None, **kwargs) -> None: + super(SitePatchResource, self).__init__(kind=kind, **kwargs) + 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 + self.identity = identity + + +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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: + 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(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) -> None: + super(SiteSeal, self).__init__(**kwargs) + self.html = html + + +class SiteSealRequest(Model): + """Site seal request. + + :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: + 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: true to limit to manual + integration; false to enable continuous integration (which + configures webhooks into online repos like GitHub). + :type is_manual_integration: bool + :param is_git_hub_action: true if this is deployed via GitHub + action. + :type is_git_hub_action: bool + :param deployment_rollback_enabled: true to enable deployment + rollback; otherwise, false. + :type deployment_rollback_enabled: bool + :param is_mercurial: true for a Mercurial repository; + 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: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, is_git_hub_action: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, git_hub_action_configuration=None, **kwargs) -> None: + 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(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: int=None, maximum: int=None, elastic_maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: + 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(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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: + 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(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: str=None, sku=None, capacity=None, **kwargs) -> None: + super(SkuInfo, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity + + +class SkuInfos(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: str=None, skus=None, **kwargs) -> None: + 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: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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 SlotSwapStatus(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 + :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) -> None: + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(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: str=None, path: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(Snapshot, self).__init__(kind=kind, **kwargs) + self.time = None + + +class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: + 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. + + 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 + :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: Required. If true the restore operation can + overwrite source app; otherwise, 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}, + 'overwrite': {'required': 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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: + 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(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': 'SolutionType'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: + 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 + """ + + _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: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: + 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 StackMajorVersion(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: true if this is the default major version; + otherwise, 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: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool + :param app_settings_dictionary: + + + 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: + + + Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to + 0 + :type site_config_properties_dictionary: dict[str, object] + :param is_preview: true if this stack is in Preview, + otherwise false. + :type is_preview: bool + :param is_deprecated: true if this stack has been deprecated, + otherwise false. + :type is_deprecated: bool + :param is_hidden: true if this stack should be hidden for new + customers on portal, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, app_settings_dictionary=None, site_config_properties_dictionary=None, is_preview: bool=None, is_deprecated: bool=None, is_hidden: bool=None, **kwargs) -> None: + 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(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: true if this is the default minor version; + otherwise, false. + :type is_default: bool + :param is_remote_debugging_enabled: true if this supports + Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: + 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(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 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: true if capacity + is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, + 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, + '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: + 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 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: Resource tags. + :type tags: dict[str, 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] + :param sku: + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param identity: + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + """ + + _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}'}, + '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]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + } + + def __init__(self, *, location: str, kind: str=None, tags=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, template_properties=None, sku=None, identity=None, **kwargs) -> None: + super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, **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 + self.sku = sku + self.identity = identity + + +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 + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: 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: str=None, **kwargs) -> None: + 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 StaticSiteBuildProperties(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: str=None, api_location: str=None, app_artifact_location: str=None, output_location: str=None, app_build_command: str=None, api_build_command: str=None, skip_github_action_workflow_generation: bool=None, github_action_secret_name_override: str=None, **kwargs) -> None: + 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 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 + :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: str=None, **kwargs) -> None: + 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 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. + Default value: "cname-delegation" . + :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: str=None, validation_method: str="cname-delegation", **kwargs) -> None: + 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: str=None, **kwargs) -> None: + super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, **kwargs) + self.function_name = None + self.trigger_type = 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: str=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, template_properties=None, **kwargs) -> None: + 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: str=None, repository_token: str=None, should_update_repository: bool=None, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, repository_url: str=None, branch: str=None, build_properties=None, **kwargs) -> None: + super(StaticSitesWorkflowPreviewRequest, self).__init__(kind=kind, **kwargs) + self.repository_url = repository_url + self.branch = branch + self.build_properties = build_properties + + +class StaticSiteTemplateOptions(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: str=None, owner: str=None, repository_name: str=None, description: str=None, is_private: bool=None, **kwargs) -> None: + 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: str=None, roles: str=None, **kwargs) -> None: + super(StaticSiteUserARMResource, self).__init__(kind=kind, **kwargs) + self.provider = None + self.user_id = None + self.display_name = None + self.roles = roles + + +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: str=None, domain: str=None, provider: str=None, user_details: str=None, roles: str=None, num_hours_to_expiration: int=None, **kwargs) -> None: + 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 + :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: str=None, **kwargs) -> None: + 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 + """ + + _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: str=None, function_app_resource_id: str=None, function_app_region: str=None, **kwargs) -> None: + 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 + """ + + _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: str=None, function_app_resource_id: str=None, function_app_region: str=None, **kwargs) -> None: + 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 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: str=None, app_zip_url: str=None, api_zip_url: str=None, deployment_title: str=None, provider: str=None, function_language: str=None, **kwargs) -> None: + 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(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': 'InsightStatus'}, + } + + def __init__(self, *, message: str=None, status_id=None, **kwargs) -> None: + super(Status, self).__init__(**kwargs) + self.message = message + self.status_id = status_id + + +class StatusCodesBasedTrigger(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: int=None, sub_status: int=None, win32_status: int=None, path: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + 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(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: str=None, path: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: Required. AzureFiles connection + string. + :type azurefiles_connection_string: str + :param azurefiles_share: Required. AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: trueif the app should be + switched over; otherwise, false. Default value: False . + :type switch_site_after_migration: bool + :param block_write_access_to_site: true if the app should be + read only during copy operation; otherwise, false. Default + value: False . + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: + 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: str=None, **kwargs) -> None: + 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: str=None, properties=None, **kwargs) -> None: + 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: str=None, properties=None, **kwargs) -> None: + super(StringList, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class SupportTopic(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) -> None: + 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: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: + super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) + self.subnet_resource_id = subnet_resource_id + self.swift_supported = swift_supported + + +class TldLegalAgreement(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: str=None, **kwargs) -> None: + super(TldLegalAgreement, self).__init__(**kwargs) + self.agreement_key = agreement_key + self.title = title + self.content = content + self.url = url + + +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: str=None, enabled: bool=None, token_refresh_extension_hours: float=None, file_system=None, azure_blob_storage=None, **kwargs) -> None: + 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 true, then the top level domain supports + domain privacy; otherwise, 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: str=None, privacy: bool=None, **kwargs) -> None: + super(TopLevelDomain, self).__init__(kind=kind, **kwargs) + self.privacy = privacy + + +class TopLevelDomainAgreementOption(Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If true, then the list of agreements + will include agreements for domain privacy as well; otherwise, + false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + """ + + _attribute_map = { + 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, + 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, + } + + def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: + super(TopLevelDomainAgreementOption, self).__init__(**kwargs) + self.include_privacy = include_privacy + self.for_transfer = for_transfer + + +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: str=None, runs=None, **kwargs) -> None: + super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) + self.runs = runs + + +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 + :param end_time: End time. + :type end_time: 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': 'TriggeredWebJobStatus'}, + '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: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: + 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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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: str=None, enabled: bool=None, registration=None, **kwargs) -> None: + 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: str=None, consumer_key: str=None, consumer_secret_setting_name: str=None, **kwargs) -> None: + 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 + :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': 'ComputeModeOptions'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 User(ProxyOnlyResource): + """User credentials used for publishing activity. + + 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 + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Required. 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}, + 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: + 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(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: true if App Service plan is for + Linux workers; otherwise, false. + :type need_linux_workers: bool + :param is_spot: true if App Service plan is for Spot + instances; otherwise, 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: 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, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, container_registry_base_url: str=None, container_registry_username: str=None, container_registry_password: str=None, container_image_repository: str=None, container_image_tag: str=None, container_image_platform: str=None, app_service_environment=None, **kwargs) -> None: + 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(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: str=None, error=None, **kwargs) -> None: + super(ValidateResponse, self).__init__(**kwargs) + self.status = status + self.error = error + + +class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: + super(ValidateResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class VirtualApplication(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: true if preloading is enabled; + otherwise, 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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: + 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(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: str=None, physical_path: str=None, **kwargs) -> None: + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +class VirtualIPMapping(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: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, service_name: str=None, **kwargs) -> None: + 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(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: str=None, **kwargs) -> None: + 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. + + 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 + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: Required. The URI where the VPN package can be + downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: + 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: true if a resync is required; + otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: + 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: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, subnet_resource_id: str=None, **kwargs) -> None: + 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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + 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: str=None, message: str=None, failed: bool=None, failed_tests=None, warnings=None, **kwargs) -> None: + 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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: + super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) + self.test_name = test_name + self.details = details + + +class WebAppCollection(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, **kwargs) -> None: + super(WebAppCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WebAppMajorVersion(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) -> None: + super(WebAppMajorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.minor_versions = None + + +class WebAppMinorVersion(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) -> None: + super(WebAppMinorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.stack_settings = None + + +class WebAppRuntimes(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) -> None: + 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(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: true if remote debugging is + supported for the stack; otherwise, 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: true if the stack is in preview; otherwise, + false. + :vartype is_preview: bool + :ivar is_deprecated: true if the stack is deprecated; + otherwise, false. + :vartype is_deprecated: bool + :ivar is_hidden: true if the stack should be hidden; + otherwise, false. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: datetime + :ivar is_auto_update: true if the stack version is + auto-updated; otherwise, false. + :vartype is_auto_update: bool + :ivar is_early_access: true if the minor version is + early-access; otherwise, 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) -> None: + 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': 'StackPreferredOs'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + 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 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': 'WebJobType'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + 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 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: + :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': 'SiteRuntimeState'}, + '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: str=None, state=None, status_url: str=None, detector_url: str=None, console_url: str=None, health_check_url: str=None, containers=None, **kwargs) -> None: + 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(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: true if the stack is in preview; otherwise, + false. + :vartype is_preview: bool + :ivar is_deprecated: true if the stack is deprecated; + otherwise, false. + :vartype is_deprecated: bool + :ivar is_hidden: true if the stack should be hidden; + otherwise, false. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: datetime + :ivar is_auto_update: true if the stack version is + auto-updated; otherwise, false. + :vartype is_auto_update: bool + :ivar is_early_access: true if the minor version is + early-access; otherwise, 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) -> None: + 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 WorkerAppsConfiguration(Model): + """Configuration required deploy Kube Environment Dedicated + to Worker Apps. + Create request is not accepted, if ArcConfiguration or AksResourceId is + provided + with WorkerAppsConfiguration. + + :param subnet_resource_id: Service Principle Secret used to provision + WorkerApps Kube Environment + VnetResource + :type subnet_resource_id: str + """ + + _attribute_map = { + 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, + } + + def __init__(self, *, subnet_resource_id: str=None, **kwargs) -> None: + super(WorkerAppsConfiguration, self).__init__(**kwargs) + self.subnet_resource_id = subnet_resource_id + + +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 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] + :param sku: + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + """ + + _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'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + } + + def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: + super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) + 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 + self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_paged_models.py new file mode 100644 index 00000000000..015a563994f --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_paged_models.py @@ -0,0 +1,859 @@ +# 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 msrest.paging import Paged + + +class AppServiceCertificateOrderPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) +class AppServiceCertificateResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) +class DetectorResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorResponsePaged, self).__init__(*args, **kwargs) +class CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) +class DomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`Domain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Domain]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainPaged, self).__init__(*args, **kwargs) +class NameIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`NameIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(NameIdentifierPaged, self).__init__(*args, **kwargs) +class DomainOwnershipIdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} + } + + def __init__(self, *args, **kwargs): + + super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) +class TopLevelDomainPaged(Paged): + """ + A paging container for iterating over a list of :class:`TopLevelDomain ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} + } + + def __init__(self, *args, **kwargs): + + super(TopLevelDomainPaged, self).__init__(*args, **kwargs) +class TldLegalAgreementPaged(Paged): + """ + A paging container for iterating over a list of :class:`TldLegalAgreement ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} + } + + def __init__(self, *args, **kwargs): + + super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) +class CertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`Certificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Certificate]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificatePaged, self).__init__(*args, **kwargs) +class DeletedSitePaged(Paged): + """ + A paging container for iterating over a list of :class:`DeletedSite ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeletedSite]'} + } + + def __init__(self, *args, **kwargs): + + super(DeletedSitePaged, self).__init__(*args, **kwargs) +class DiagnosticCategoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiagnosticCategory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} + } + + def __init__(self, *args, **kwargs): + + super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) +class AnalysisDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AnalysisDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) +class DetectorDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) +class ApplicationStackResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationStackResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationStackResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationStackResourcePaged, self).__init__(*args, **kwargs) +class FunctionAppStackPaged(Paged): + """ + A paging container for iterating over a list of :class:`FunctionAppStack ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FunctionAppStack]'} + } + + def __init__(self, *args, **kwargs): + + super(FunctionAppStackPaged, self).__init__(*args, **kwargs) +class WebAppStackPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebAppStack ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebAppStack]'} + } + + def __init__(self, *args, **kwargs): + + super(WebAppStackPaged, self).__init__(*args, **kwargs) +class RecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Recommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Recommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendationPaged, self).__init__(*args, **kwargs) +class SourceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`SourceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SourceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(SourceControlPaged, self).__init__(*args, **kwargs) +class BillingMeterPaged(Paged): + """ + A paging container for iterating over a list of :class:`BillingMeter ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BillingMeter]'} + } + + def __init__(self, *args, **kwargs): + + super(BillingMeterPaged, self).__init__(*args, **kwargs) +class GeoRegionPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoRegion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoRegion]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoRegionPaged, self).__init__(*args, **kwargs) +class IdentifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`Identifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Identifier]'} + } + + def __init__(self, *args, **kwargs): + + super(IdentifierPaged, self).__init__(*args, **kwargs) +class PremierAddOnOfferPaged(Paged): + """ + A paging container for iterating over a list of :class:`PremierAddOnOffer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} + } + + def __init__(self, *args, **kwargs): + + super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) +class SitePaged(Paged): + """ + A paging container for iterating over a list of :class:`Site ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Site]'} + } + + def __init__(self, *args, **kwargs): + + super(SitePaged, self).__init__(*args, **kwargs) +class BackupItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupItem]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupItemPaged, self).__init__(*args, **kwargs) +class SiteConfigResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) +class ApiKVReferencePaged(Paged): + """ + A paging container for iterating over a list of :class:`ApiKVReference ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApiKVReference]'} + } + + def __init__(self, *args, **kwargs): + + super(ApiKVReferencePaged, self).__init__(*args, **kwargs) +class SiteConfigurationSnapshotInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) +class ContinuousWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`ContinuousWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) +class DeploymentPaged(Paged): + """ + A paging container for iterating over a list of :class:`Deployment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Deployment]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentPaged, self).__init__(*args, **kwargs) +class FunctionEnvelopePaged(Paged): + """ + A paging container for iterating over a list of :class:`FunctionEnvelope ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} + } + + def __init__(self, *args, **kwargs): + + super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) +class HostNameBindingPaged(Paged): + """ + A paging container for iterating over a list of :class:`HostNameBinding ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} + } + + def __init__(self, *args, **kwargs): + + super(HostNameBindingPaged, self).__init__(*args, **kwargs) +class WebSiteInstanceStatusPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebSiteInstanceStatus ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebSiteInstanceStatus]'} + } + + def __init__(self, *args, **kwargs): + + super(WebSiteInstanceStatusPaged, self).__init__(*args, **kwargs) +class ProcessInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessInfoPaged, self).__init__(*args, **kwargs) +class ProcessModuleInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessModuleInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) +class ProcessThreadInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProcessThreadInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) +class PerfMonResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`PerfMonResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(PerfMonResponsePaged, self).__init__(*args, **kwargs) +class RemotePrivateEndpointConnectionARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`RemotePrivateEndpointConnectionARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RemotePrivateEndpointConnectionARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(RemotePrivateEndpointConnectionARMResourcePaged, self).__init__(*args, **kwargs) +class PublicCertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`PublicCertificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} + } + + def __init__(self, *args, **kwargs): + + super(PublicCertificatePaged, self).__init__(*args, **kwargs) +class SiteExtensionInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SiteExtensionInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) +class SlotDifferencePaged(Paged): + """ + A paging container for iterating over a list of :class:`SlotDifference ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SlotDifference]'} + } + + def __init__(self, *args, **kwargs): + + super(SlotDifferencePaged, self).__init__(*args, **kwargs) +class SnapshotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Snapshot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Snapshot]'} + } + + def __init__(self, *args, **kwargs): + + super(SnapshotPaged, self).__init__(*args, **kwargs) +class TriggeredWebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredWebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) +class TriggeredJobHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggeredJobHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) +class CsmUsageQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmUsageQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) +class WebJobPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebJob ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebJob]'} + } + + def __init__(self, *args, **kwargs): + + super(WebJobPaged, self).__init__(*args, **kwargs) +class StaticSiteARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteUserARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteUserARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteUserARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteUserARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteBuildARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteBuildARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteBuildARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteFunctionOverviewARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteFunctionOverviewARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteFunctionOverviewARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteUserProvidedFunctionAppARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteUserProvidedFunctionAppARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteUserProvidedFunctionAppARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteUserProvidedFunctionAppARMResourcePaged, self).__init__(*args, **kwargs) +class StaticSiteCustomDomainOverviewARMResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`StaticSiteCustomDomainOverviewARMResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'} + } + + def __init__(self, *args, **kwargs): + + super(StaticSiteCustomDomainOverviewARMResourcePaged, self).__init__(*args, **kwargs) +class AppServiceEnvironmentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) +class StampCapacityPaged(Paged): + """ + A paging container for iterating over a list of :class:`StampCapacity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StampCapacity]'} + } + + def __init__(self, *args, **kwargs): + + super(StampCapacityPaged, self).__init__(*args, **kwargs) +class InboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class WorkerPoolResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkerPoolResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) +class ResourceMetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) +class SkuInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuInfoPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class OutboundEnvironmentEndpointPaged(Paged): + """ + A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} + } + + def __init__(self, *args, **kwargs): + + super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) +class AppServicePlanPaged(Paged): + """ + A paging container for iterating over a list of :class:`AppServicePlan ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} + } + + def __init__(self, *args, **kwargs): + + super(AppServicePlanPaged, self).__init__(*args, **kwargs) +class StrPaged(Paged): + """ + A paging container for iterating over a list of str object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[str]'} + } + + def __init__(self, *args, **kwargs): + + super(StrPaged, self).__init__(*args, **kwargs) +class HybridConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`HybridConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HybridConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(HybridConnectionPaged, self).__init__(*args, **kwargs) +class ResourceHealthMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) +class KubeEnvironmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`KubeEnvironment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[KubeEnvironment]'} + } + + def __init__(self, *args, **kwargs): + + super(KubeEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_web_site_management_client_enums.py new file mode 100644 index 00000000000..9e91f3368f6 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_web_site_management_client_enums.py @@ -0,0 +1,725 @@ +# 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 + + +class KeyVaultSecretStatus(str, Enum): + + 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 CertificateProductType(str, Enum): + + standard_domain_validated_ssl = "StandardDomainValidatedSsl" + standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + in_progress = "InProgress" + deleting = "Deleting" + + +class CertificateOrderStatus(str, Enum): + + pendingissuance = "Pendingissuance" + issued = "Issued" + revoked = "Revoked" + canceled = "Canceled" + denied = "Denied" + pendingrevocation = "Pendingrevocation" + pending_rekey = "PendingRekey" + unused = "Unused" + expired = "Expired" + not_submitted = "NotSubmitted" + + +class CertificateOrderActionType(str, Enum): + + 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 RouteType(str, Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class InsightStatus(str, Enum): + + critical = "Critical" + warning = "Warning" + info = "Info" + success = "Success" + none = "None" + + +class RenderingType(str, Enum): + + 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 DetectorType(str, Enum): + + detector = "Detector" + analysis = "Analysis" + category_overview = "CategoryOverview" + + +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" + + +class IpFilterTag(str, Enum): + + default = "Default" + xff_proxy = "XffProxy" + service_tag = "ServiceTag" + + +class AutoHealActionType(str, Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + +class ConnectionStringType(str, Enum): + + 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 AzureStorageType(str, Enum): + + azure_files = "AzureFiles" + azure_blob = "AzureBlob" + + +class AzureStorageState(str, Enum): + + ok = "Ok" + invalid_credentials = "InvalidCredentials" + invalid_share = "InvalidShare" + not_validated = "NotValidated" + + +class ScmType(str, Enum): + + 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 ManagedPipelineMode(str, Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(str, Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + per_site_round_robin = "PerSiteRoundRobin" + + +class SupportedTlsVersions(str, Enum): + + one_full_stop_zero = "1.0" + one_full_stop_one = "1.1" + one_full_stop_two = "1.2" + + +class FtpsState(str, Enum): + + all_allowed = "AllAllowed" + ftps_only = "FtpsOnly" + disabled = "Disabled" + + +class SslState(str, Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(str, Enum): + + standard = "Standard" + repository = "Repository" + + +class UsageState(str, Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(str, Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class ClientCertMode(str, Enum): + + required = "Required" + optional = "Optional" + optional_interactive_user = "OptionalInteractiveUser" + + +class RedundancyMode(str, Enum): + + none = "None" + manual = "Manual" + failover = "Failover" + active_active = "ActiveActive" + geo_redundant = "GeoRedundant" + + +class StatusOptions(str, Enum): + + ready = "Ready" + pending = "Pending" + creating = "Creating" + + +class DomainStatus(str, Enum): + + 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 AzureResourceType(str, Enum): + + website = "Website" + traffic_manager = "TrafficManager" + + +class CustomHostNameDnsRecordType(str, Enum): + + cname = "CName" + a = "A" + + +class HostNameType(str, Enum): + + verified = "Verified" + managed = "Managed" + + +class DnsType(str, Enum): + + azure_dns = "AzureDns" + default_domain_registrar_dns = "DefaultDomainRegistrarDns" + + +class DomainType(str, Enum): + + regular = "Regular" + soft_deleted = "SoftDeleted" + + +class HostingEnvironmentStatus(str, Enum): + + preparing = "Preparing" + ready = "Ready" + scaling = "Scaling" + deleting = "Deleting" + + +class LoadBalancingMode(str, Enum): + + none = "None" + web = "Web" + publishing = "Publishing" + web_publishing = "Web, Publishing" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" + + +class IssueType(str, Enum): + + 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 SolutionType(str, Enum): + + quick_solution = "QuickSolution" + deep_investigation = "DeepInvestigation" + best_practices = "BestPractices" + + +class StackPreferredOs(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class ResourceScopeType(str, Enum): + + server_farm = "ServerFarm" + subscription = "Subscription" + web_site = "WebSite" + + +class NotificationLevel(str, Enum): + + critical = "Critical" + warning = "Warning" + information = "Information" + non_urgent_suggestion = "NonUrgentSuggestion" + + +class Channels(str, Enum): + + notification = "Notification" + api = "Api" + email = "Email" + webhook = "Webhook" + all = "All" + + +class AppServicePlanRestrictions(str, Enum): + + none = "None" + free = "Free" + shared = "Shared" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class InAvailabilityReasonType(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class CheckNameResourceTypes(str, Enum): + + site = "Site" + slot = "Slot" + hosting_environment = "HostingEnvironment" + publishing_user = "PublishingUser" + microsoft_websites = "Microsoft.Web/sites" + microsoft_websitesslots = "Microsoft.Web/sites/slots" + microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" + microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" + + +class ValidateResourceTypes(str, Enum): + + server_farm = "ServerFarm" + site = "Site" + microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" + + +class ResolveStatus(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 ConfigReferenceSource(str, Enum): + + key_vault = "KeyVault" + + +class LogLevel(str, Enum): + + off = "Off" + verbose = "Verbose" + information = "Information" + warning = "Warning" + error = "Error" + + +class BackupItemStatus(str, Enum): + + 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 DatabaseType(str, Enum): + + sql_azure = "SqlAzure" + my_sql = "MySql" + local_my_sql = "LocalMySql" + postgre_sql = "PostgreSql" + + +class FrequencyUnit(str, Enum): + + day = "Day" + hour = "Hour" + + +class ContinuousWebJobStatus(str, Enum): + + initializing = "Initializing" + starting = "Starting" + running = "Running" + pending_restart = "PendingRestart" + stopped = "Stopped" + + +class WebJobType(str, Enum): + + continuous = "Continuous" + triggered = "Triggered" + + +class CookieExpirationConvention(str, Enum): + + fixed_time = "FixedTime" + identity_provider_derived = "IdentityProviderDerived" + + +class PublishingProfileFormat(str, Enum): + + file_zilla3 = "FileZilla3" + web_deploy = "WebDeploy" + ftp = "Ftp" + + +class DnsVerificationTestResult(str, Enum): + + passed = "Passed" + failed = "Failed" + skipped = "Skipped" + + +class ClientCredentialMethod(str, Enum): + + client_secret_post = "ClientSecretPost" + + +class ForwardProxyConvention(str, Enum): + + no_proxy = "NoProxy" + standard = "Standard" + custom = "Custom" + + +class UnauthenticatedClientActionV2(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + return401 = "Return401" + return403 = "Return403" + + +class MSDeployLogEntryType(str, Enum): + + message = "Message" + warning = "Warning" + error = "Error" + + +class MSDeployProvisioningState(str, Enum): + + accepted = "accepted" + running = "running" + succeeded = "succeeded" + failed = "failed" + canceled = "canceled" + + +class MySqlMigrationType(str, Enum): + + local_to_remote = "LocalToRemote" + remote_to_local = "RemoteToLocal" + + +class PublicCertificateLocation(str, Enum): + + current_user_my = "CurrentUserMy" + local_machine_my = "LocalMachineMy" + unknown = "Unknown" + + +class BackupRestoreOperationType(str, Enum): + + default = "Default" + clone = "Clone" + relocation = "Relocation" + snapshot = "Snapshot" + cloud_fs = "CloudFS" + + +class UnauthenticatedClientAction(str, Enum): + + redirect_to_login_page = "RedirectToLoginPage" + allow_anonymous = "AllowAnonymous" + + +class BuiltInAuthenticationProvider(str, Enum): + + azure_active_directory = "AzureActiveDirectory" + facebook = "Facebook" + google = "Google" + microsoft_account = "MicrosoftAccount" + twitter = "Twitter" + github = "Github" + + +class CloneAbilityResult(str, Enum): + + cloneable = "Cloneable" + partially_cloneable = "PartiallyCloneable" + not_cloneable = "NotCloneable" + + +class SiteExtensionType(str, Enum): + + gallery = "Gallery" + web_root = "WebRoot" + + +class TriggeredWebJobStatus(str, Enum): + + success = "Success" + failed = "Failed" + error = "Error" + + +class SiteRuntimeState(str, Enum): + + ready = "READY" + stopped = "STOPPED" + unknown = "UNKNOWN" + + +class BuildStatus(str, Enum): + + waiting_for_deployment = "WaitingForDeployment" + uploading = "Uploading" + deploying = "Deploying" + ready = "Ready" + failed = "Failed" + deleting = "Deleting" + detached = "Detached" + + +class CustomDomainStatus(str, Enum): + + retrieving_validation_token = "RetrievingValidationToken" + validating = "Validating" + adding = "Adding" + ready = "Ready" + failed = "Failed" + deleting = "Deleting" + + +class TriggerTypes(str, Enum): + + http_trigger = "HttpTrigger" + unknown = "Unknown" + + +class ComputeModeOptions(str, Enum): + + shared = "Shared" + dedicated = "Dedicated" + dynamic = "Dynamic" + + +class WorkerSizeOptions(str, Enum): + + 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" + + +class StorageType(str, Enum): + + local_node = "LocalNode" + network_file_system = "NetworkFileSystem" + + +class FrontEndServiceType(str, Enum): + + node_port = "NodePort" + load_balancer = "LoadBalancer" + + +class KubeEnvironmentProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + waiting = "Waiting" + initialization_in_progress = "InitializationInProgress" + infrastructure_setup_in_progress = "InfrastructureSetupInProgress" + infrastructure_setup_complete = "InfrastructureSetupComplete" + scheduled_for_delete = "ScheduledForDelete" + upgrade_requested = "UpgradeRequested" + upgrade_failed = "UpgradeFailed" + aks_provision_complete = "AKSProvisionComplete" + + +class SkuName(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" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/__init__.py new file mode 100644 index 00000000000..491765ec4dc --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/__init__.py @@ -0,0 +1,52 @@ +# 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 GlobalModelOperations +from ._provider_operations import ProviderOperations +from ._recommendations_operations import RecommendationsOperations +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 +from ._kube_environments_operations import KubeEnvironmentsOperations +from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin + +__all__ = [ + 'AppServiceCertificateOrdersOperations', + 'CertificateOrdersDiagnosticsOperations', + 'CertificateRegistrationProviderOperations', + 'DomainsOperations', + 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', + 'CertificatesOperations', + 'DeletedWebAppsOperations', + 'DiagnosticsOperations', + 'GlobalModelOperations', + 'ProviderOperations', + 'RecommendationsOperations', + 'WebAppsOperations', + 'StaticSitesOperations', + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', + 'ResourceHealthMetadataOperations', + 'KubeEnvironmentsOperations', + 'WebSiteManagementClientOperationsMixin', +] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_certificate_orders_operations.py new file mode 100644 index 00000000000..003eabf50ce --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_certificate_orders_operations.py @@ -0,0 +1,1423 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceCertificateOrdersOperations(object): + """AppServiceCertificateOrdersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all certificate orders in a subscription. + + Description for List all certificate orders in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def validate_purchase_information( + self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate_purchase_information.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} + + def get( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + + def _create_or_update_initial( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateOrder or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def delete( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} + + def list_certificates( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceCertificateResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_certificates.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} + + def get_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + + def _create_or_update_certificate_initial( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceCertificateResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def delete_certificate( + self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceCertificateResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_certificate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} + + def reissue( + self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reissue.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} + + def renew( + self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} + + def resend_email( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.resend_email.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} + + def resend_request_emails( + self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): + """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: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.resend_request_emails.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} + + def retrieve_site_seal( + self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): + """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 light_theme: If 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSeal or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSeal or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) + + # Construct URL + url = self.retrieve_site_seal.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSeal', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} + + def verify_domain_ownership( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_domain_ownership.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} + + def retrieve_certificate_actions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2020_12_01.models.CertificateOrderAction] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_actions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateOrderAction]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} + + def retrieve_certificate_email_history( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.CertificateEmail] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.retrieve_certificate_email_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[CertificateEmail]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_environments_operations.py new file mode 100644 index 00000000000..a77a02c67a9 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_environments_operations.py @@ -0,0 +1,3425 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServiceEnvironmentsOperations(object): + """AppServiceEnvironmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all App Service Environments for a subscription. + + Description for Get all App Service Environments for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServiceEnvironmentResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AppServiceEnvironmentResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 true to force the deletion + even if the App Service Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServiceEnvironmentResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} + + def list_capacities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StampCapacity + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StampCapacityPaged[~azure.mgmt.web.v2020_12_01.models.StampCapacity] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_capacities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} + + def get_vip_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AddressResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AddressResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vip_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} + + + def _change_vnet_initial( + self, resource_group_name, name, id, subnet=None, custom_headers=None, raw=False, **operation_config): + vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) + + # Construct URL + url = self.change_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def change_vnet( + self, resource_group_name, name, id, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 id: Resource id of the Virtual Network. + :type id: str + :param subnet: Subnet within the Virtual Network. + :type subnet: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._change_vnet_initial( + resource_group_name=resource_group_name, + name=name, + id=id, + subnet=subnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} + + def get_ase_v3_networking_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AseV3NetworkingConfiguration or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ase_v3_networking_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AseV3NetworkingConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} + + def update_ase_networking_configuration( + self, resource_group_name, name, kind=None, allow_new_private_endpoint_connections=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AseV3NetworkingConfiguration or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + ase_networking_configuration = models.AseV3NetworkingConfiguration(kind=kind, allow_new_private_endpoint_connections=allow_new_private_endpoint_connections) + + # Construct URL + url = self.update_ase_networking_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AseV3NetworkingConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} + + def list_diagnostics( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDiagnostics] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_diagnostics.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} + + def get_diagnostics_item( + self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostingEnvironmentDiagnostics or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDiagnostics or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostics_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} + + def get_inbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_inbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} + + def list_multi_role_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} + + def get_multi_role_pool( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + + def _create_or_update_multi_role_pool_initial( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_multi_role_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} + + def list_multi_role_pool_instance_metric_definitions( + self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} + + def list_multi_role_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} + + def list_multi_role_pool_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} + + def list_multi_role_usages( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2020_12_01.models.UsagePaged[~azure.mgmt.web.v2020_12_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_multi_role_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} + + def list_operations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Operation] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_operations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Operation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} + + def get_outbound_network_dependencies_endpoints( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OutboundEnvironmentEndpoint + :rtype: + ~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpoint] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_outbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} + + def get_private_endpoint_connection_list( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + RemotePrivateEndpointConnectionARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RemotePrivateEndpointConnectionARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} + + def get_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RemotePrivateEndpointConnectionARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _approve_or_reject_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) + + # Construct URL + url = self.approve_or_reject_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def approve_or_reject_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + RemotePrivateEndpointConnectionARMResource or + ClientRawResponse if + raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + kind=kind, + private_link_service_connection_state=private_link_service_connection_state, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + if response.status_code == 202: + deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get_private_link_resources( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_link_resources.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} + + def reboot( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reboot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} + + + def _resume_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.resume.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def resume( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} + + def list_app_service_plans( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_app_service_plans.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} + + def list_web_apps( + self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} + + + def _suspend_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.suspend.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def suspend( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} + + def list_worker_pools( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pools.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} + + def get_worker_pool( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + + def _create_or_update_worker_pool_initial( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkerPoolResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_worker_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} + + def list_worker_pool_instance_metric_definitions( + self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} + + def list_web_worker_metric_definitions( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_metric_definitions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} + + def list_worker_pool_skus( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_worker_pool_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} + + def list_web_worker_usages( + self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.v2020_12_01.models.UsagePaged[~azure.mgmt.web.v2020_12_01.models.Usage] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_worker_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_plans_operations.py new file mode 100644 index 00000000000..37307d6e85e --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_plans_operations.py @@ -0,0 +1,1946 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AppServicePlansOperations(object): + """AppServicePlansOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, detailed=None, custom_headers=None, raw=False, **operation_config): + """Get all App Service plans for a subscription. + + Description for Get all App Service plans for a subscription. + + :param detailed: Specify true to return all App Service + plan properties. The default is false, which returns a + subset of the properties. + Retrieval of all properties may increase the API latency. + :type detailed: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + if detailed is not None: + query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlan') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AppServicePlan or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.AppServicePlan]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} + + def list_capabilities( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Capability] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_capabilities.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Capability]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} + + def list_web_apps_by_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of str + :rtype: ~azure.mgmt.web.v2020_12_01.models.StrPaged[str] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps_by_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} + + def get_hybrid_connection_plan_limit( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnectionLimits or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnectionLimits or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_plan_limit.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnectionLimits', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HybridConnection + :rtype: + ~azure.mgmt.web.v2020_12_01.models.HybridConnectionPaged[~azure.mgmt.web.v2020_12_01.models.HybridConnection] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} + + def restart_web_apps( + self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): + """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 true to perform a soft + restart, applies the configuration settings and restarts the apps if + necessary. The default is false, which always restarts + and reprovisions the apps + :type soft_restart: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} + + def list_web_apps( + self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} + + def get_server_farm_skus( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_server_farm_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} + + def list_vnets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} + + def get_vnet_from_server_farm( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_from_server_farm.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_routes_for_vnet( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_routes_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} + + def get_route_for_vnet( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_route_for_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def create_or_update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def delete_vnet_route( + self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def update_vnet_route( + self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_route.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(route, 'VnetRoute') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 400, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} + + def reboot_worker( + self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reboot_worker.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py new file mode 100644 index 00000000000..9d59739c7da --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py @@ -0,0 +1,197 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificateOrdersDiagnosticsOperations(object): + """CertificateOrdersDiagnosticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_app_service_certificate_order_detector_response( + self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_app_service_certificate_order_detector_response.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} + + def get_app_service_certificate_order_detector_response( + self, resource_group_name, certificate_order_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: The end time for the detector response. + :type end_time: datetime + :param time_grain: The time grain for the detector response. + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_app_service_certificate_order_detector_response.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_registration_provider_operations.py new file mode 100644 index 00000000000..15f5e923a0d --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificateRegistrationProviderOperations(object): + """CertificateRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificates_operations.py new file mode 100644 index 00000000000..e955b3043ce --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificates_operations.py @@ -0,0 +1,442 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CertificatePaged[~azure.mgmt.web.v2020_12_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CertificatePaged[~azure.mgmt.web.v2020_12_01.models.Certificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def create_or_update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'Certificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def delete( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} + + def update( + self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_deleted_web_apps_operations.py new file mode 100644 index 00000000000..d271680b98d --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_deleted_web_apps_operations.py @@ -0,0 +1,238 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DeletedWebAppsOperations(object): + """DeletedWebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all deleted apps for a subscription. + + Description for Get all deleted apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_12_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_12_01.models.DeletedSite] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} + + def get_deleted_web_app_by_location( + self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeletedSite or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeletedSite or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deleted_web_app_by_location.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeletedSite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_diagnostics_operations.py new file mode 100644 index 00000000000..faaeb59232c --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_diagnostics_operations.py @@ -0,0 +1,1713 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DiagnosticsOperations(object): + """DiagnosticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_hosting_environment_detector_responses( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_hosting_environment_detector_responses.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} + + def get_hosting_environment_detector_response( + self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hosting_environment_detector_response.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} + + def list_site_detector_responses( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} + + def get_site_detector_response( + self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} + + def list_site_diagnostic_categories( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} + + def get_site_diagnostic_category( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AnalysisDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AnalysisDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector( + self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector( + self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} + + def list_site_detector_responses_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorResponse + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detector_responses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} + + def get_site_detector_response_slot( + self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_response_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} + + def list_site_diagnostic_categories_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} + + def get_site_diagnostic_category_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_diagnostic_category_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} + + def list_site_analyses_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_analyses_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} + + def get_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AnalysisDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_analysis_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AnalysisDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} + + def execute_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_analysis_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} + + def list_site_detectors_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.DetectorDefinition] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_detectors_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} + + def get_site_detector_slot( + self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DetectorDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_detector_slot.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DetectorDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} + + def execute_site_detector_slot( + self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """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 + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.execute_site_detector_slot.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domain_registration_provider_operations.py new file mode 100644 index 00000000000..702f153d66d --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domain_registration_provider_operations.py @@ -0,0 +1,104 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DomainRegistrationProviderOperations(object): + """DomainRegistrationProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domains_operations.py new file mode 100644 index 00000000000..8828b84578f --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domains_operations.py @@ -0,0 +1,1090 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DomainsOperations(object): + """DomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def check_availability( + self, name=None, custom_headers=None, raw=False, **operation_config): + """Check if a domain is available for registration. + + Description for Check if a domain is available for registration. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainAvailabilityCheckResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DomainAvailabilityCheckResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + identifier = models.NameIdentifier(name=name) + + # Construct URL + url = self.check_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainAvailabilityCheckResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all domains in a subscription. + + Description for Get all domains in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DomainPaged[~azure.mgmt.web.v2020_12_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} + + def get_control_center_sso_request( + self, custom_headers=None, raw=False, **operation_config): + """Generate a single sign-on request for the domain management portal. + + Description for Generate a single sign-on request for the domain + management portal. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainControlCenterSsoRequest or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DomainControlCenterSsoRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_control_center_sso_request.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainControlCenterSsoRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} + + def list_recommendations( + self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): + """Get domain name recommendations based on keywords. + + Description for Get domain name recommendations based on keywords. + + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NameIdentifier + :rtype: + ~azure.mgmt.web.v2020_12_01.models.NameIdentifierPaged[~azure.mgmt.web.v2020_12_01.models.NameIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommendations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DomainPaged[~azure.mgmt.web.v2020_12_01.models.Domain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} + + def get( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'Domain') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.Domain]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def delete( + self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): + """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 true to delete + the domain immediately. The default is false which + deletes the domain after 24 hours. + :type force_hard_delete_domain: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain, 'DomainPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} + + def list_ownership_identifiers( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DomainOwnershipIdentifier + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_ownership_identifiers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} + + def get_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def create_or_update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.create_or_update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def delete_ownership_identifier( + self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def update_ownership_identifier( + self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param ownership_id: Ownership Id. + :type ownership_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) + + # Construct URL + url = self.update_ownership_identifier.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DomainOwnershipIdentifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} + + def renew( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.renew.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_global_model_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_global_model_operations.py new file mode 100644 index 00000000000..8d6b5e36939 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_global_model_operations.py @@ -0,0 +1,211 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class GlobalModelOperations(object): + """GlobalModelOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def get_deleted_web_app( + self, deleted_site_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeletedSite or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeletedSite or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deleted_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeletedSite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} + + def get_deleted_web_app_snapshots( + self, deleted_site_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Snapshot] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deleted_web_app_snapshots.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Snapshot]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} + + def get_subscription_operation_with_async_response( + self, location, operation_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_subscription_operation_with_async_response.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_kube_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_kube_environments_operations.py similarity index 93% rename from src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_kube_environments_operations.py rename to src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_kube_environments_operations.py index cffa1ea68b4..856c9b72927 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_kube_environments_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_kube_environments_operations.py @@ -26,7 +26,7 @@ class KubeEnvironmentsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". + :ivar api_version: API Version. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-01" + self.api_version = "2020-12-01" self.config = config @@ -53,9 +53,9 @@ def list_by_subscription( overrides`. :return: An iterator like instance of KubeEnvironment :rtype: - ~azure.mgmt.web.v2020_06_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2020_06_01.models.KubeEnvironment] + ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2020_12_01.models.KubeEnvironment] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -124,9 +124,9 @@ def list_by_resource_group( overrides`. :return: An iterator like instance of KubeEnvironment :rtype: - ~azure.mgmt.web.v2020_06_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2020_06_01.models.KubeEnvironment] + ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2020_12_01.models.KubeEnvironment] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -196,10 +196,10 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: KubeEnvironment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.KubeEnvironment or + :rtype: ~azure.mgmt.web.v2020_12_01.models.KubeEnvironment or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -306,7 +306,7 @@ def create( :param kube_environment_envelope: Configuration details of the Kubernetes Environment. :type kube_environment_envelope: - ~azure.mgmt.web.v2020_06_01.models.KubeEnvironment + ~azure.mgmt.web.v2020_12_01.models.KubeEnvironment :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -315,11 +315,11 @@ def create( :return: An instance of LROPoller that returns KubeEnvironment or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.KubeEnvironment] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.KubeEnvironment] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.KubeEnvironment]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.KubeEnvironment]] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -350,7 +350,7 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -362,8 +362,6 @@ def _delete_initial( # Construct parameters query_parameters = {} - if force_delete is not None: - query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -387,7 +385,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete a Kubernetes Environment. Description for Delete a Kubernetes Environment. @@ -397,10 +395,6 @@ def delete( :type resource_group_name: str :param name: Name of the Kubernetes Environment. :type name: str - :param force_delete: Specify true to force the deletion - even if the Kubernetes Environment contains resources. The default is - false. - :type force_delete: bool :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -411,12 +405,11 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, name=name, - force_delete=force_delete, custom_headers=custom_headers, raw=True, **operation_config @@ -450,17 +443,17 @@ def update( :param kube_environment_envelope: Configuration details of the Kubernetes Environment. :type kube_environment_envelope: - ~azure.mgmt.web.v2020_06_01.models.KubeEnvironment + ~azure.mgmt.web.v2020_12_01.models.KubeEnvironment :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: KubeEnvironment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.KubeEnvironment or + :rtype: ~azure.mgmt.web.v2020_12_01.models.KubeEnvironment or ~msrest.pipeline.ClientRawResponse :raises: - :class:`DefaultErrorResponseException` + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update.metadata['url'] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_provider_operations.py new file mode 100644 index 00000000000..e80a05e1c65 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_provider_operations.py @@ -0,0 +1,533 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProviderOperations(object): + """ProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def get_available_stacks( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their + versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions', 'All' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStackResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks.metadata['url'] + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} + + def get_function_app_stacks( + self, stack_os_type=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values include: + 'Windows', 'Linux', 'All' + :type stack_os_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionAppStack + :rtype: + ~azure.mgmt.web.v2020_12_01.models.FunctionAppStackPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStack] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_function_app_stacks.metadata['url'] + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionAppStackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} + + def get_function_app_stacks_for_location( + self, location, stack_os_type=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values include: + 'Windows', 'Linux', 'All' + :type stack_os_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionAppStack + :rtype: + ~azure.mgmt.web.v2020_12_01.models.FunctionAppStackPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStack] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_function_app_stacks_for_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionAppStackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} + + def get_web_app_stacks_for_location( + self, location, stack_os_type=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values include: + 'Windows', 'Linux', 'All' + :type stack_os_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebAppStack + :rtype: + ~azure.mgmt.web.v2020_12_01.models.WebAppStackPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStack] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_web_app_stacks_for_location.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebAppStackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """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. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationDescription] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} + + def get_web_app_stacks( + self, stack_os_type=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values include: + 'Windows', 'Linux', 'All' + :type stack_os_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebAppStack + :rtype: + ~azure.mgmt.web.v2020_12_01.models.WebAppStackPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStack] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_web_app_stacks.metadata['url'] + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebAppStackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} + + def get_available_stacks_on_prem( + self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their + versions. + + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions', 'All' + :type os_type_selected: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationStackResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_available_stacks_on_prem.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_recommendations_operations.py new file mode 100644 index 00000000000..5344c19e581 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_recommendations_operations.py @@ -0,0 +1,1070 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RecommendationsOperations(object): + """RecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """List all recommendations for a subscription. + + Description for List all recommendations for a subscription. + + :param featured: Specify true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} + + def reset_all_filters( + self, custom_headers=None, raw=False, **operation_config): + """Reset all recommendation opt-out settings for a subscription. + + Description for Reset all recommendation opt-out settings for a + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} + + def disable_recommendation_for_subscription( + self, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} + + def list_history_for_hosting_environment( + self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} + + def list_recommended_rules_for_hosting_environment( + self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} + + def disable_all_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_all_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} + + def reset_all_filters_for_hosting_environment( + self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters_for_hosting_environment.metadata['url'] + 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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} + + def get_rule_details_by_hosting_environment( + self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_hosting_environment.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} + + def disable_recommendation_for_hosting_environment( + self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_hosting_environment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} + + def list_history_for_web_app( + self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 false to return all + recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_history_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} + + def list_recommended_rules_for_web_app( + self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): + """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 true to return only the most + critical recommendations. The default is 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Recommendation + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} + + def disable_all_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_all_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} + + def reset_all_filters_for_web_app( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_all_filters_for_web_app.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} + + def get_rule_details_by_web_app( + self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_rule_details_by_web_app.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecommendationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} + + def disable_recommendation_for_site( + self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.disable_recommendation_for_site.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_resource_health_metadata_operations.py new file mode 100644 index 00000000000..a1a2b2fc9f8 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_resource_health_metadata_operations.py @@ -0,0 +1,468 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceHealthMetadataOperations(object): + """ResourceHealthMetadataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the subscription. + + Description for List all ResourceHealthMetadata for all sites in the + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} + + def get_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} + + def list_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} + + def get_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_static_sites_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_static_sites_operations.py new file mode 100644 index 00000000000..607b9d03d77 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_static_sites_operations.py @@ -0,0 +1,3803 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class StaticSitesOperations(object): + """StaticSitesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def preview_workflow( + self, location, static_sites_workflow_preview_request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSitesWorkflowPreview or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSitesWorkflowPreview + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.preview_workflow.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSitesWorkflowPreview', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all Static Sites for a subscription. + + Description for Get all Static Sites for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} + + def get_static_sites_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_static_sites_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} + + def get_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + + def _create_or_update_static_site_initial( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_static_site( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns StaticSiteARMResource + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_static_site_initial( + resource_group_name=resource_group_name, + name=name, + static_site_envelope=static_site_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + + def _delete_static_site_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_static_site_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def update_static_site( + self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} + + def list_static_site_users( + self, resource_group_name, name, authprovider, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteUserARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_users.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteUserARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} + + def delete_static_site_user( + self, resource_group_name, name, authprovider, userid, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_static_site_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} + + def update_static_site_user( + self, resource_group_name, name, authprovider, userid, kind=None, roles=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param roles: The roles for the static site user, in free-form string + format + :type roles: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + static_site_user_envelope = models.StaticSiteUserARMResource(kind=kind, roles=roles) + + # Construct URL + url = self.update_static_site_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} + + def get_static_site_builds( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StaticSiteBuildARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_static_site_builds.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteBuildARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} + + def get_static_site_build( + self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteBuildARMResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteBuildARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} + + + def _delete_static_site_build_initial( + self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_static_site_build( + self, resource_group_name, name, environment_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_static_site_build_initial( + resource_group_name=resource_group_name, + name=name, + environment_name=environment_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} + + def create_or_update_static_site_build_app_settings( + self, resource_group_name, name, environment_name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.create_or_update_static_site_build_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def create_or_update_static_site_build_function_app_settings( + self, resource_group_name, name, environment_name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_static_site_build_functions( + self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteFunctionOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_build_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} + + def list_static_site_build_app_settings( + self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_build_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} + + def list_static_site_build_function_app_settings( + self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_build_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} + + def get_user_provided_function_apps_for_static_site_build( + self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteUserProvidedFunctionAppARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_user_provided_function_apps_for_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteUserProvidedFunctionAppARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} + + def get_user_provided_function_app_for_static_site_build( + self, resource_group_name, name, environment_name, function_app_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserProvidedFunctionAppARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_user_provided_function_app_for_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + + def _register_user_provided_function_app_with_static_site_build_initial( + self, resource_group_name, name, environment_name, function_app_name, static_site_user_provided_function_envelope, is_forced=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.register_user_provided_function_app_with_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if is_forced is not None: + query_parameters['isForced'] = self._serialize.query("is_forced", is_forced, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def register_user_provided_function_app_with_static_site_build( + self, resource_group_name, name, environment_name, function_app_name, static_site_user_provided_function_envelope, is_forced=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 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 + false. + :type is_forced: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StaticSiteUserProvidedFunctionAppARMResource or + ClientRawResponse if + raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} + + def detach_user_provided_function_app_from_static_site_build( + self, resource_group_name, name, environment_name, function_app_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.detach_user_provided_function_app_from_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} + + + def _create_zip_deployment_for_static_site_build_initial( + self, resource_group_name, name, environment_name, static_site_zip_deployment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_zip_deployment_for_static_site_build.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def create_zip_deployment_for_static_site_build( + self, resource_group_name, name, environment_name, static_site_zip_deployment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} + + def create_or_update_static_site_app_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.create_or_update_static_site_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} + + def create_or_update_static_site_function_app_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.create_or_update_static_site_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} + + def create_user_roles_invitation_link( + self, resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserInvitationResponseResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserInvitationResponseResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_user_roles_invitation_link.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} + + def list_static_site_custom_domains( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteCustomDomainOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_custom_domains.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteCustomDomainOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} + + def get_static_site_custom_domain( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteCustomDomainOverviewARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + + def _create_or_update_static_site_custom_domain_initial( + self, resource_group_name, name, domain_name, kind=None, validation_method="cname-delegation", custom_headers=None, raw=False, **operation_config): + static_site_custom_domain_request_properties_envelope = models.StaticSiteCustomDomainRequestPropertiesARMResource(kind=kind, validation_method=validation_method) + + # Construct URL + url = self.create_or_update_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_static_site_custom_domain( + self, resource_group_name, name, domain_name, kind=None, validation_method="cname-delegation", custom_headers=None, raw=False, polling=True, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param validation_method: Validation method for adding a custom domain + :type validation_method: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StaticSiteCustomDomainOverviewARMResource or + ClientRawResponse if + raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_static_site_custom_domain_initial( + resource_group_name=resource_group_name, + name=name, + domain_name=domain_name, + kind=kind, + validation_method=validation_method, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + + def _delete_static_site_custom_domain_initial( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_static_site_custom_domain.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_static_site_custom_domain( + self, resource_group_name, name, domain_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_static_site_custom_domain_initial( + resource_group_name=resource_group_name, + name=name, + domain_name=domain_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} + + + def _validate_custom_domain_can_be_added_to_static_site_initial( + self, resource_group_name, name, domain_name, kind=None, validation_method="cname-delegation", custom_headers=None, raw=False, **operation_config): + static_site_custom_domain_request_properties_envelope = models.StaticSiteCustomDomainRequestPropertiesARMResource(kind=kind, validation_method=validation_method) + + # Construct URL + url = self.validate_custom_domain_can_be_added_to_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def validate_custom_domain_can_be_added_to_static_site( + self, resource_group_name, name, domain_name, kind=None, validation_method="cname-delegation", custom_headers=None, raw=False, polling=True, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param validation_method: Validation method for adding a custom domain + :type validation_method: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + kind=kind, + validation_method=validation_method, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} + + + def _detach_static_site_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.detach_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def detach_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._detach_static_site_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} + + def list_static_site_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteFunctionOverviewARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_static_site_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} + + def list_static_site_app_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} + + def list_static_site_configured_roles( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_configured_roles.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} + + def list_static_site_function_app_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_function_app_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} + + def list_static_site_secrets( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_static_site_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} + + def get_private_endpoint_connection_list( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + RemotePrivateEndpointConnectionARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RemotePrivateEndpointConnectionARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} + + def get_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RemotePrivateEndpointConnectionARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _approve_or_reject_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) + + # Construct URL + url = self.approve_or_reject_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def approve_or_reject_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + RemotePrivateEndpointConnectionARMResource or + ClientRawResponse if + raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + kind=kind, + private_link_service_connection_state=private_link_service_connection_state, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + if response.status_code == 202: + deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get_private_link_resources( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_link_resources.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} + + def reset_static_site_api_key( + self, resource_group_name, name, reset_properties_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_static_site_api_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} + + def get_user_provided_function_apps_for_static_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + StaticSiteUserProvidedFunctionAppARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_user_provided_function_apps_for_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.StaticSiteUserProvidedFunctionAppARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} + + def get_user_provided_function_app_for_static_site( + self, resource_group_name, name, function_app_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StaticSiteUserProvidedFunctionAppARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_user_provided_function_app_for_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} + + + def _register_user_provided_function_app_with_static_site_initial( + self, resource_group_name, name, function_app_name, static_site_user_provided_function_envelope, is_forced=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.register_user_provided_function_app_with_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if is_forced is not None: + query_parameters['isForced'] = self._serialize.query("is_forced", is_forced, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def register_user_provided_function_app_with_static_site( + self, resource_group_name, name, function_app_name, static_site_user_provided_function_envelope, is_forced=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 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 + false. + :type is_forced: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StaticSiteUserProvidedFunctionAppARMResource or + ClientRawResponse if + raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} + + def detach_user_provided_function_app_from_static_site( + self, resource_group_name, name, function_app_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.detach_user_provided_function_app_from_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} + + + def _create_zip_deployment_for_static_site_initial( + self, resource_group_name, name, static_site_zip_deployment_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_zip_deployment_for_static_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def create_zip_deployment_for_static_site( + self, resource_group_name, name, static_site_zip_deployment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_top_level_domains_operations.py new file mode 100644 index 00000000000..160c4d476cb --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_top_level_domains_operations.py @@ -0,0 +1,251 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TopLevelDomainsOperations(object): + """TopLevelDomainsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all top-level domains supported for registration. + + Description for Get all top-level domains supported for registration. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TopLevelDomain + :rtype: + ~azure.mgmt.web.v2020_12_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2020_12_01.models.TopLevelDomain] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} + + def get( + self, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TopLevelDomain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.TopLevelDomain or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TopLevelDomain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} + + def list_agreements( + self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): + """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 include_privacy: If true, then the list of + agreements will include agreements for domain privacy as well; + otherwise, false. + :type include_privacy: bool + :param for_transfer: If true, then the list of agreements + will include agreements for domain transfer as well; otherwise, + false. + :type for_transfer: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TldLegalAgreement + :rtype: + ~azure.mgmt.web.v2020_12_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2020_12_01.models.TldLegalAgreement] + :raises: + :class:`DefaultErrorResponseException` + """ + agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_agreements.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py new file mode 100644 index 00000000000..edad3a79a5c --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py @@ -0,0 +1,28441 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WebAppsOperations(object): + """WebAppsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all apps for a subscription. + + Description for Get all apps for a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} + + def list_by_resource_group( + self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + if include_slots is not None: + query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} + + def get( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def delete( + self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def update( + self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} + + def analyze_custom_hostname( + self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} + + def apply_slot_config_to_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_config_to_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} + + def backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} + + def list_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_12_01.models.BackupItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} + + def get_backup_status( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def delete_backup( + self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} + + def list_backup_status_secrets( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} + + + def _restore_initial( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} + + def get_basic_publishing_credentials_policies( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesCollection or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesCollection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_basic_publishing_credentials_policies.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} + + def get_ftp_allowed( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ftp_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} + + def update_ftp_allowed( + self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): + """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 allow: true to allow access to a publishing + method; otherwise, false. + :type allow: bool + :param kind: Kind of resource. + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) + + # Construct URL + url = self.update_ftp_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} + + def get_scm_allowed( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_scm_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} + + def update_scm_allowed( + self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): + """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 allow: true to allow access to a publishing + method; otherwise, false. + :type allow: bool + :param kind: Kind of resource. + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) + + # Construct URL + url = self.update_scm_allowed.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} + + def list_configurations( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} + + def update_application_settings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} + + def list_application_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} + + def update_auth_settings( + self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} + + def get_auth_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} + + def update_auth_settings_v2( + self, resource_group_name, name, site_auth_settings_v2, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} + + def get_auth_settings_v2( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} + + def update_azure_storage_accounts( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} + + def list_azure_storage_accounts( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} + + def update_backup_configuration( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def delete_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} + + def get_backup_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} + + def get_app_settings_key_vault_references( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiKVReference + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ApiKVReferencePaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_app_settings_key_vault_references.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiKVReferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} + + def get_app_setting_key_vault_reference( + self, resource_group_name, name, app_setting_key, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiKVReference or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_app_setting_key_vault_reference.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiKVReference', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} + + def get_site_connection_string_key_vault_references( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiKVReference + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ApiKVReferencePaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_site_connection_string_key_vault_references.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiKVReferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} + + def get_site_connection_string_key_vault_reference( + self, resource_group_name, name, connection_string_key, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiKVReference or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_connection_string_key_vault_reference.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiKVReference', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} + + def update_connection_strings( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2020_12_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} + + def list_connection_strings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_diagnostic_logs_config( + self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} + + def update_metadata( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} + + def list_metadata( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} + + + def _list_publishing_credentials_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials( + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} + + def update_site_push_settings( + self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} + + def list_site_push_settings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} + + def list_slot_configuration_names( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def update_slot_configuration_names( + self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot_configuration_names.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SlotConfigNamesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} + + def get_configuration( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def create_or_update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def list_configuration_snapshot_info( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} + + def get_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot( + self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.recover_site_configuration_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} + + def get_container_logs_zip( + self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} + + def list_continuous_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} + + def get_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_continuous_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DeploymentPaged[~azure.mgmt.web.v2020_12_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} + + def get_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def create_deployment( + self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def delete_deployment( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_deployment.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} + + def list_deployment_log( + self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} + + def discover_backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} + + def list_domain_ownership_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_12_01.models.IdentifierPaged[~azure.mgmt.web.v2020_12_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier( + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.update_domain_ownership_identifier.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_initial( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} + + def get_ms_deploy_log( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} + + def list_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} + + def get_functions_admin_token( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} + + def get_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + + def _create_function_initial( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_function( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def delete_function( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} + + def create_or_update_function_secret( + self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def delete_function_secret( + self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} + + def list_function_secrets( + self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} + + def list_host_keys( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} + + def list_sync_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} + + def sync_functions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} + + def create_or_update_host_secret( + self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def delete_host_secret( + self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2020_12_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} + + def get_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding( + self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def delete_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_name_binding.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} + + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} + + def list_relay_service_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} + + def get_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def delete_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} + + def list_instance_identifiers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebSiteInstanceStatus + :rtype: + ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} + + def get_instance_info( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebSiteInstanceStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebSiteInstanceStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} + + def get_instance_ms_deploy_status( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + + def _create_instance_ms_deploy_operation_initial( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_log.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} + + def list_instance_processes( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} + + def get_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} + + def list_instance_process_modules( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module( + self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} + + def list_instance_process_threads( + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} + + def is_cloneable( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} + + def list_site_backups( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_12_01.models.BackupItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_backups.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} + + def list_sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} + + + def _migrate_storage_initial( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_storage.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_storage( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + StorageMigrationResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StorageMigrationResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StorageMigrationResponse]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} + + + def _migrate_my_sql_initial( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.migrate_my_sql.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_my_sql( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Operation or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.Operation] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.Operation]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} + + def get_migrate_my_sql_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} + + def get_swift_virtual_network_connection( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_swift_virtual_network.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} + + def list_network_features( + self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_network_features.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} + + def get_network_trace_operation( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} + + def stop_web_site_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_web_site_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} + + def get_network_traces( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} + + def get_network_trace_operation_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} + + def get_network_traces_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.generate_new_site_publishing_password.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} + + def list_perf_mon_counters( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2020_12_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_12_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} + + def get_site_php_error_log_flag( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} + + def list_premier_add_ons( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} + + def get_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + def get_private_access( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def put_private_access_vnet( + self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + + def get_private_endpoint_connection_list( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + RemotePrivateEndpointConnectionARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RemotePrivateEndpointConnectionARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} + + def get_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RemotePrivateEndpointConnectionARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _approve_or_reject_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) + + # Construct URL + url = self.approve_or_reject_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def approve_or_reject_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + RemotePrivateEndpointConnectionARMResource or + ClientRawResponse if + raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + kind=kind, + private_link_service_connection_state=private_link_service_connection_state, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_private_endpoint_connection_initial( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_private_endpoint_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + if response.status_code == 202: + deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_private_endpoint_connection( + self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get_private_link_resources( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_link_resources.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} + + def list_processes( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} + + def get_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def delete_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_process.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} + + def get_process_dump( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_dump.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} + + def list_process_modules( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} + + def get_process_module( + self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_module.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} + + def list_public_certificates( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2020_12_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} + + def get_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate( + self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_public_certificate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets( + self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} + + def reset_production_slot_config( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_production_slot_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} + + def restart( + self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} + + + def _restore_from_backup_blob_initial( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob( + self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_backup_blob_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_deleted_app_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} + + + def _restore_snapshot_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_snapshot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} + + def list_site_extensions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} + + def get_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_initial( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def delete_site_extension( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_site_extension.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} + + def list_slots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Site + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} + + def get_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + + def _create_or_update_slot_initial( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Site or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.Site] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.Site]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def delete_slot( + self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def update_slot( + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} + + def analyze_custom_hostname_slot( + self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.analyze_custom_hostname_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} + + def apply_slot_configuration_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.apply_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} + + def backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} + + def list_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_12_01.models.BackupItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} + + def get_backup_status_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def delete_backup_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} + + def list_backup_status_secrets_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_backup_status_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} + + + def _restore_slot_initial( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} + + def get_basic_publishing_credentials_policies_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesCollection or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesCollection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_basic_publishing_credentials_policies_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} + + def get_ftp_allowed_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ftp_allowed_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} + + def update_ftp_allowed_slot( + self, resource_group_name, name, slot, allow, kind=None, custom_headers=None, raw=False, **operation_config): + """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 allow: true to allow access to a publishing + method; otherwise, false. + :type allow: bool + :param kind: Kind of resource. + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) + + # Construct URL + url = self.update_ftp_allowed_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} + + def get_scm_allowed_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_scm_allowed_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} + + def update_scm_allowed_slot( + self, resource_group_name, name, slot, allow, kind=None, custom_headers=None, raw=False, **operation_config): + """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 allow: true to allow access to a publishing + method; otherwise, false. + :type allow: bool + :param kind: Kind of resource. + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) + + # Construct URL + url = self.update_scm_allowed_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} + + def list_configurations_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configurations_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} + + def update_application_settings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(app_settings, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} + + def list_application_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_application_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} + + def update_auth_settings_slot( + self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} + + def get_auth_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} + + def update_auth_settings_v2_slot( + self, resource_group_name, name, site_auth_settings_v2, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_auth_settings_v2_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} + + def get_auth_settings_v2_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_auth_settings_v2_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettingsV2', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} + + def update_azure_storage_accounts_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} + + def list_azure_storage_accounts_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} + + def update_backup_configuration_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'BackupRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def delete_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} + + def get_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_backup_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} + + def get_app_settings_key_vault_references_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiKVReference + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ApiKVReferencePaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_app_settings_key_vault_references_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiKVReferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} + + def get_app_setting_key_vault_reference_slot( + self, resource_group_name, name, app_setting_key, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiKVReference or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_app_setting_key_vault_reference_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiKVReference', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def get_site_connection_string_key_vault_references_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiKVReference + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ApiKVReferencePaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_site_connection_string_key_vault_references_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiKVReferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} + + def get_site_connection_string_key_vault_reference_slot( + self, resource_group_name, name, connection_string_key, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiKVReference or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_connection_string_key_vault_reference_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiKVReference', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def update_connection_strings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict[str, + ~azure.mgmt.web.v2020_12_01.models.ConnStringValueTypePair] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} + + def list_connection_strings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_connection_strings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionStringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} + + def get_diagnostic_logs_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_diagnostic_logs_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_diagnostic_logs_config_slot( + self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_diagnostic_logs_config_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} + + def update_metadata_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + metadata = models.StringDictionary(kind=kind, properties=properties) + + # Construct URL + url = self.update_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(metadata, 'StringDictionary') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} + + def list_metadata_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_metadata_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} + + + def _list_publishing_credentials_slot_initial( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.list_publishing_credentials_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.User]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} + + def update_site_push_settings_slot( + self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} + + def list_site_push_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} + + def get_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def create_or_update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} + + def list_configuration_snapshot_info_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteConfigurationSnapshotInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} + + def get_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} + + def recover_site_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.recover_site_configuration_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} + + def get_web_site_container_logs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_web_site_container_logs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} + + def get_container_logs_zip_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_container_logs_zip_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/zip' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} + + def list_continuous_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} + + def get_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def delete_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} + + def start_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} + + def stop_continuous_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_continuous_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} + + def list_deployments_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.v2020_12_01.models.DeploymentPaged[~azure.mgmt.web.v2020_12_01.models.Deployment] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_deployments_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} + + def get_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def create_deployment_slot( + self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deployment, 'Deployment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def delete_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_deployment_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} + + def list_deployment_log_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_deployment_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} + + def discover_backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} + + def list_domain_ownership_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_12_01.models.IdentifierPaged[~azure.mgmt.web.v2020_12_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} + + def get_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def create_or_update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def delete_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param value: String representation of the identity. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + domain_ownership_identifier = models.Identifier(kind=kind, value=value) + + # Construct URL + url = self.update_domain_ownership_identifier_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} + + def get_ms_deploy_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + + def _create_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation_slot( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} + + def get_ms_deploy_log_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} + + def list_instance_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} + + def get_functions_admin_token_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_functions_admin_token_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} + + def get_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + + def _create_instance_function_slot_initial( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_function_slot( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns FunctionEnvelope or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def delete_instance_function_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_function_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} + + def create_or_update_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_function_secret_slot( + self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_function_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} + + def list_function_keys_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} + + def list_function_secrets_slot( + self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_function_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} + + def list_host_keys_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostKeys or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_host_keys_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} + + def list_sync_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} + + def sync_functions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_functions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} + + def create_or_update_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): + """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 name1: Key name + :type name1: str + :param value: Key value + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + key = models.KeyInfo(name=name1, value=value) + + # Construct URL + url = self.create_or_update_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key, 'KeyInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_host_secret_slot( + self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_secret_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} + + def list_host_name_bindings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.v2020_12_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBinding] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_host_name_bindings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} + + def get_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def create_or_update_host_name_binding_slot( + self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostNameBinding', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def delete_host_name_binding_slot( + self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_host_name_binding_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} + + def get_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def create_or_update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def delete_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def update_hybrid_connection_slot( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_hybrid_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} + + def list_hybrid_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_hybrid_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HybridConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} + + def list_relay_service_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_relay_service_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} + + def get_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def create_or_update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def delete_relay_service_connection_slot( + self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def update_relay_service_connection_slot( + self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_relay_service_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} + + def list_instance_identifiers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebSiteInstanceStatus + :rtype: + ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_identifiers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} + + def get_instance_info_slot( + self, resource_group_name, name, instance_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebSiteInstanceStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_info_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebSiteInstanceStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} + + def get_instance_ms_deploy_status_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + + def _create_instance_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation_slot( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_ms_deploy_log_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_processes_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} + + def get_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_instance_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def get_instance_process_dump_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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'} + + def list_instance_process_modules_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_instance_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def list_instance_process_threads_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_instance_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} + + def is_cloneable_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.is_cloneable_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} + + def list_site_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.v2020_12_01.models.BackupItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItem] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_backups_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} + + def list_sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} + + def get_migrate_my_sql_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_migrate_my_sql_status_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MigrateMySqlStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} + + def get_swift_virtual_network_connection_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def delete_swift_virtual_network_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_swift_virtual_network_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} + + def list_network_features_slot( + self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_network_features_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} + + def get_network_trace_operation_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} + + def start_web_site_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} + + + def _start_web_site_network_trace_operation_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_web_site_network_trace_operation_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} + + def stop_web_site_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_web_site_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} + + def get_network_traces_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} + + def get_network_trace_operation_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_trace_operation_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def get_network_traces_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_network_traces_slot_v2.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} + + def generate_new_site_publishing_password_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.generate_new_site_publishing_password_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} + + def list_perf_mon_counters_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.v2020_12_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_12_01.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_perf_mon_counters_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} + + def get_site_php_error_log_flag_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_php_error_log_flag_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} + + def list_premier_add_ons_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} + + def get_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def add_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def delete_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def update_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def get_private_access_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def put_private_access_vnet_slot( + self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def get_private_endpoint_connection_list_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + RemotePrivateEndpointConnectionARMResource + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RemotePrivateEndpointConnectionARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} + + def get_private_endpoint_connection_slot( + self, resource_group_name, name, private_endpoint_connection_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RemotePrivateEndpointConnectionARMResource or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_endpoint_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _approve_or_reject_private_endpoint_connection_slot_initial( + self, resource_group_name, name, private_endpoint_connection_name, slot, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) + + # Construct URL + url = self.approve_or_reject_private_endpoint_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def approve_or_reject_private_endpoint_connection_slot( + self, resource_group_name, name, private_endpoint_connection_name, slot, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 kind: Kind of resource. + :type kind: str + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + RemotePrivateEndpointConnectionARMResource or + ClientRawResponse if + raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + kind=kind, + private_link_service_connection_state=private_link_service_connection_state, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_private_endpoint_connection_slot_initial( + self, resource_group_name, name, private_endpoint_connection_name, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_private_endpoint_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('object', response) + if response.status_code == 202: + deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_private_endpoint_connection_slot( + self, resource_group_name, name, private_endpoint_connection_name, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get_private_link_resources_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_link_resources_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} + + def list_processes_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_processes_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} + + def get_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def delete_process_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_process_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} + + def get_process_dump_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_dump_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} + + def list_process_modules_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_modules_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} + + def get_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_process_module_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} + + def list_process_threads_slot( + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_process_threads_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} + + def list_public_certificates_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.v2020_12_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_public_certificates_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} + + def get_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate_slot( + self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_public_certificate_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} + + def list_publishing_profile_xml_with_secrets_slot( + self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/xml' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} + + def reset_slot_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} + + def restart_slot( + self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.restart_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} + + + def _restore_from_backup_blob_slot_initial( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_backup_blob_slot_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} + + + def _restore_from_deleted_app_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_deleted_app_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_deleted_app_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_from_deleted_app_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} + + + def _restore_snapshot_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_snapshot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_snapshot_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._restore_snapshot_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} + + def list_site_extensions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_extensions_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} + + def get_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + + def _install_site_extension_slot_initial( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.install_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteExtensionInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def delete_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_site_extension_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} + + def list_slot_differences_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_12_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} + + + def _swap_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._swap_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} + + def list_snapshots_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SnapshotPaged[~azure.mgmt.web.v2020_12_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} + + def list_snapshots_from_dr_secondary_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SnapshotPaged[~azure.mgmt.web.v2020_12_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} + + def get_source_control_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + + def _create_or_update_source_control_slot_initial( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def delete_source_control_slot( + self, resource_group_name, name, slot, additional_flags=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if additional_flags is not None: + query_parameters['additionalFlags'] = self._serialize.query("additional_flags", additional_flags, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def start_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} + + + def _start_network_trace_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} + + def stop_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} + + def stop_network_trace_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_network_trace_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} + + def sync_repository_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_repository_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} + + def sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_function_triggers_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} + + def list_triggered_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} + + def get_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history_slot( + self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_history_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def run_triggered_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.run_triggered_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} + + def list_usages_slot( + self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} + + def list_vnet_connections_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} + + def get_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection_slot( + self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection_slot( + self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + 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}'} + + def update_vnet_connection_gateway_slot( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """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 + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2020_12_01.models.WebJobPaged[~azure.mgmt.web.v2020_12_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} + + def get_web_job_slot( + self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} + + def list_slot_differences_from_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_12_01.models.SlotDifference] + :raises: + :class:`DefaultErrorResponseException` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_slot_differences_from_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} + + + def _swap_slot_with_production_initial( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = self.swap_slot_with_production.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_with_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): + """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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} + + def list_snapshots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SnapshotPaged[~azure.mgmt.web.v2020_12_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} + + def list_snapshots_from_dr_secondary( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SnapshotPaged[~azure.mgmt.web.v2020_12_01.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} + + def get_source_control( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + + def _create_or_update_source_control_initial( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SiteSourceControl or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def delete_source_control( + self, resource_group_name, name, additional_flags=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if additional_flags is not None: + query_parameters['additionalFlags'] = self._serialize.query("additional_flags", additional_flags, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} + + def start( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} + + + def _start_network_trace_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + 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, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} + + def stop( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} + + def stop_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.stop_network_trace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} + + def sync_repository( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_repository.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} + + def sync_function_triggers( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.sync_function_triggers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} + + def list_triggered_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} + + def get_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def delete_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} + + def list_triggered_web_job_history( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} + + def get_triggered_web_job_history( + self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_triggered_web_job_history.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} + + def run_triggered_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.run_triggered_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} + + def list_usages( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} + + def list_vnet_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_vnet_connections.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} + + def get_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def create_or_update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def delete_vnet_connection( + self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.delete_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def update_vnet_connection( + self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} + + def get_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def create_or_update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def update_vnet_connection_gateway( + self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_vnet_connection_gateway.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} + + def list_web_jobs( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.v2020_12_01.models.WebJobPaged[~azure.mgmt.web.v2020_12_01.models.WebJob] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_web_jobs.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} + + def get_web_job( + self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebJob or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_web_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebJob', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_site_management_client_operations.py new file mode 100644 index 00000000000..6f759903c01 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_site_management_client_operations.py @@ -0,0 +1,1125 @@ +# 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 msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from .. import models +import uuid + + +class WebSiteManagementClientOperationsMixin(object): + + def generate_github_access_token_for_appservice_cli_async( + self, code, state, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppserviceGithubToken or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + request = models.AppserviceGithubTokenRequest(code=code, state=state) + + # Construct URL + url = self.generate_github_access_token_for_appservice_cli_async.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'AppserviceGithubTokenRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppserviceGithubToken', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_github_access_token_for_appservice_cli_async.metadata = {'url': '/providers/Microsoft.Web/generateGithubAccessTokenForAppserviceCLI'} + + def get_publishing_user( + self, custom_headers=None, raw=False, **operation_config): + """Gets publishing user. + + Description for Gets publishing user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def update_publishing_user( + self, user_details, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.User or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_publishing_user.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(user_details, 'User') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} + + def list_source_controls( + self, custom_headers=None, raw=False, **operation_config): + """Gets the source controls available for Azure websites. + + Description for Gets the source controls available for Azure websites. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.web.v2020_12_01.models.SourceControlPaged[~azure.mgmt.web.v2020_12_01.models.SourceControl] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_source_controls.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} + + def get_source_control( + self, source_control_type, custom_headers=None, raw=False, **operation_config): + """Gets source control token. + + Description for Gets source control token. + + :param source_control_type: Type of source control + :type source_control_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def update_source_control( + self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_source_control.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request_message, 'SourceControl') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + + def list_billing_meters( + self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BillingMeter + :rtype: + ~azure.mgmt.web.v2020_12_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeter] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_billing_meters.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} + + def check_name_availability( + self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): + """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. 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceNameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) + + # Construct URL + url = self.check_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourceNameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} + + def get_subscription_deployment_locations( + self, custom_headers=None, raw=False, **operation_config): + """Gets list of available geo regions plus ministamps. + + Description for Gets list of available geo regions plus ministamps. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeploymentLocations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_subscription_deployment_locations.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeploymentLocations', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} + + def list_geo_regions( + self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + """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. Possible values + include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', + 'Isolated', 'IsolatedV2', 'PremiumV2', 'PremiumV3', + 'PremiumContainer', 'ElasticPremium', 'ElasticIsolated' + :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName + :param linux_workers_enabled: Specify true if you want to + filter to only regions that support Linux workers. + :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify true if you want to + filter to only regions that support Xenon workers. + :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify true if you + want to filter to only regions that support Linux Consumption Workers. + :type linux_dynamic_workers_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GeoRegion + :rtype: + ~azure.mgmt.web.v2020_12_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegion] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_geo_regions.metadata['url'] + 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 = {} + 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("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} + + def list_site_identifiers_assigned_to_host_name( + self, name=None, custom_headers=None, raw=False, **operation_config): + """List all apps that are assigned to a hostname. + + Description for List all apps that are assigned to a hostname. + + :param name: Name of the object. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.v2020_12_01.models.IdentifierPaged[~azure.mgmt.web.v2020_12_01.models.Identifier] + :raises: + :class:`DefaultErrorResponseException` + """ + name_identifier = models.NameIdentifier(name=name) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} + + def list_premier_add_on_offers( + self, custom_headers=None, raw=False, **operation_config): + """List all premier add-on offers. + + Description for List all premier add-on offers. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PremierAddOnOffer + :rtype: + ~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOffer] + :raises: + :class:`DefaultErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_premier_add_on_offers.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} + + def list_skus( + self, custom_headers=None, raw=False, **operation_config): + """List all SKUs. + + Description for List all SKUs. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SkuInfos or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SkuInfos', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} + + def verify_hosting_environment_vnet( + self, parameters, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VnetValidationFailureDetails or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.verify_hosting_environment_vnet.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VnetParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetValidationFailureDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} + + def move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} + + def validate( + self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.validate.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate_request, 'ValidateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidateResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} + + def validate_move( + self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): + """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 target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) + + # Construct URL + url = self.validate_move.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/version.py new file mode 100644 index 00000000000..ecde0bf7940 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/version.py @@ -0,0 +1,13 @@ +# 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" + From 40aa79d0fb4000cf2a86093936047dc7fae0dc48 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Thu, 29 Apr 2021 17:49:45 -0700 Subject: [PATCH 056/125] Clean up az kube create --- .../azext_appservice_kube/_help.py | 9 ++------- .../azext_appservice_kube/_params.py | 4 +--- .../azext_appservice_kube/custom.py | 17 ++++------------- 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index 0dbc2c58de9..20b77456357 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -51,14 +51,9 @@ type: command short-summary: Create a Kubernetes Environment. examples: - - name: Create Kubernetes Environment on existing AKS cluster in the same resource group. + - name: Create Kubernetes Environment text: | - az appservice kube create -n MyKubeEnvironment -g MyResourceGroup --aks MyAks --static-ip 0.0.0.0 - - name: Create Kubernetes Environment with default values. - text: | - az appservice kube create -n MyKubeEnvironment -g MyResourceGroup \\ - --client-id MyServicePrincipalClientId \\ - --client-secret MyServicePrincipalClientSecret + az appservice kube create -n MyKubeEnvironment -g MyResourceGroup --static-ip 0.0.0.0 """ helps['appservice kube show'] = """ diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 38eaf752775..a35a157fa20 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -159,11 +159,9 @@ def load_arguments(self, _): # App Service on Kubernetes Commands with self.argument_context('appservice kube create') as c: - c.argument('kube_name', arg_type=name_arg_type, help='Name of the kubernetes environment.') + c.argument('name', arg_type=name_arg_type, help='Name of the kubernetes environment.') c.argument('custom_location', options_list=['--custom-location', '-c'], help="ID of the custom location") - c.argument('internal_load_balancing', arg_type=get_three_state_flag(), help='Whether the Kube Environment is only visible within Vnet/Subnet.') c.argument('tags', arg_type=tags_type) - c.argument('aks', help='AKS name or resource ID') c.argument('static_ip', help='Static IP Address. This is required if an AKS resource ID is specified.') c.argument('no_wait', help='Do not wait for the create to complete, and return immediately after queuing the create.') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 98cfb0822b1..c8b15440e68 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -96,26 +96,18 @@ # pylint: disable=too-many-locals,too-many-lines -def create_kube_environment(cmd, client, kube_name, resource_group_name, custom_location, aks=None, static_ip=None, - location=None, internal_load_balancing=False, tags=None, no_wait=False): +def create_kube_environment(cmd, client, name, resource_group_name, custom_location, static_ip, + location=None, tags=None, no_wait=False): KubeEnvironment, ExtendedLocation, ArcConfiguration, FrontEndConfiguration = cmd.get_models('KubeEnvironment', 'ExtendedLocation', 'ArcConfiguration', 'FrontEndConfiguration') if not is_valid_resource_id(custom_location): raise CLIError('Invalid custom location') - if not internal_load_balancing and not static_ip: - raise CLIError('Usage error: --static-ip must be specified when not using --internal_load_balancing') - parsed_custom_location = parse_resource_id(custom_location) if parsed_custom_location['resource_type'].lower() != 'customlocations': raise CLIError('Invalid custom location') - if aks is not None: - aks_id = validate_aks_id(cmd.cli_ctx, aks, resource_group_name) - else: - aks_id = None - if not location: location = _get_location_from_resource_group(cmd.cli_ctx, parsed_custom_location['resource_group']) front_end_configuration = FrontEndConfiguration(kind="LoadBalancer") @@ -123,17 +115,16 @@ def create_kube_environment(cmd, client, kube_name, resource_group_name, custom_ arc_configuration = ArcConfiguration( artifacts_storage_type="NetworkFileSystem", artifact_storage_class_name="default", front_end_service_configuration=front_end_configuration) kube_environment = KubeEnvironment( - name=kube_name, + name=name, location=location, kind="null", tags=tags, plan=None, extended_location=extended_location, static_ip=static_ip, - aks_resource_id=aks_id, arc_configuration=arc_configuration) - return sdk_no_wait(no_wait, client.create, resource_group_name=resource_group_name, name=kube_name, kube_environment_envelope=kube_environment) + return sdk_no_wait(no_wait, client.create, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) def list_kube_environments(client, resource_group_name=None): From cb8c5935330a04e7ee8e8ab4a0013fdea6edfd6b Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 3 May 2021 09:13:59 -0700 Subject: [PATCH 057/125] Update to version 0.1.15 --- src/appservice-kube/HISTORY.rst | 5 +++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 5d3256b7d61..8aa20ac3f91 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.15 +++++++ +* Clean up az kube create parameters +* Update to 2020-12-01 SDK for k8se commands (removes --force parameter for az appservice kube delete) + 0.1.14 ++++++ * Stop using webapp list in creates - temporary fix for demo diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index dd06f6b4039..3dd7d8a2452 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.14' +VERSION = '0.1.15' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index c9e178884ff..47b301409a1 100644 --- a/src/index.json +++ b/src/index.json @@ -3896,6 +3896,38 @@ "version": "0.1.14" }, "sha256Digest": "99b2ddefbb9f413fe9ee545bb9d6e46568d312d0c97d1158bee5004bac61e5c1" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.15-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.15-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.15" + }, + "sha256Digest": "af23aaeda8bc0def74d2ffdbb95a86826ff2902f6706aecaf974d6b047414047" } ], "arcappliance": [ From f93c89814cb65bb6570e94539c25e946434b14ba Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 4 May 2021 19:11:33 -0700 Subject: [PATCH 058/125] Fix dotnet5 bug --- src/appservice-kube/azext_appservice_kube/custom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index c8b15440e68..fe97864b4be 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -457,6 +457,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo if not match: raise CLIError("Linux Runtime '{}' is not supported." "Please invoke 'list-runtimes' to cross check".format(runtime)) + match['setter'](cmd=cmd, stack=match, site_config=site_config) elif deployment_container_image_name: site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) if name_validation.name_available: From 40afbc46a95bd6d28fc3871c1ccb7c95d9594d2f Mon Sep 17 00:00:00 2001 From: Eben Carek Date: Wed, 5 May 2021 10:56:44 -0700 Subject: [PATCH 059/125] Converting skus for kubernetes ASPs to the new values --- .../azext_appservice_kube/_constants.py | 3 +-- .../azext_appservice_kube/_help.py | 2 +- .../azext_appservice_kube/_params.py | 5 ++-- .../azext_appservice_kube/_utils.py | 9 ++++--- .../azext_appservice_kube/_validators.py | 2 +- .../azext_appservice_kube/custom.py | 25 ++++++++----------- 6 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_constants.py b/src/appservice-kube/azext_appservice_kube/_constants.py index 81e8aeea81c..6bfabf7ca0c 100644 --- a/src/appservice-kube/azext_appservice_kube/_constants.py +++ b/src/appservice-kube/azext_appservice_kube/_constants.py @@ -4,8 +4,7 @@ # -------------------------------------------------------------------------------------------- -KUBE_DEFAULT_SKU = "ANY" -KUBE_SKUS = ['ANY', 'ELASTICANY'] +KUBE_DEFAULT_SKU = "K1" KUBE_ASP_KIND = "linux,kubernetes" KUBE_APP_KIND = "linux,kubernetes,app" KUBE_CONTAINER_APP_KIND = 'linux,kubernetes,app,container' diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index 20b77456357..ba09a418798 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -26,7 +26,7 @@ text: > az appservice plan create -g MyResourceGroup -n MyPlan \\ --custom-location /subscriptions//resourceGroups//providers/Microsoft.ExtendedLocation/customLocations/ \\ - --per-site-scaling --is-linux --sku ANY + --per-site-scaling --is-linux --sku K1 """ helps['appservice plan update'] = """ diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index a35a157fa20..93e3990d8c7 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -141,8 +141,7 @@ def load_arguments(self, _): help="Name or ID of the app service environment") c.argument('custom_location', options_list=['--custom-location', '-c'], help="Name or ID of the custom location") c.argument('sku', - help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), Any, ElasticAny') - c.argument('kube_sku', required=False, help='VM size or ANY', default=KUBE_DEFAULT_SKU, completer=get_kube_sku_completion_list, is_preview=True) + help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), K1 (Kubernetes)') c.argument('is_linux', action='store_true', required=False, help='host web app on Linux worker') c.argument('hyper_v', action='store_true', required=False, help='Host web app on Windows container', is_preview=True) c.argument('per_site_scaling', action='store_true', required=False, help='Enable per-app scaling at the ' @@ -153,7 +152,7 @@ def load_arguments(self, _): with self.argument_context('appservice plan update') as c: c.argument('sku', - help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), Any, ElasticAny', + help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), K1 (Kubernetes)', arg_type=sku_arg_type) c.ignore('allow_pending_state') diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index 45dd1de853d..3ac629704b7 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -6,7 +6,6 @@ from knack.util import CLIError from ._client_factory import web_client_factory, cf_resource_groups -from ._constants import KUBE_SKUS def _normalize_sku(sku): @@ -15,6 +14,10 @@ def _normalize_sku(sku): return 'F1' if sku == 'SHARED': return 'D1' + if sku == 'ANY' or sku == 'ELASTICANY': # old kube skus + return 'K1' + if sku == 'KUBE': + return 'K1' return sku @@ -38,8 +41,8 @@ def get_sku_name(tier): # pylint: disable=too-many-return-statements return 'ElasticPremium' if tier in ['I1', 'I2', 'I3']: return 'Isolated' - if tier in KUBE_SKUS: - return tier + if tier in ['K1']: + return 'Kubernetes' raise CLIError("Invalid sku(pricing tier), please refer to command help for valid values") diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py index 5f8928efa56..a40f9ef06f5 100644 --- a/src/appservice-kube/azext_appservice_kube/_validators.py +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -54,7 +54,7 @@ def validate_asp_create(cmd, namespace): "properties": { "skuName": _normalize_sku(namespace.sku) if namespace.sku else None, "capacity": namespace.number_of_workers or 1, - "needLinuxWorkers": namespace.is_linux, + "needLinuxWorkers": namespace.is_linux if namespace.custom_location is None else 'false', "isXenon": namespace.hyper_v } } diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index fe97864b4be..ff17f5773e2 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -72,7 +72,7 @@ from ._constants import (FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION, FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_VERSION_DEFAULT, NODE_EXACT_VERSION_DEFAULT, - DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, KUBE_SKUS, + DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, KUBE_ASP_KIND, KUBE_APP_KIND, KUBE_FUNCTION_APP_KIND, KUBE_FUNCTION_CONTAINER_APP_KIND, KUBE_CONTAINER_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES,CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) @@ -156,7 +156,7 @@ def list_app_service_plans(cmd, resource_group_name=None): def _validate_asp_sku(app_service_environment, custom_location, sku): # Isolated SKU is supported only for ASE - if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'ANY', 'ELASTICANY']: + if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: raise CLIError('Invalid sku entered: {}', sku) if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: @@ -167,13 +167,13 @@ def _validate_asp_sku(app_service_environment, custom_location, sku): raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") elif custom_location: - # Custom Location only supports Any and ElasticAny - if sku.upper() not in KUBE_SKUS: - raise CLIError("Only pricing tier 'Any' or 'ElasticAny' is allowed for this type of app service plan.") + # Custom Location only supports K1 + if sku.upper() != 'K1': + raise CLIError("Only pricing tier 'K1' is allowed for this type of app service plan.") def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, - app_service_environment=None, sku=None, kube_sku=KUBE_DEFAULT_SKU, + app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): if not sku: sku = 'B1' if not custom_location else KUBE_DEFAULT_SKU @@ -274,11 +274,8 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype if location is None: location = _get_location_from_resource_group(cmd.cli_ctx, resource_group_name) - if kube_environment: - sku_def = SkuDescription(tier=get_sku_name(sku), name=sku, capacity=number_of_workers) - else: - # the api is odd on parameter naming, have to live with it for now - sku_def = SkuDescription(tier=get_sku_name(sku), name=sku, capacity=number_of_workers) + # the api is odd on parameter naming, have to live with it for now + sku_def = SkuDescription(tier=get_sku_name(sku), name=sku, capacity=number_of_workers) plan_def = AppServicePlan(location=location, tags=tags, sku=sku_def, kind=kind, reserved=(is_linux or None), hyper_v=(hyper_v or None), name=name, @@ -406,7 +403,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo sku_tier = None if isinstance(plan_info.sku, SkuDescription): sku_tier = plan_info.sku.tier - _validate_asp_sku(app_service_environment=None, custom_location=custom_location, sku=plan_info.sku.tier) + _validate_asp_sku(app_service_environment=None, custom_location=custom_location, sku=plan_info.sku.name) is_linux = plan_info.reserved node_default_version = NODE_EXACT_VERSION_DEFAULT @@ -419,7 +416,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo https_only=using_webapp_up) is_kube = False - if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.tier.upper() in KUBE_SKUS): + if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU): if deployment_container_image_name: webapp_def.kind = KUBE_CONTAINER_APP_KIND else: @@ -805,7 +802,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, functionapp_def.location = location is_kube = False - if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.tier.upper() in KUBE_SKUS): + if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU): is_kube = True if is_kube: From 96760a250fd88ae64dd888b8582630e73a181c17 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 5 May 2021 13:32:58 -0700 Subject: [PATCH 060/125] 0.1.16 version --- src/appservice-kube/HISTORY.rst | 4 ++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 8aa20ac3f91..5232bf16862 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.16 +++++++ +* Change k8se app sku to "K1" instead of "ANY", "ELASTICANY" + 0.1.15 ++++++ * Clean up az kube create parameters diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 3dd7d8a2452..19ece08eb2d 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.15' +VERSION = '0.1.16' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 47b301409a1..be4ce20ba89 100644 --- a/src/index.json +++ b/src/index.json @@ -3928,6 +3928,38 @@ "version": "0.1.15" }, "sha256Digest": "af23aaeda8bc0def74d2ffdbb95a86826ff2902f6706aecaf974d6b047414047" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.16-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.16-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.16" + }, + "sha256Digest": "ebeeb8e176238c9ebd757c4c266ffdb01330b718f5da1dbc1ff8750120920404" } ], "arcappliance": [ From 692e4fad97550b81a986693f3e62f1e0ab2189d7 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Thu, 6 May 2021 08:59:40 -0700 Subject: [PATCH 061/125] Set number of workers to 1 when creating ASP --- src/appservice-kube/azext_appservice_kube/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index ff17f5773e2..f72f57e81f3 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -378,7 +378,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) create_app_service_plan(cmd=cmd, resource_group_name=resource_group_name, - name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True) + name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True, number_of_workers=1) if custom_location and plan: if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): @@ -779,7 +779,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) create_app_service_plan(cmd=cmd, resource_group_name=resource_group_name, - name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True) + name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True, number_of_workers=1) if custom_location and plan: if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): From ed34d7b53246089045405aec0ad62089eef2f422 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Thu, 6 May 2021 11:35:08 -0700 Subject: [PATCH 062/125] Add webapp scale command --- src/appservice-kube/azext_appservice_kube/_params.py | 3 +++ src/appservice-kube/azext_appservice_kube/commands.py | 1 + src/appservice-kube/azext_appservice_kube/custom.py | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 93e3990d8c7..34c5a85806f 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -81,6 +81,9 @@ def load_arguments(self, _): c.argument('environment', help="Name of the kube environment, if app is to be deployed to a k8 cluster", options_list=['--environment', '-e']) ''' + with self.argument_context('webapp scale') as c: + c.argument('number_of_workers', help='Number of workers to be allocated.', type=int, default=1) + with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 3eb88f7a5ba..e03066a92e6 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -76,6 +76,7 @@ def load_command_table(self, _): g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output, validator=validate_app_or_slot_exists_in_rg) # g.custom_command('up', 'webapp_up', exception_handler=ex_handler_factory()) + g.custom_command('scale', 'scale_webapp') with self.command_group('webapp config container') as g: g.custom_command('set', 'update_container_settings') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index f72f57e81f3..95eeb3947e1 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -157,7 +157,7 @@ def list_app_service_plans(cmd, resource_group_name=None): def _validate_asp_sku(app_service_environment, custom_location, sku): # Isolated SKU is supported only for ASE if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: - raise CLIError('Invalid sku entered: {}', sku) + raise CLIError('Invalid sku entered: {}'.format(sku)) if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: if not app_service_environment: @@ -535,6 +535,10 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo return webapp +def scale_webapp(cmd, resource_group_name, name, number_of_workers, slot=None): + return update_site_configs(cmd, resource_group_name, name, + number_of_workers=number_of_workers, slot=slot) + def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku=None, dryrun=False, logs=False, # pylint: disable=too-many-statements, launch_browser=False, html=False, environment=None): import os From c5c6f6b847dd7ee96181f6fdbec94c1fb3c23a34 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 7 May 2021 13:32:29 -0700 Subject: [PATCH 063/125] Version 0.1.17 with az webapp scale --- src/appservice-kube/HISTORY.rst | 4 ++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 5232bf16862..a4311fa4110 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.17 +++++++ +* az webapp scale command + 0.1.16 ++++++ * Change k8se app sku to "K1" instead of "ANY", "ELASTICANY" diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 19ece08eb2d..7cea1df8a57 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.16' +VERSION = '0.1.17' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index be4ce20ba89..7657a419662 100644 --- a/src/index.json +++ b/src/index.json @@ -3960,6 +3960,38 @@ "version": "0.1.16" }, "sha256Digest": "ebeeb8e176238c9ebd757c4c266ffdb01330b718f5da1dbc1ff8750120920404" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.17-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.17-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.17" + }, + "sha256Digest": "efac7dd91365530d5b5a37944baaae5acc0fccebc76178ff0df50bd139858080" } ], "arcappliance": [ From 859bdf5867349a4eaccb4d38b7a03a84e1cf8fa9 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 7 May 2021 22:59:41 -0700 Subject: [PATCH 064/125] rename az webapp scale param --- src/appservice-kube/azext_appservice_kube/_params.py | 2 +- src/appservice-kube/azext_appservice_kube/custom.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 34c5a85806f..b4da6624071 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -82,7 +82,7 @@ def load_arguments(self, _): ''' with self.argument_context('webapp scale') as c: - c.argument('number_of_workers', help='Number of workers to be allocated.', type=int, default=1) + c.argument('instance_count', help='Number of instances', type=int, default=1) with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 95eeb3947e1..d620cb2e099 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -535,9 +535,9 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo return webapp -def scale_webapp(cmd, resource_group_name, name, number_of_workers, slot=None): +def scale_webapp(cmd, resource_group_name, name, instance_count, slot=None): return update_site_configs(cmd, resource_group_name, name, - number_of_workers=number_of_workers, slot=slot) + number_of_workers=instance_count, slot=slot) def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku=None, dryrun=False, logs=False, # pylint: disable=too-many-statements, launch_browser=False, html=False, environment=None): From 9105dfdce58bf2d55b1e7ba6b6769a00ee252d54 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 12 May 2021 10:48:05 -0700 Subject: [PATCH 065/125] Move restart in from main CLI, since api returns 202 rather than 200. Need SDK update --- src/appservice-kube/azext_appservice_kube/commands.py | 2 ++ src/appservice-kube/azext_appservice_kube/custom.py | 4 ++++ .../v2020_09_01/operations/_web_apps_operations.py | 2 +- .../v2020_12_01/operations/_web_apps_operations.py | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index e03066a92e6..61cae29dcfc 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -77,6 +77,7 @@ def load_command_table(self, _): validator=validate_app_or_slot_exists_in_rg) # g.custom_command('up', 'webapp_up', exception_handler=ex_handler_factory()) g.custom_command('scale', 'scale_webapp') + g.custom_command('restart', 'restart_webapp') with self.command_group('webapp config container') as g: g.custom_command('set', 'update_container_settings') @@ -87,6 +88,7 @@ def load_command_table(self, _): with self.command_group('functionapp') as g: g.custom_command('create', 'create_function', exception_handler=ex_handler_factory()) g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output) + g.custom_command('restart', 'restart_webapp') with self.command_group('functionapp config container') as g: g.custom_command('set', 'update_container_settings_functionapp') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index d620cb2e099..2ae6c74264c 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -1573,6 +1573,10 @@ def _get_scm_url(cmd, resource_group_name, name, slot=None): raise ValueError('Failed to retrieve Scm Uri') +def restart_webapp(cmd, resource_group_name, name, slot=None): + return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'restart', slot) + + def _check_zip_deployment_status(cmd, rg_name, name, deployment_status_url, authorization, timeout=None): import requests from azure.cli.core.util import should_disable_connection_verify diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py index 070148b75ab..49197758c78 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py @@ -10692,7 +10692,7 @@ def restart( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.DefaultErrorResponseException(self._deserialize, response) if raw: diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py index edad3a79a5c..4b2b94e4776 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py @@ -11268,7 +11268,7 @@ def restart( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.DefaultErrorResponseException(self._deserialize, response) if raw: From db89855df0eec85657de2d99fc2dbd6ea5f7f423 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 7 May 2021 23:31:02 -0700 Subject: [PATCH 066/125] Change SDK to have extended location envelope manually - need to see why generating SDK locally is failing --- .../v2020_12_01/models/__init__.py | 3 ++ .../v2020_12_01/models/_models.py | 30 ++++++++++++++++ .../v2020_12_01/models/_models_py3.py | 34 +++++++++++++++++-- 3 files changed, 65 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py index 61c8bf6d6ac..5c5e86c54b3 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py @@ -132,6 +132,7 @@ from ._models_py3 import ErrorEntity from ._models_py3 import Experiments from ._models_py3 import ExtendedLocation + from ._models_py3 import ExtendedLocationEnvelope from ._models_py3 import Facebook from ._models_py3 import FileSystemApplicationLogsConfig from ._models_py3 import FileSystemHttpLogsConfig @@ -465,6 +466,7 @@ from ._models import ErrorEntity from ._models import Experiments from ._models import ExtendedLocation + from ._models import ExtendedLocationEnvelope from ._models import Facebook from ._models import FileSystemApplicationLogsConfig from ._models import FileSystemHttpLogsConfig @@ -946,6 +948,7 @@ 'ErrorEntity', 'Experiments', 'ExtendedLocation', + 'ExtendedLocationEnvelope', 'Facebook', 'FileSystemApplicationLogsConfig', 'FileSystemHttpLogsConfig', diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py index e13ccf6571e..ebeaff920c5 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py @@ -1699,6 +1699,9 @@ class AppServicePlan(Resource): ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProfile :param sku: :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param extended_location: Extended location Envelope + :type extended_location: + ~azure.mgmt.web.v2020_12_01.models.ExtendedLocationEnvelope """ _validation = { @@ -1722,6 +1725,7 @@ class AppServicePlan(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocationEnvelope'}, 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, 'subscription': {'key': 'properties.subscription', 'type': 'str'}, @@ -1767,6 +1771,7 @@ def __init__(self, **kwargs): 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) + self.extended_location = kwargs.get('extended_location', None) self.sku = kwargs.get('sku', None) @@ -6047,6 +6052,26 @@ def __init__(self, **kwargs): self.ramp_up_rules = kwargs.get('ramp_up_rules', None) +class ExtendedLocationEnvelope(Model): + """ExtendedLocationEnvelope. + + :ivar name: Resource Name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExtendedLocationEnvelope, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + class ExtendedLocation(Model): """ExtendedLocation. @@ -11271,6 +11296,9 @@ class Site(Resource): :type storage_account_required: bool :param identity: :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :param extended_location: Extended location Envelope + :type extended_location: + ~azure.mgmt.web.v2020_12_01.models.ExtendedLocationEnvelope """ _validation = { @@ -11346,6 +11374,7 @@ class Site(Resource): 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocationEnvelope'}, } def __init__(self, **kwargs): @@ -11391,6 +11420,7 @@ def __init__(self, **kwargs): self.in_progress_operation_id = None self.storage_account_required = kwargs.get('storage_account_required', None) self.identity = kwargs.get('identity', None) + self.extended_location = kwargs.get('extended_location', None) class SiteAuthSettings(ProxyOnlyResource): diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py index 9074741abde..5b491f73771 100644 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py +++ b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py @@ -1699,6 +1699,9 @@ class AppServicePlan(Resource): ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProfile :param sku: :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param extended_location: Extended location Envelope + :type extended_location: + ~azure.mgmt.web.v2020_12_01.models.ExtendedLocationEnvelope """ _validation = { @@ -1720,6 +1723,7 @@ class AppServicePlan(Resource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocationEnvelope'} 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, @@ -1745,7 +1749,7 @@ class AppServicePlan(Resource): 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, sku=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, extended_location=None, sku=None, **kwargs) -> None: super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.worker_tier_name = worker_tier_name self.status = None @@ -1767,6 +1771,7 @@ def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name self.target_worker_size_id = target_worker_size_id self.provisioning_state = None self.kube_environment_profile = kube_environment_profile + self.extended_location = extended_location self.sku = sku @@ -6047,6 +6052,26 @@ def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: self.ramp_up_rules = ramp_up_rules +class ExtendedLocationEnvelope(Model): + """ExtendedLocationEnvelope. + + :ivar name: Resource Name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, = + } + + def __init__(self, *, name: str, type: str, **kwargs) -> None: + super(ExtendedLocationEnvelope, self).__init__(**kwargs) + self.name = name + self.type = type + + class ExtendedLocation(Model): """ExtendedLocation. @@ -11271,6 +11296,9 @@ class Site(Resource): :type storage_account_required: bool :param identity: :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :param extended_location: Extended location Envelope + :type extended_location: + ~azure.mgmt.web.v2020_12_01.models.ExtendedLocationEnvelope """ _validation = { @@ -11346,9 +11374,10 @@ class Site(Resource): 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocationEnvelope'} } - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, key_vault_reference_identity: str=None, https_only: bool=None, redundancy_mode=None, storage_account_required: bool=None, identity=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, key_vault_reference_identity: str=None, https_only: bool=None, redundancy_mode=None, storage_account_required: bool=None, identity=None, extended_location=None, **kwargs) -> None: super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.state = None self.host_names = None @@ -11391,6 +11420,7 @@ def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=No self.in_progress_operation_id = None self.storage_account_required = storage_account_required self.identity = identity + self.extended_location = extended_location class SiteAuthSettings(ProxyOnlyResource): From 4ce2e592f5891ce96875c8dc37a621896d2b7f79 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 12 May 2021 09:08:47 -0700 Subject: [PATCH 067/125] Pass ExtendedLocationEnvelope to web/functionapp, appservice plan and kube environment creates --- .../azext_appservice_kube/custom.py | 43 ++++++++++++++++--- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 2ae6c74264c..2216b5879e2 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -219,11 +219,24 @@ def _get_kube_env_from_custom_location(cmd, custom_location): return kube_environment_id +def _get_custom_location_id_from_custom_location(cmd, custom_location_name): + if is_valid_resource_id(custom_location_name): + return custom_location_name + + kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() + for kube in kube_envs: + if kube.extended_location and kube.extended_location.custom_location: + parsed_custom_location = parse_resource_id(kube.extended_location.custom_location) + if parsed_custom_location.get("name").lower() == custom_location_name.lower(): + return kube.extended_location.custom_location + return None + + def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): - HostingEnvironmentProfile, SkuDescription, AppServicePlan, KubeEnvironmentProfile = cmd.get_models( - 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan', 'KubeEnvironmentProfile') + HostingEnvironmentProfile, SkuDescription, AppServicePlan, KubeEnvironmentProfile, ExtendedLocationEnvelope = cmd.get_models( + 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan', 'KubeEnvironmentProfile', 'ExtendedLocationEnvelope') sku = _normalize_sku(sku) _validate_asp_sku(app_service_environment, custom_location, sku) @@ -255,6 +268,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype else: # Non-ASE ase_def = None + extended_location_envelope = None if kube_environment and ase_def is None: kube_id = _resolve_kube_environment_id(cmd.cli_ctx, kube_environment, resource_group_name) kube_def = KubeEnvironmentProfile(id=kube_id) @@ -264,6 +278,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype kube_rg = parsed_id.get("resource_group") if kube_name is not None and kube_rg is not None: kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) + extended_location_envelope = ExtendedLocationEnvelope(name=kube_env.extended_location.custom_location, type="CustomLocation") if kube_env is not None: location = kube_env.location else: @@ -280,7 +295,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype plan_def = AppServicePlan(location=location, tags=tags, sku=sku_def, kind=kind, reserved=(is_linux or None), hyper_v=(hyper_v or None), name=name, per_site_scaling=per_site_scaling, hosting_environment_profile=ase_def, - kube_environment_profile=kube_def) + kube_environment_profile=kube_def, extended_location=extended_location_envelope) return sdk_no_wait(no_wait, client.app_service_plans.create_or_update, name=name, resource_group_name=resource_group_name, app_service_plan=plan_def) @@ -341,8 +356,8 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo multicontainer_config_type=None, multicontainer_config_file=None, tags=None, using_webapp_up=False, language=None, assign_identities=None, role='Contributor', scope=None, min_worker_count=None, max_worker_count=None): - SiteConfig, SkuDescription, Site, NameValuePair = cmd.get_models( - 'SiteConfig', 'SkuDescription', 'Site', 'NameValuePair') + SiteConfig, SkuDescription, Site, NameValuePair, ExtendedLocationEnvelope = cmd.get_models( + 'SiteConfig', 'SkuDescription', 'Site', 'NameValuePair', 'ExtendedLocationEnvelope') if deployment_source_url and deployment_local_git: raise CLIError('usage error: --deployment-source-url | --deployment-local-git') @@ -417,11 +432,18 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo is_kube = False if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU): + is_kube = True if deployment_container_image_name: webapp_def.kind = KUBE_CONTAINER_APP_KIND else: webapp_def.kind = KUBE_APP_KIND - is_kube = True + + if custom_location: # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP + custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location) + if custom_location_id: + webapp_def.extended_location = ExtendedLocationEnvelope(name=custom_location_id, type="CustomLocation") + else: + webapp_def.extended_location = plan_info.extended_location if is_kube: if min_worker_count is not None: @@ -757,7 +779,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if consumption_plan_location and plan: raise MutuallyExclusiveArgumentError("Consumption Plan and Plan cannot be used together") - SiteConfig, Site, NameValuePair = cmd.get_models('SiteConfig', 'Site', 'NameValuePair') + SiteConfig, Site, NameValuePair, ExtendedLocationEnvelope = cmd.get_models('SiteConfig', 'Site', 'NameValuePair', 'ExtendedLocationEnvelope') docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) site_config = SiteConfig(app_settings=[]) @@ -849,6 +871,13 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) if is_kube: + if custom_location: # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP + custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location) + if custom_location_id: + functionapp_def.extended_location = ExtendedLocationEnvelope(name=custom_location_id, type="CustomLocation") + else: + functionapp_def.extended_location = plan_info.extended_location + functionapp_def.kind = KUBE_FUNCTION_APP_KIND functionapp_def.reserved = True site_config.app_settings.append(NameValuePair(name='WEBSITES_PORT', value='80')) From 908dd85457c1a31de40d2f119b680d9f3557023d Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Thu, 13 May 2021 09:25:58 -0700 Subject: [PATCH 068/125] Version 0.1.18 --- src/appservice-kube/HISTORY.rst | 5 +++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index a4311fa4110..e493cceeefd 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.18 +++++++ +* Handle 202 response from webapp/functionapp restart (edited SDK manually) +* Pass ExtendedLocationEnvelope in webapp/functionapp/plan/kube creates (edited SDK manually) + 0.1.17 ++++++ * az webapp scale command diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 7cea1df8a57..8640bcf19d9 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.17' +VERSION = '0.1.18' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 7657a419662..80cd99d5ddf 100644 --- a/src/index.json +++ b/src/index.json @@ -3992,6 +3992,38 @@ "version": "0.1.17" }, "sha256Digest": "efac7dd91365530d5b5a37944baaae5acc0fccebc76178ff0df50bd139858080" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.18-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.18-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.18" + }, + "sha256Digest": "0b8a79b3ced746526c2efe53c6e5c29c2bf4ccf35a1c1877bb3e916848e4bf12" } ], "arcappliance": [ From 5f12407b12e7188783a3467467885cd238005ba1 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 14 May 2021 11:04:45 -0700 Subject: [PATCH 069/125] Remove webapp up from extension --- .../azext_appservice_kube/_help.py | 28 --- .../azext_appservice_kube/_params.py | 15 -- .../azext_appservice_kube/commands.py | 1 - .../azext_appservice_kube/custom.py | 181 +----------------- 4 files changed, 4 insertions(+), 221 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index ba09a418798..d2abec08890 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -94,31 +94,3 @@ az appservice kube wait -g MyResourceGroup -n MyKubeEnvironment \\ --created --interval 60 """ - -helps['webapp up'] = """ -type: command -short-summary: > - Create a webapp and deploy code from a local workspace to the app. The command is required to run from the folder - where the code is present. Current support includes Node, Python, .NET Core and ASP.NET. Node, - Python apps are created as Linux apps. .Net Core, ASP.NET, and static HTML apps are created as Windows apps. - Append the html flag to deploy as a static HTML app. -examples: - - name: View the details of the app that will be created, without actually running the operation - text: > - az webapp up -n MyUniqueAppName --dryrun - - name: Create a web app with the default configuration, by running the command from the folder where the code to deployed exists. - text: > - az webapp up -n MyUniqueAppName -l locationName - - name: Create a web app in a specific region, by running the command from the folder where the code to deployed exists. - text: > - az webapp up -n MyUniqueAppName -l locationName - - name: Deploy new code to an app that was originally created using the same command - text: > - az webapp up -n MyUniqueAppName -l locationName - - name: Create a web app and enable log streaming after the deployment operation is complete. This will enable the default configuration required to enable log streaming. - text: > - az webapp up -n MyUniqueAppName --logs - - name: Create a web app and deploy as a static HTML app. - text: > - az webapp up -n MyUniqueAppName --html -""" diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index b4da6624071..45b9ec5a649 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -66,21 +66,6 @@ def load_arguments(self, _): c.ignore('language') c.ignore('using_webapp_up') - ''' - with self.argument_context('webapp up') as c: - c.argument('name', arg_type=webapp_name_arg_type) - c.argument('plan', options_list=['--plan', '-p'], configured_default='appserviceplan', - completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), - help="name of the appserviceplan associated with the webapp") - c.argument('sku', arg_type=sku_arg_type) - c.argument('dryrun', help="show summary of the create and deploy operation instead of executing it", default=False, action='store_true') - c.argument('location', arg_type=get_location_type(self.cli_ctx)) - c.argument('launch_browser', help="Launch the created app using the default browser", default=False, action='store_true', options_list=['--launch-browser', '-b']) - c.argument('logs', help="Configure default logging required to enable viewing log stream immediately after launching the webapp", default=False, action='store_true') - c.argument('html', help="Ignore app detection and deploy as an html app", default=False, action='store_true') - c.argument('environment', help="Name of the kube environment, if app is to be deployed to a k8 cluster", options_list=['--environment', '-e']) - ''' - with self.argument_context('webapp scale') as c: c.argument('instance_count', help='Number of instances', type=int, default=1) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 61cae29dcfc..3cd380f73d4 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -75,7 +75,6 @@ def load_command_table(self, _): g.custom_command('create', 'create_webapp', exception_handler=ex_handler_factory()) g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output, validator=validate_app_or_slot_exists_in_rg) - # g.custom_command('up', 'webapp_up', exception_handler=ex_handler_factory()) g.custom_command('scale', 'scale_webapp') g.custom_command('restart', 'restart_webapp') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 2216b5879e2..bd5c994f704 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -50,11 +50,13 @@ _get_url, _StackRuntimeHelper, upload_zip_to_storage, - is_plan_consumption) + is_plan_consumption, + _configure_default_logging, + assign_identity) from azure.cli.command_modules.appservice.utils import retryable_method -from azure.cli.core.util import sdk_no_wait, shell_safe_json_parse, get_json_object, in_cloud_console +from azure.cli.core.util import sdk_no_wait, shell_safe_json_parse, get_json_object, ConfiguredDefaultSetter from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands import LongRunningOperation @@ -561,181 +563,6 @@ def scale_webapp(cmd, resource_group_name, name, instance_count, slot=None): return update_site_configs(cmd, resource_group_name, name, number_of_workers=instance_count, slot=slot) -def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku=None, dryrun=False, logs=False, # pylint: disable=too-many-statements, - launch_browser=False, html=False, environment=None): - import os - is_kube = False - kube_sku=KUBE_DEFAULT_SKU - KubeEnvironmentProfile = cmd.get_models('KubeEnvironmentProfile') - if environment is not None: - if resource_group_name is None: - raise CLIError("Must provide a resource group where Kube Environment '{}' exists".format(kube_environment)) - kube_id = _resolve_kube_environment_id(cmd.cli_ctx, environment, resource_group_name) - is_kube = True - kube_def = KubeEnvironmentProfile(id=kube_id) - parsed_id = parse_resource_id(kube_id) - kube_name = parsed_id.get("name") - kube_rg = parsed_id.get("resource_group") - if kube_name is not None and kube_rg is not None: - kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) - if kube_env is not None and kube_env.location is not None: - location = kube_env.location.replace(" ", "") - else: - raise CLIError("Kube Environment '{}' not found in subscription.".format(kube_id)) - AppServicePlan = cmd.get_models('AppServicePlan') - src_dir = os.getcwd() - _src_path_escaped = "{}".format(src_dir.replace(os.sep, os.sep + os.sep)) - client = web_client_factory(cmd.cli_ctx) - user = get_profile_username() - _create_new_rg = False - _create_new_app = does_app_already_exist(cmd, name) - os_name = detect_os_form_src(src_dir, html) - lang_details = get_lang_from_content(src_dir, html) - language = lang_details.get('language') - # detect the version - data = get_runtime_version_details(lang_details.get('file_loc'), language, is_kube) - version_used_create = data.get('to_create') - detected_version = data.get('detected') - runtime_version = "{}|{}".format(language, version_used_create) if \ - version_used_create != "-" else version_used_create - site_config = None - if not _create_new_app: # App exists - # Get the ASP & RG info, if the ASP & RG parameters are provided we use those else we need to find those - logger.warning("Webapp %s already exists. The command will deploy contents to the existing app.", name) - app_details = get_app_details(cmd, name, resource_group_name) - if app_details is None: - raise CLIError("Unable to retrieve details of the existing app {}. Please check that the app is a part of " - "the current subscription".format(name)) - current_rg = app_details.resource_group - if resource_group_name is not None and (resource_group_name.lower() != current_rg.lower()): - raise CLIError("The webapp {} exists in ResourceGroup {} and does not match the value entered {}. Please " - "re-run command with the correct parameters.". format(name, current_rg, resource_group_name)) - rg_name = resource_group_name or current_rg - if location is None: - loc = app_details.location.replace(" ", "").lower() - else: - loc = location.replace(" ", "").lower() - plan_details = parse_resource_id(app_details.server_farm_id) - current_plan = plan_details['name'] - if plan is not None and current_plan.lower() != plan.lower(): - raise CLIError("The plan name entered {} does not match the plan name that the webapp is hosted in {}." - "Please check if you have configured defaults for plan name and re-run command." - .format(plan, current_plan)) - plan = plan or plan_details['name'] - plan_info = client.app_service_plans.get(rg_name, plan) - sku = plan_info.sku.name if isinstance(plan_info, AppServicePlan) else 'Free' - current_os = 'Linux' if plan_info.reserved else 'Windows' - # Raise error if current OS of the app is different from the current one - if current_os.lower() != os_name.lower(): - raise CLIError("The webapp {} is a {} app. The code detected at '{}' will default to " - "'{}'. " - "Please create a new app to continue this operation.".format(name, current_os, src_dir, os)) - _is_linux = plan_info.reserved - # for an existing app check if the runtime version needs to be updated - # Get site config to check the runtime version - site_config = client.web_apps.get_configuration(rg_name, name) - else: # need to create new app, check if we need to use default RG or use user entered values - logger.warning("webapp %s doesn't exist", name) - sku = "" - if is_kube: - sku = kube_sku - loc = location - rg_name = kube_rg - _create_new_rg = False - _is_linux = False - plan = get_kube_plan_to_use(cmd, environment, loc, sku, rg_name, _create_new_rg, plan) - sku_name = kube_sku - else: - sku = get_sku_to_use(src_dir, html, sku) - loc = set_location(cmd, sku, location) - rg_name = get_rg_to_use(cmd, user, loc, os_name, resource_group_name) - _is_linux = os_name.lower() == 'linux' - _create_new_rg = should_create_new_rg(cmd, rg_name, _is_linux) - sku_name = get_sku_name(sku) - plan = get_plan_to_use(cmd, user, os_name, loc, sku_name, rg_name, _create_new_rg, plan) - dry_run_str = r""" { - "name" : "%s", - "appserviceplan" : "%s", - "resourcegroup" : "%s", - "sku": "%s", - "os": "%s", - "location" : "%s", - "src_path" : "%s", - "runtime_version_detected": "%s", - "runtime_version": "%s" - } - """ % (name, plan, rg_name, sku_name, os_name, loc, _src_path_escaped, detected_version, - runtime_version) - create_json = json.loads(dry_run_str) - - if dryrun: - logger.warning("Web app will be created with the below configuration,re-run command " - "without the --dryrun flag to create & deploy a new app") - return create_json - if _create_new_rg: - logger.warning("Creating Resource group '%s' ...", rg_name) - create_resource_group(cmd, rg_name, location) - logger.warning("Resource group creation complete") - # create ASP - logger.warning("Creating AppServicePlan '%s' ...", plan) - if is_kube: - logger.warning("Creating AppServicePlan '%s' with 1 instance count on kube cluster '%s' ...", plan, environment) - else: - logger.warning("Creating AppServicePlan '%s' ...", plan) - # we will always call the ASP create or update API so that in case of re-deployment, if the SKU or plan setting are - # updated we update those - create_app_service_plan(cmd, rg_name, plan, _is_linux, hyper_v=False, per_site_scaling=False, sku=sku, - number_of_workers=1 if _is_linux else None, location=location, kube_environment=environment) - logger.warning("Successfully AppServicePlan '%s' ...", plan) - if _create_new_app: - logger.warning("Creating webapp '%s' ...", name) - create_webapp(cmd, rg_name, name, plan, runtime_version if _is_linux or is_kube else None, - using_webapp_up=True, language=language) - if not is_kube: - _configure_default_logging(cmd, rg_name, name) - else: - logger.warning("Successfully App '%s' on Kube Cluster '%s'...", plan, environment) - else: # for existing app if we might need to update the stack runtime settings - if os_name.lower() == 'linux' and site_config.linux_fx_version != runtime_version: - logger.warning('Updating runtime version from %s to %s', - site_config.linux_fx_version, runtime_version) - update_site_configs(cmd, rg_name, name, linux_fx_version=runtime_version) - elif os_name.lower() == 'windows' and site_config.windows_fx_version != runtime_version: - logger.warning('Updating runtime version from %s to %s', - site_config.windows_fx_version, runtime_version) - update_site_configs(cmd, rg_name, name, windows_fx_version=runtime_version) - create_json['runtime_version'] = runtime_version - # Zip contents & Deploy - logger.warning("Creating zip with contents of dir %s ...", src_dir) - # zip contents & deploy - zip_file_path = zip_contents_from_dir(src_dir, language, is_kube) - enable_zip_deploy(cmd, rg_name, name, zip_file_path, is_kube=is_kube) - # Remove the file after deployment, handling exception if user removed the file manually - try: - os.remove(zip_file_path) - except OSError: - pass - - if launch_browser: - logger.warning("Launching app using default browser") - view_in_browser(cmd, rg_name, name, None, logs) - else: - _url = _get_url(cmd, rg_name, name) - logger.warning("You can launch the app at %s", _url) - create_json.update({'URL': _url}) - if logs: - if not is_kube: - _configure_default_logging(cmd, rg_name, name) - return get_streaming_log(cmd, rg_name, name) - if not is_kube: - with ConfiguredDefaultSetter(cmd.cli_ctx.config, True): - cmd.cli_ctx.config.set_value('defaults', 'group', rg_name) - cmd.cli_ctx.config.set_value('defaults', 'sku', sku) - cmd.cli_ctx.config.set_value('defaults', 'appserviceplan', plan) - cmd.cli_ctx.config.set_value('defaults', 'location', loc) - cmd.cli_ctx.config.set_value('defaults', 'web', name) - return create_json - def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): webapp = app_instance From 0f85643fc426062e723bdc4433730d336eed76b3 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 14 May 2021 11:26:31 -0700 Subject: [PATCH 070/125] Use delete_app_settings function from cli core --- .../azext_appservice_kube/custom.py | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index bd5c994f704..2a0bf97d924 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -52,7 +52,8 @@ upload_zip_to_storage, is_plan_consumption, _configure_default_logging, - assign_identity) + assign_identity, + delete_app_settings) from azure.cli.command_modules.appservice.utils import retryable_method @@ -1012,28 +1013,6 @@ def update_site_configs(cmd, resource_group_name, name, slot=None, number_of_wor return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'update_configuration', slot, configs) -def delete_app_settings(cmd, resource_group_name, name, setting_names, slot=None): - app_settings = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'list_application_settings', slot) - client = web_client_factory(cmd.cli_ctx) - - slot_cfg_names = client.web_apps.list_slot_configuration_names(resource_group_name, name) - is_slot_settings = False - for setting_name in setting_names: - app_settings.properties.pop(setting_name, None) - if slot_cfg_names.app_setting_names and setting_name in slot_cfg_names.app_setting_names: - slot_cfg_names.app_setting_names.remove(setting_name) - is_slot_settings = True - - if is_slot_settings: - client.web_apps.update_slot_configuration_names(resource_group_name, name, slot_cfg_names) - - result = _generic_settings_operation(cmd.cli_ctx, resource_group_name, name, - 'update_application_settings', - app_settings.properties, slot, client) - - return _build_app_settings_output(result.properties, slot_cfg_names.app_setting_names) - - def config_source_control(cmd, resource_group_name, name, repo_url, repository_type='git', branch=None, # pylint: disable=too-many-locals manual_integration=None, git_token=None, slot=None, cd_app_type=None, app_working_dir=None, nodejs_task_runner=None, python_framework=None, From 1f2e1d3ff706ac8abbe75008c10b1998113c682b Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 17 May 2021 08:38:00 -0700 Subject: [PATCH 071/125] Use webapp validator from core CLI --- .../azext_appservice_kube/_validators.py | 44 ++----------------- 1 file changed, 4 insertions(+), 40 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py index a40f9ef06f5..0643aad64b6 100644 --- a/src/appservice-kube/azext_appservice_kube/_validators.py +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -5,6 +5,10 @@ from knack.util import CLIError from msrestazure.tools import is_valid_resource_id, parse_resource_id +from azure.cli.command_modules.appservice.custom import ( + validate_site_create, + validate_app_or_slot_exists_in_rg +) from azure.cli.core.commands.client_factory import get_mgmt_service_client from ._client_factory import web_client_factory from ._utils import _normalize_sku @@ -63,33 +67,6 @@ def validate_asp_create(cmd, namespace): raise CLIError(validation.error.message) -def validate_site_create(cmd, namespace): - """Validate the SiteName that is being used to create is available - This API requires that the RG is already created""" - client = web_client_factory(cmd.cli_ctx) - if isinstance(namespace.name, str) and isinstance(namespace.resource_group_name, str) \ - and isinstance(namespace.plan, str): - resource_group_name = namespace.resource_group_name - plan = namespace.plan - if is_valid_resource_id(plan): - parsed_result = parse_resource_id(plan) - plan_info = client.app_service_plans.get(parsed_result['resource_group'], parsed_result['name']) - else: - plan_info = client.app_service_plans.get(resource_group_name, plan) - # verify that the name is available for create - validation_payload = { - "name": namespace.name, - "type": "Microsoft.Web/sites", - "location": plan_info.location, - "properties": { - "serverfarmId": plan_info.id - } - } - validation = client.validate(resource_group_name, validation_payload) - if validation.status.lower() == "failure" and validation.error.code != 'SiteAlreadyExists': - raise CLIError(validation.error.message) - - def validate_nodes_count(namespace): """Validates that node_count and max_count is set between 1-100""" if namespace.node_count is not None: @@ -107,16 +84,3 @@ def validate_nodepool_name(namespace): raise CLIError('--nodepool-name can contain at most 12 characters') if not namespace.nodepool_name.isalnum(): raise CLIError('--nodepool-name should contain only alphanumeric characters') - - -def validate_app_or_slot_exists_in_rg(cmd, namespace): - """Validate that the App/slot exists in the RG provided""" - client = web_client_factory(cmd.cli_ctx) - webapp = namespace.name - resource_group_name = namespace.resource_group_name - if isinstance(namespace.slot, str): - app = client.web_apps.get_slot(resource_group_name, webapp, namespace.slot, raw=True) - else: - app = client.web_apps.get(resource_group_name, webapp, None, raw=True) - if app.response.status_code != 200: - raise CLIError(app.response.text) From 3cfdb048d888f832f14adffa36a72fe40a86f8ca Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 17 May 2021 10:18:58 -0700 Subject: [PATCH 072/125] Use updated update_app_settings function from core CLI --- .../azext_appservice_kube/custom.py | 52 +------------------ 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 2a0bf97d924..977f65d4861 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -53,7 +53,8 @@ is_plan_consumption, _configure_default_logging, assign_identity, - delete_app_settings) + delete_app_settings, + update_app_settings) from azure.cli.command_modules.appservice.utils import retryable_method @@ -894,55 +895,6 @@ def try_create_application_insights(cmd, functionapp): ['APPINSIGHTS_INSTRUMENTATIONKEY={}'.format(appinsights.instrumentation_key)]) -def update_app_settings(cmd, resource_group_name, name, settings=None, slot=None, slot_settings=None): - if not settings and not slot_settings: - raise CLIError('Usage Error: --settings |--slot-settings') - - settings = settings or [] - slot_settings = slot_settings or [] - - app_settings = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, - 'list_application_settings', slot) - result, slot_result = {}, {} - # pylint: disable=too-many-nested-blocks - for src, dest in [(settings, result), (slot_settings, slot_result)]: - for s in src: - try: - temp = shell_safe_json_parse(s) - if isinstance(temp, list): # a bit messy, but we'd like accept the output of the "list" command - for t in temp: - if t.get('slotSetting', True): - slot_result[t['name']] = t['value'] - # Mark each setting as the slot setting - else: - result[t['name']] = t['value'] - else: - dest.update(temp) - except CLIError: - setting_name, value = s.split('=', 1) - dest[setting_name] = value - - result.update(slot_result) - for setting_name, value in result.items(): - app_settings.properties[setting_name] = value - client = web_client_factory(cmd.cli_ctx) - - result = _generic_settings_operation(cmd.cli_ctx, resource_group_name, name, - 'update_application_settings', - app_settings.properties, slot, client) - - app_settings_slot_cfg_names = [] - if slot_result: - new_slot_setting_names = slot_result.keys() - slot_cfg_names = client.web_apps.list_slot_configuration_names(resource_group_name, name) - slot_cfg_names.app_setting_names = slot_cfg_names.app_setting_names or [] - slot_cfg_names.app_setting_names += new_slot_setting_names - app_settings_slot_cfg_names = slot_cfg_names.app_setting_names - client.web_apps.update_slot_configuration_names(resource_group_name, name, slot_cfg_names) - - return _build_app_settings_output(result.properties, app_settings_slot_cfg_names) - - # for any modifications to the non-optional parameters, adjust the reflection logic accordingly # in the method # pylint: disable=unused-argument From 17dfd661fccff743176f45a14be3d92f96fc2104 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 17 May 2021 10:42:47 -0700 Subject: [PATCH 073/125] 0.1.19 version --- src/appservice-kube/HISTORY.rst | 5 +++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index e493cceeefd..4034e4894a2 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.19 +++++++ +* Use update and delete appsettings from core CLI +* Remove webapp up code (not in use) + 0.1.18 ++++++ * Handle 202 response from webapp/functionapp restart (edited SDK manually) diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 8640bcf19d9..8a5fe099f28 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.18' +VERSION = '0.1.19' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 80cd99d5ddf..0240d10a93a 100644 --- a/src/index.json +++ b/src/index.json @@ -4024,6 +4024,38 @@ "version": "0.1.18" }, "sha256Digest": "0b8a79b3ced746526c2efe53c6e5c29c2bf4ccf35a1c1877bb3e916848e4bf12" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.19-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.19-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.19" + }, + "sha256Digest": "cb3057feaaf95dbe96470720becae5f13abc86d08ec0ba71879e7e497762fe03" } ], "arcappliance": [ From 02770ebc00c736d8785ca33b1681d3880ac54594 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 17 May 2021 10:59:56 -0700 Subject: [PATCH 074/125] Fix regression when using main CLI validators --- .../azext_appservice_kube/_params.py | 3 ++- .../azext_appservice_kube/_validators.py | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 45b9ec5a649..f842f5f19a9 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -6,6 +6,7 @@ from knack.arguments import CLIArgumentType +from azure.cli.command_modules.appservice._validators import (validate_site_create) from azure.cli.core.commands.parameters import (resource_group_name_type, get_location_type, get_resource_name_completion_list, get_three_state_flag, get_enum_type, tags_type) @@ -13,7 +14,7 @@ from ._completers import get_kube_sku_completion_list, get_vm_size_completion_list from ._constants import (FUNCTIONS_VERSIONS, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, KUBE_DEFAULT_SKU, LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES, OS_TYPES) -from ._validators import validate_site_create, validate_asp_create, validate_nodes_count, validate_nodepool_name +from ._validators import validate_asp_create, validate_nodes_count, validate_nodepool_name def load_arguments(self, _): diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py index 0643aad64b6..67ffe556779 100644 --- a/src/appservice-kube/azext_appservice_kube/_validators.py +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -5,9 +5,8 @@ from knack.util import CLIError from msrestazure.tools import is_valid_resource_id, parse_resource_id -from azure.cli.command_modules.appservice.custom import ( - validate_site_create, - validate_app_or_slot_exists_in_rg +from azure.cli.command_modules.appservice._validators import ( + validate_site_create ) from azure.cli.core.commands.client_factory import get_mgmt_service_client from ._client_factory import web_client_factory @@ -84,3 +83,16 @@ def validate_nodepool_name(namespace): raise CLIError('--nodepool-name can contain at most 12 characters') if not namespace.nodepool_name.isalnum(): raise CLIError('--nodepool-name should contain only alphanumeric characters') + + +def validate_app_or_slot_exists_in_rg(cmd, namespace): + """Validate that the App/slot exists in the RG provided""" + client = web_client_factory(cmd.cli_ctx) + webapp = namespace.name + resource_group_name = namespace.resource_group_name + if isinstance(namespace.slot, str): + app = client.web_apps.get_slot(resource_group_name, webapp, namespace.slot, raw=True) + else: + app = client.web_apps.get(resource_group_name, webapp, None, raw=True) + if app.response.status_code != 200: + raise CLIError(app.response.text) From 4ffb55a736a99987aa6f7c7b665664a09659e10e Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 17 May 2021 11:07:30 -0700 Subject: [PATCH 075/125] 0.1.20 version --- src/appservice-kube/HISTORY.rst | 4 ++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 4034e4894a2..6a9db8c036f 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.20 +++++++ +* Fix regression when using main CLI validator + 0.1.19 ++++++ * Use update and delete appsettings from core CLI diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 8a5fe099f28..d50da36d2be 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.19' +VERSION = '0.1.20' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 0240d10a93a..bfd0c323ec6 100644 --- a/src/index.json +++ b/src/index.json @@ -4056,6 +4056,38 @@ "version": "0.1.19" }, "sha256Digest": "cb3057feaaf95dbe96470720becae5f13abc86d08ec0ba71879e7e497762fe03" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.20-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.20-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.20" + }, + "sha256Digest": "d18f97814d97c7bd0680004e654a7113a9e6b789230949ebbe99c619a71b6f17" } ], "arcappliance": [ From 5549691b1d6302f09380bd514d7037f87ae6209f Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Tue, 29 Jun 2021 16:20:53 -0700 Subject: [PATCH 076/125] az appservice kube create: better error message when conflict --- src/appservice-kube/azext_appservice_kube/custom.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 977f65d4861..a15b590e84e 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -128,7 +128,15 @@ def create_kube_environment(cmd, client, name, resource_group_name, custom_locat static_ip=static_ip, arc_configuration=arc_configuration) - return sdk_no_wait(no_wait, client.create, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) + try: + return sdk_no_wait(no_wait, client.create, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment, polling=False) + except Exception as e: + try: + import json + msg = json.loads(e.response._content)['Message'] + except Exception as err: + raise e + raise ValidationError(msg) def list_kube_environments(client, resource_group_name=None): From ba59ea69052d2fd85c2a002643155c788d0385ed Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 21 Jul 2021 18:06:03 -0700 Subject: [PATCH 077/125] Remove vsts_cd_manager --- .../azext_appservice_kube/custom.py | 36 +---------- .../azext_appservice_kube/vsts_cd_provider.py | 60 ------------------- 2 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 src/appservice-kube/azext_appservice_kube/vsts_cd_provider.py diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index a15b590e84e..f5a914b1f07 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -87,7 +87,6 @@ get_plan_to_use,get_kube_plan_to_use, get_lang_from_content, get_rg_to_use, get_sku_to_use, detect_os_form_src, get_current_stack_from_runtime, generate_default_app_service_plan_name) from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory -from .vsts_cd_provider import VstsContinuousDeliveryProvider import subprocess from subprocess import PIPE @@ -974,43 +973,10 @@ def update_site_configs(cmd, resource_group_name, name, slot=None, number_of_wor def config_source_control(cmd, resource_group_name, name, repo_url, repository_type='git', branch=None, # pylint: disable=too-many-locals - manual_integration=None, git_token=None, slot=None, cd_app_type=None, - app_working_dir=None, nodejs_task_runner=None, python_framework=None, - python_version=None, cd_account_create=None, cd_project_url=None, test=None, - slot_swap=None, private_repo_username=None, private_repo_password=None): + manual_integration=None, git_token=None, slot=None): client = web_client_factory(cmd.cli_ctx) location = _get_location_from_webapp(client, resource_group_name, name) - if cd_project_url: - # Add default values - cd_app_type = 'AspNet' if cd_app_type is None else cd_app_type - python_framework = 'Django' if python_framework is None else python_framework - python_version = 'Python 3.5.3 x86' if python_version is None else python_version - - webapp_list = None if test is None else list_webapp(resource_group_name) - vsts_provider = VstsContinuousDeliveryProvider() - cd_app_type_details = { - 'cd_app_type': cd_app_type, - 'app_working_dir': app_working_dir, - 'nodejs_task_runner': nodejs_task_runner, - 'python_framework': python_framework, - 'python_version': python_version - } - try: - status = vsts_provider.setup_continuous_delivery(cmd.cli_ctx, resource_group_name, name, repo_url, - branch, git_token, slot_swap, cd_app_type_details, - cd_project_url, cd_account_create, location, test, - private_repo_username, private_repo_password, webapp_list) - except RuntimeError as ex: - raise CLIError(ex) - logger.warning(status.status_message) - return status - non_vsts_params = [cd_app_type, app_working_dir, nodejs_task_runner, python_framework, - python_version, cd_account_create, test, slot_swap] - if any(non_vsts_params): - raise CLIError('Following parameters are of no use when cd_project_url is None: ' + - 'cd_app_type, app_working_dir, nodejs_task_runner, python_framework,' + - 'python_version, cd_account_create, test, slot_swap') from azure.mgmt.web.models import SiteSourceControl, SourceControl if git_token: sc = SourceControl(location=location, source_control_name='GitHub', token=git_token) diff --git a/src/appservice-kube/azext_appservice_kube/vsts_cd_provider.py b/src/appservice-kube/azext_appservice_kube/vsts_cd_provider.py deleted file mode 100644 index 430bf56bea4..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vsts_cd_provider.py +++ /dev/null @@ -1,60 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from __future__ import print_function -from sys import stderr -from vsts_cd_manager.continuous_delivery_manager import ContinuousDeliveryManager -from azure.cli.core._profile import Profile - - -class VstsContinuousDeliveryProvider(object): - def __init__(self): - self._progress_last_message = '' - - def setup_continuous_delivery(self, cli_ctx, - resource_group_name, name, repo_url, branch, git_token, - slot, cd_app_type_details, cd_project_url, cd_create_account, location, - test, private_repo_username, private_repo_password, webapp_list): - """ - This method sets up CD for an Azure Web App thru Team Services - """ - - # Gather information about the Azure connection - profile = Profile(cli_ctx=cli_ctx) - subscription = profile.get_subscription() - user = profile.get_current_account_user() - cred, _, _ = profile.get_login_credentials(subscription_id=None) - - cd_manager = ContinuousDeliveryManager(self._update_progress) - - # Generate an Azure token with the VSTS resource app id - auth_token = profile.get_access_token_for_resource(user, None, cd_manager.get_vsts_app_id()) - - cd_manager.set_repository_info(repo_url, branch, git_token, private_repo_username, private_repo_password) - cd_manager.set_azure_web_info(resource_group_name, name, cred, subscription['id'], - subscription['name'], subscription['tenantId'], location) - vsts_cd_status = cd_manager.setup_continuous_delivery(slot, cd_app_type_details, cd_project_url, - cd_create_account, auth_token, test, webapp_list) - return vsts_cd_status - - def remove_continuous_delivery(self): # pylint: disable=no-self-use - """ - To be Implemented - """ - # TODO: this would be called by appservice web source-control delete - - def _update_progress(self, current, total, status): - if total: - percent_done = current * 100 / total - message = '{: >3.0f}% complete: {}'.format(percent_done, status) - # Erase the previous message - # (backspace to beginning, space over the text and backspace again) - msg_len = len(self._progress_last_message) - print('\b' * msg_len + ' ' * msg_len + '\b' * msg_len, end='', file=stderr) - print(message, end='', file=stderr) - self._progress_last_message = message - stderr.flush() - if current == total: - print('', file=stderr) From 0d174f446a72603235f9f40df716dbf57a8d9107 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 21 Jul 2021 19:15:35 -0700 Subject: [PATCH 078/125] Version 0.1.21 --- src/appservice-kube/HISTORY.rst | 4 ++++ src/appservice-kube/setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 6a9db8c036f..800b4799c41 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.21 +++++++ +* Remove vsts_cd_manager that was removed from core CLI + 0.1.20 ++++++ * Fix regression when using main CLI validator diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index d50da36d2be..94cd947a1f8 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.20' +VERSION = '0.1.21' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From 97e4b5fdc88411b1cbe88f46870f3809c56ba650 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 21 Jul 2021 20:08:38 -0700 Subject: [PATCH 079/125] Update index.json --- .../azext_appservice_kube/azext_metadata.json | 2 +- src/index.json | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/azext_appservice_kube/azext_metadata.json b/src/appservice-kube/azext_appservice_kube/azext_metadata.json index 55c81bf3328..001f223de90 100644 --- a/src/appservice-kube/azext_appservice_kube/azext_metadata.json +++ b/src/appservice-kube/azext_appservice_kube/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, "azext.minCliCoreVersion": "2.0.67" -} \ No newline at end of file +} diff --git a/src/index.json b/src/index.json index a020a02244a..2d2a1af4c01 100644 --- a/src/index.json +++ b/src/index.json @@ -4775,6 +4775,38 @@ "version": "0.1.20" }, "sha256Digest": "d18f97814d97c7bd0680004e654a7113a9e6b789230949ebbe99c619a71b6f17" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.21-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.21-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.21" + }, + "sha256Digest": "4a9fcea9a2699874c6a2e31c2e84ad34d5b290b70b813ae00d1e0cbedb465adf" } ], "arcappliance": [ From 79aff04d9ce0ad2ff99d6cb9feb38a63175b0629 Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 21 Jul 2021 20:30:27 -0700 Subject: [PATCH 080/125] K8se master kube env create validations (#3) * az kube create: allow using custom location name. Also get location from custom location rather than resource group * Require cli core 2.26.0 or later --- .../azext_appservice_kube/_client_factory.py | 5 ++++ .../azext_appservice_kube/custom.py | 26 ++++++++++++------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_client_factory.py b/src/appservice-kube/azext_appservice_kube/_client_factory.py index de3479d00c8..95de065a33c 100644 --- a/src/appservice-kube/azext_appservice_kube/_client_factory.py +++ b/src/appservice-kube/azext_appservice_kube/_client_factory.py @@ -35,9 +35,14 @@ def _polish_bad_errors(ex): return _polish_bad_errors +def customlocation_client_factory(cli_ctx, **_): + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_CUSTOMLOCATION) + + def web_client_factory(cli_ctx, **_): return get_mgmt_service_client(cli_ctx, CUSTOM_MGMT_APPSERVICE) + def resource_client_factory(cli_ctx, **_): from azure.cli.core.profiles import ResourceType return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index f5a914b1f07..139286ca87c 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -86,7 +86,7 @@ should_create_new_rg, set_location, get_site_availability, does_app_already_exist, get_profile_username, get_plan_to_use,get_kube_plan_to_use, get_lang_from_content, get_rg_to_use, get_sku_to_use, detect_os_form_src, get_current_stack_from_runtime, generate_default_app_service_plan_name) -from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory +from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory, customlocation_client_factory import subprocess from subprocess import PIPE @@ -100,19 +100,27 @@ # pylint: disable=too-many-locals,too-many-lines def create_kube_environment(cmd, client, name, resource_group_name, custom_location, static_ip, - location=None, tags=None, no_wait=False): + tags=None, no_wait=False): KubeEnvironment, ExtendedLocation, ArcConfiguration, FrontEndConfiguration = cmd.get_models('KubeEnvironment', 'ExtendedLocation', 'ArcConfiguration', 'FrontEndConfiguration') - if not is_valid_resource_id(custom_location): - raise CLIError('Invalid custom location') + client = customlocation_client_factory(cmd.cli_ctx) + custom_location_object = None - parsed_custom_location = parse_resource_id(custom_location) - if parsed_custom_location['resource_type'].lower() != 'customlocations': - raise CLIError('Invalid custom location') + if is_valid_resource_id(custom_location): + parsed_custom_location = parse_resource_id(custom_location) + if parsed_custom_location['resource_type'].lower() != 'customlocations': + raise CLIError('Invalid custom location') + + custom_location_object = client.custom_locations.get( + parsed_custom_location['resource_group'], + parsed_custom_location['name']) + else: + custom_location_object = client.custom_locations.get(resource_group_name, custom_location) + custom_location = custom_location_object.id + + location = custom_location_object.location - if not location: - location = _get_location_from_resource_group(cmd.cli_ctx, parsed_custom_location['resource_group']) front_end_configuration = FrontEndConfiguration(kind="LoadBalancer") extended_location = ExtendedLocation(custom_location=custom_location) arc_configuration = ArcConfiguration( From 86d8a53dbb252736101d89d6bc66884deddf83ba Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 21 Jul 2021 20:35:43 -0700 Subject: [PATCH 081/125] Version 0.2.0 --- src/appservice-kube/HISTORY.rst | 5 ++ .../azext_appservice_kube/azext_metadata.json | 2 +- src/appservice-kube/setup.py | 2 +- src/index.json | 64 +++++++++++++++++++ 4 files changed, 71 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 800b4799c41..d84894dc758 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.2.0 +++++++ +* Requires core CLI 2.26.0 or later +* Validate extended location in "az kube create" + 0.1.21 ++++++ * Remove vsts_cd_manager that was removed from core CLI diff --git a/src/appservice-kube/azext_appservice_kube/azext_metadata.json b/src/appservice-kube/azext_appservice_kube/azext_metadata.json index 001f223de90..0ef8a520954 100644 --- a/src/appservice-kube/azext_appservice_kube/azext_metadata.json +++ b/src/appservice-kube/azext_appservice_kube/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67" + "azext.minCliCoreVersion": "2.26.0" } diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 94cd947a1f8..27348a442cf 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.21' +VERSION = '0.2.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 2d2a1af4c01..8146f46b926 100644 --- a/src/index.json +++ b/src/index.json @@ -4807,6 +4807,70 @@ "version": "0.1.21" }, "sha256Digest": "4a9fcea9a2699874c6a2e31c2e84ad34d5b290b70b813ae00d1e0cbedb465adf" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.22-py2.py3-none-any.whl", + "filename": "appservice_kube-0.1.22-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.26.0", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.1.22" + }, + "sha256Digest": "0bbe6d6e7e51d5eb18e2c0829d8e74792ee19925ea842c6d7569af51edb1eba9" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.2.0-py2.py3-none-any.whl", + "filename": "appservice_kube-0.2.0-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.26.0", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.2.0" + }, + "sha256Digest": "16194a9462b70405ca0be89c26e0b595723bf228d318182c8b699af42b00b2b5" } ], "arcappliance": [ From 9d29882ae5356d901bc20ba89885d7753ce494ea Mon Sep 17 00:00:00 2001 From: Calvin Date: Tue, 24 Aug 2021 14:41:36 -0700 Subject: [PATCH 082/125] Use ExtendedLocation property ob object level (#4) --- src/appservice-kube/azext_appservice_kube/custom.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 139286ca87c..8c102dad287 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -226,11 +226,16 @@ def _get_kube_env_from_custom_location(cmd, custom_location): kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() for kube in kube_envs: - if kube.extended_location and kube.extended_location.custom_location: + parsed_custom_location_2 = None + + if kube.additional_properties and 'extendedLocation' in kube.additional_properties: + parsed_custom_location_2 = parse_resource_id(kube.additional_properties['extendedLocation'].get('name')) + elif kube.extended_location and kube.extended_location.custom_location: parsed_custom_location_2 = parse_resource_id(kube.extended_location.custom_location) - if parsed_custom_location_2.get("name").lower() == custom_location.lower(): - kube_environment_id = kube.id - break + + if parsed_custom_location_2 and parsed_custom_location_2.get("name").lower() == custom_location.lower(): + kube_environment_id = kube.id + break if not kube_environment_id: raise ResourceNotFoundError('Unable to find Kube Environment associated to the Custom Location') From 0508a6e63dd1873cb64c8a4dff11f8e2de583fdf Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 25 Aug 2021 14:36:56 -0700 Subject: [PATCH 083/125] Static ip not required property in kube create --- src/appservice-kube/azext_appservice_kube/custom.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 8c102dad287..ec938d304c5 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -99,12 +99,12 @@ # pylint: disable=too-many-locals,too-many-lines -def create_kube_environment(cmd, client, name, resource_group_name, custom_location, static_ip, +def create_kube_environment(cmd, client, name, resource_group_name, custom_location, static_ip=None, location=None, tags=None, no_wait=False): KubeEnvironment, ExtendedLocation, ArcConfiguration, FrontEndConfiguration = cmd.get_models('KubeEnvironment', 'ExtendedLocation', 'ArcConfiguration', 'FrontEndConfiguration') - client = customlocation_client_factory(cmd.cli_ctx) + custom_location_client = customlocation_client_factory(cmd.cli_ctx) custom_location_object = None if is_valid_resource_id(custom_location): @@ -112,14 +112,15 @@ def create_kube_environment(cmd, client, name, resource_group_name, custom_locat if parsed_custom_location['resource_type'].lower() != 'customlocations': raise CLIError('Invalid custom location') - custom_location_object = client.custom_locations.get( + custom_location_object = custom_location_client.custom_locations.get( parsed_custom_location['resource_group'], parsed_custom_location['name']) else: - custom_location_object = client.custom_locations.get(resource_group_name, custom_location) + custom_location_object = custom_location_client.custom_locations.get(resource_group_name, custom_location) custom_location = custom_location_object.id - location = custom_location_object.location + if not location: + location = custom_location_object.location front_end_configuration = FrontEndConfiguration(kind="LoadBalancer") extended_location = ExtendedLocation(custom_location=custom_location) From a1ead2fe16020879718b26d8d2dcf32897258c49 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 25 Aug 2021 16:01:27 -0700 Subject: [PATCH 084/125] Version 0.2.1 --- src/appservice-kube/HISTORY.rst | 5 +++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index d84894dc758..d561a479be8 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.2.1 +++++++ +* Fix AppService plan creation +* location and static ip should be optional parameters in "az kube create" + 0.2.0 ++++++ * Requires core CLI 2.26.0 or later diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 27348a442cf..acd22ac43f8 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.2.0' +VERSION = '0.2.1' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 8146f46b926..53fd4426af2 100644 --- a/src/index.json +++ b/src/index.json @@ -4871,6 +4871,38 @@ "version": "0.2.0" }, "sha256Digest": "16194a9462b70405ca0be89c26e0b595723bf228d318182c8b699af42b00b2b5" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.2.1-py2.py3-none-any.whl", + "filename": "appservice_kube-0.2.1-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.26.0", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.2.1" + }, + "sha256Digest": "9d809e4b1e742a258c77323d9e9345cf6ac08d4f79d6698c476d738fc6f380f5" } ], "arcappliance": [ From 550a56b396cf1cfbbfc2e0f45249c46f920f4991 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Fri, 27 Aug 2021 13:15:04 -0700 Subject: [PATCH 085/125] Fix NoneType object has no attribute custom_location error --- .../azext_appservice_kube/custom.py | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index ec938d304c5..c5223364f9f 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -250,13 +250,29 @@ def _get_custom_location_id_from_custom_location(cmd, custom_location_name): kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() for kube in kube_envs: - if kube.extended_location and kube.extended_location.custom_location: - parsed_custom_location = parse_resource_id(kube.extended_location.custom_location) - if parsed_custom_location.get("name").lower() == custom_location_name.lower(): - return kube.extended_location.custom_location + parsed_custom_location = None + custom_location_id = None + + if kube.additional_properties and 'extendedLocation' in kube.additional_properties: + custom_location_id = kube.additional_properties['extendedLocation'].get('name') + parsed_custom_location = parse_resource_id(custom_location_id) + elif kube.extended_location and kube.extended_location.custom_location: + custom_location_id = kube.extended_location.custom_location + parsed_custom_location = parse_resource_id(custom_location_id) + + if parsed_custom_location and parsed_custom_location.get("name").lower() == custom_location_name.lower(): + return custom_location_id return None +def _get_custom_location_id_from_kube_env(kube): + if kube.additional_properties and 'extendedLocation' in kube.additional_properties: + return kube.additional_properties['extendedLocation'].get('name') + elif kube.extended_location and kube.extended_location.custom_location: + return kube.extended_location.custom_location + raise CLIError("Could not get custom location from kube environment") + + def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): @@ -294,7 +310,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype ase_def = None extended_location_envelope = None - if kube_environment and ase_def is None: + if kube_environment and (ase_def is None): kube_id = _resolve_kube_environment_id(cmd.cli_ctx, kube_environment, resource_group_name) kube_def = KubeEnvironmentProfile(id=kube_id) kind = KUBE_ASP_KIND @@ -303,7 +319,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype kube_rg = parsed_id.get("resource_group") if kube_name is not None and kube_rg is not None: kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) - extended_location_envelope = ExtendedLocationEnvelope(name=kube_env.extended_location.custom_location, type="CustomLocation") + extended_location_envelope = ExtendedLocationEnvelope(name=_get_custom_location_id_from_kube_env(kube_env), type="CustomLocation") if kube_env is not None: location = kube_env.location else: From 6ab0f7b43ada62ccc7976646cf6ae2c13385b753 Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 1 Sep 2021 17:43:50 -0700 Subject: [PATCH 086/125] Bugfix: Wrong custom location being used if multiple custom locations exist in diff rg (#5) * Fix NoneType object has no attribute custom_location error * If two custom locations with same name, in different resource group sometimes it uses wrong custom location --- .../azext_appservice_kube/custom.py | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index ec938d304c5..5b38e8af0e7 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -218,12 +218,14 @@ def get_vm_sizes(cli_ctx, location): return cf_compute_service(cli_ctx).virtual_machine_sizes.list(location) -def _get_kube_env_from_custom_location(cmd, custom_location): +def _get_kube_env_from_custom_location(cmd, custom_location, resource_group): kube_environment_id = "" + custom_location_name = custom_location if is_valid_resource_id(custom_location): parsed_custom_location = parse_resource_id(custom_location) - custom_location = parsed_custom_location.get("name") + custom_location_name = parsed_custom_location.get("name") + resource_group = parsed_custom_location.get("resource_group") kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() for kube in kube_envs: @@ -234,7 +236,9 @@ def _get_kube_env_from_custom_location(cmd, custom_location): elif kube.extended_location and kube.extended_location.custom_location: parsed_custom_location_2 = parse_resource_id(kube.extended_location.custom_location) - if parsed_custom_location_2 and parsed_custom_location_2.get("name").lower() == custom_location.lower(): + if parsed_custom_location_2 and ( + parsed_custom_location_2.get("name").lower() == custom_location_name.lower()) and ( + parsed_custom_location_2.get("resource_group").lower() == resource_group.lower()): kube_environment_id = kube.id break @@ -244,19 +248,35 @@ def _get_kube_env_from_custom_location(cmd, custom_location): return kube_environment_id -def _get_custom_location_id_from_custom_location(cmd, custom_location_name): +def _get_custom_location_id_from_custom_location(cmd, custom_location_name, resource_group_name): if is_valid_resource_id(custom_location_name): return custom_location_name - kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() + kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_resource_group(resource_group_name) for kube in kube_envs: - if kube.extended_location and kube.extended_location.custom_location: - parsed_custom_location = parse_resource_id(kube.extended_location.custom_location) - if parsed_custom_location.get("name").lower() == custom_location_name.lower(): - return kube.extended_location.custom_location + parsed_custom_location = None + custom_location_id = None + + if kube.additional_properties and 'extendedLocation' in kube.additional_properties: + custom_location_id = kube.additional_properties['extendedLocation'].get('name') + parsed_custom_location = parse_resource_id(custom_location_id) + elif kube.extended_location and kube.extended_location.custom_location: + custom_location_id = kube.extended_location.custom_location + parsed_custom_location = parse_resource_id(custom_location_id) + + if parsed_custom_location and parsed_custom_location.get("name").lower() == custom_location_name.lower(): + return custom_location_id return None +def _get_custom_location_id_from_kube_env(kube): + if kube.additional_properties and 'extendedLocation' in kube.additional_properties: + return kube.additional_properties['extendedLocation'].get('name') + elif kube.extended_location and kube.extended_location.custom_location: + return kube.extended_location.custom_location + raise CLIError("Could not get custom location from kube environment") + + def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): @@ -274,7 +294,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype client = web_client_factory(cmd.cli_ctx) if custom_location: - kube_environment = _get_kube_env_from_custom_location(cmd, custom_location) + kube_environment = _get_kube_env_from_custom_location(cmd, custom_location, resource_group_name) if app_service_environment: if hyper_v: @@ -294,7 +314,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype ase_def = None extended_location_envelope = None - if kube_environment and ase_def is None: + if kube_environment and (ase_def is None): kube_id = _resolve_kube_environment_id(cmd.cli_ctx, kube_environment, resource_group_name) kube_def = KubeEnvironmentProfile(id=kube_id) kind = KUBE_ASP_KIND @@ -303,7 +323,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype kube_rg = parsed_id.get("resource_group") if kube_name is not None and kube_rg is not None: kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) - extended_location_envelope = ExtendedLocationEnvelope(name=kube_env.extended_location.custom_location, type="CustomLocation") + extended_location_envelope = ExtendedLocationEnvelope(name=_get_custom_location_id_from_kube_env(kube_env), type="CustomLocation") if kube_env is not None: location = kube_env.location else: @@ -352,7 +372,7 @@ def _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) plan_kube_env_id = "" - custom_location_kube_env_id = _get_kube_env_from_custom_location(cmd, custom_location) + custom_location_kube_env_id = _get_kube_env_from_custom_location(cmd, custom_location, resource_group_name) if plan_info.kube_environment_profile: plan_kube_env_id = plan_info.kube_environment_profile.id @@ -464,7 +484,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo webapp_def.kind = KUBE_APP_KIND if custom_location: # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP - custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location) + custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location, resource_group_name) if custom_location_id: webapp_def.extended_location = ExtendedLocationEnvelope(name=custom_location_id, type="CustomLocation") else: @@ -722,7 +742,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if is_kube: if custom_location: # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP - custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location) + custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location, resource_group_name) if custom_location_id: functionapp_def.extended_location = ExtendedLocationEnvelope(name=custom_location_id, type="CustomLocation") else: From 7ccd6085a22c5705879a5c2b8f738afc9627abed Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Wed, 1 Sep 2021 17:47:36 -0700 Subject: [PATCH 087/125] Version 0.2.2 --- src/appservice-kube/HISTORY.rst | 4 ++++ src/appservice-kube/setup.py | 2 +- src/index.json | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index d561a479be8..acb15d3202d 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.2.2 +++++++ +* Fix wrong custom location being used if multiple custom locations of the same name in different RG + 0.2.1 ++++++ * Fix AppService plan creation diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index acd22ac43f8..33a17331352 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.2.1' +VERSION = '0.2.2' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/index.json b/src/index.json index 53fd4426af2..f0ed162c92f 100644 --- a/src/index.json +++ b/src/index.json @@ -4903,6 +4903,38 @@ "version": "0.2.1" }, "sha256Digest": "9d809e4b1e742a258c77323d9e9345cf6ac08d4f79d6698c476d738fc6f380f5" + }, + { + "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.2.2-py2.py3-none-any.whl", + "filename": "appservice_kube-0.2.2-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.26.0", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "appservice-kube", + "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", + "version": "0.2.2" + }, + "sha256Digest": "3c2939d00438946eb20ebef76337be7b17dea2abdc7661b31fa477c51eb8b076" } ], "arcappliance": [ From f158c95c695925d19d6576fad98cb607a6a3dde9 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Wed, 8 Sep 2021 15:33:19 -0700 Subject: [PATCH 088/125] remove old SDK and start 'az appservice kube' rewrite --- .../azext_appservice_kube/__init__.py | 13 +- .../azext_appservice_kube/_client_factory.py | 12 +- .../azext_appservice_kube/commands.py | 22 +- .../azext_appservice_kube/custom.py | 145 +- .../vendored_sdks/__init__.py | 6 - .../vendored_sdks/azure_mgmt_web/__init__.py | 19 - .../azure_mgmt_web/_configuration.py | 49 - .../azure_mgmt_web/_operations_mixin.py | 787 - .../vendored_sdks/azure_mgmt_web/_version.py | 9 - .../_web_site_management_client.py | 591 - .../vendored_sdks/azure_mgmt_web/models.py | 9 - .../vendored_sdks/azure_mgmt_web/py.typed | 1 - .../azure_mgmt_web/v2015_04_01/__init__.py | 19 - .../v2015_04_01/_configuration.py | 49 - .../_web_site_management_client.py | 60 - .../v2015_04_01/models/__init__.py | 271 - .../v2015_04_01/models/_models.py | 3126 -- .../v2015_04_01/models/_models_py3.py | 3126 -- .../v2015_04_01/models/_paged_models.py | 92 - .../_web_site_management_client_enums.py | 182 - .../v2015_04_01/operations/__init__.py | 20 - ...domain_registration_provider_operations.py | 106 - .../operations/_domains_operations.py | 1104 - .../_top_level_domains_operations.py | 255 - .../azure_mgmt_web/v2015_04_01/version.py | 13 - .../azure_mgmt_web/v2015_08_01/__init__.py | 19 - .../v2015_08_01/_configuration.py | 49 - .../_web_site_management_client.py | 55 - .../v2015_08_01/models/__init__.py | 255 - .../v2015_08_01/models/_models.py | 3126 -- .../v2015_08_01/models/_models_py3.py | 3126 -- .../v2015_08_01/models/_paged_models.py | 53 - .../_web_site_management_client_enums.py | 180 - .../v2015_08_01/operations/__init__.py | 18 - ...p_service_certificate_orders_operations.py | 1439 - ...ficate_registration_provider_operations.py | 106 - .../azure_mgmt_web/v2015_08_01/version.py | 13 - .../azure_mgmt_web/v2016_03_01/__init__.py | 19 - .../v2016_03_01/_configuration.py | 49 - .../_web_site_management_client.py | 81 - .../v2016_03_01/models/__init__.py | 469 - .../v2016_03_01/models/_models.py | 5418 --- .../v2016_03_01/models/_models_py3.py | 5418 --- .../v2016_03_01/models/_paged_models.py | 209 - .../_web_site_management_client_enums.py | 287 - .../v2016_03_01/operations/__init__.py | 30 - .../operations/_billing_meters_operations.py | 112 - .../operations/_certificates_operations.py | 444 - .../_deleted_web_apps_operations.py | 108 - .../operations/_diagnostics_operations.py | 1758 - .../operations/_provider_operations.py | 246 - .../operations/_recommendations_operations.py | 644 - .../_resource_health_metadata_operations.py | 465 - .../_web_site_management_client_operations.py | 989 - .../azure_mgmt_web/v2016_03_01/version.py | 13 - .../azure_mgmt_web/v2016_08_01/__init__.py | 19 - .../v2016_08_01/_configuration.py | 49 - .../_web_site_management_client.py | 50 - .../v2016_08_01/models/__init__.py | 477 - .../v2016_08_01/models/_models.py | 6213 ---- .../v2016_08_01/models/_models_py3.py | 6213 ---- .../v2016_08_01/models/_paged_models.py | 326 - .../_web_site_management_client_enums.py | 292 - .../v2016_08_01/operations/__init__.py | 16 - .../operations/_web_apps_operations.py | 23095 ------------- .../azure_mgmt_web/v2016_08_01/version.py | 13 - .../azure_mgmt_web/v2016_09_01/__init__.py | 19 - .../v2016_09_01/_configuration.py | 49 - .../_web_site_management_client.py | 55 - .../v2016_09_01/models/__init__.py | 289 - .../v2016_09_01/models/_models.py | 3614 -- .../v2016_09_01/models/_models_py3.py | 3614 -- .../v2016_09_01/models/_paged_models.py | 170 - .../_web_site_management_client_enums.py | 175 - .../v2016_09_01/operations/__init__.py | 18 - .../_app_service_environments_operations.py | 3146 -- .../_app_service_plans_operations.py | 2133 -- .../azure_mgmt_web/v2016_09_01/version.py | 13 - .../azure_mgmt_web/v2018_02_01/__init__.py | 19 - .../v2018_02_01/_configuration.py | 49 - .../_web_site_management_client.py | 116 - .../v2018_02_01/models/__init__.py | 946 - .../v2018_02_01/models/_models.py | 12295 ------- .../v2018_02_01/models/_models_py3.py | 12295 ------- .../v2018_02_01/models/_paged_models.py | 729 - .../_web_site_management_client_enums.py | 559 - .../v2018_02_01/operations/__init__.py | 44 - ...p_service_certificate_orders_operations.py | 1427 - .../_app_service_environments_operations.py | 3376 -- .../_app_service_plans_operations.py | 2114 -- ...ficate_registration_provider_operations.py | 104 - .../operations/_certificates_operations.py | 439 - .../_deleted_web_apps_operations.py | 238 - .../operations/_diagnostics_operations.py | 1735 - ...domain_registration_provider_operations.py | 104 - .../operations/_domains_operations.py | 1093 - .../operations/_provider_operations.py | 244 - .../operations/_recommendations_operations.py | 1078 - .../_resource_health_metadata_operations.py | 465 - .../_top_level_domains_operations.py | 251 - .../operations/_web_apps_operations.py | 26850 --------------- .../_web_site_management_client_operations.py | 1129 - .../azure_mgmt_web/v2018_02_01/version.py | 13 - .../azure_mgmt_web/v2018_11_01/__init__.py | 19 - .../v2018_11_01/_configuration.py | 49 - .../_web_site_management_client.py | 50 - .../v2018_11_01/models/__init__.py | 216 - .../v2018_11_01/models/_models.py | 2750 -- .../v2018_11_01/models/_models_py3.py | 2750 -- .../v2018_11_01/models/_paged_models.py | 27 - .../_web_site_management_client_enums.py | 180 - .../v2018_11_01/operations/__init__.py | 16 - .../operations/_certificates_operations.py | 439 - .../azure_mgmt_web/v2018_11_01/version.py | 13 - .../azure_mgmt_web/v2019_08_01/__init__.py | 19 - .../v2019_08_01/_configuration.py | 49 - .../_web_site_management_client.py | 121 - .../v2019_08_01/models/__init__.py | 1038 - .../v2019_08_01/models/_models.py | 13462 -------- .../v2019_08_01/models/_models_py3.py | 13462 -------- .../v2019_08_01/models/_paged_models.py | 781 - .../_web_site_management_client_enums.py | 608 - .../v2019_08_01/operations/__init__.py | 46 - ...p_service_certificate_orders_operations.py | 1423 - .../_app_service_environments_operations.py | 2858 -- .../_app_service_plans_operations.py | 1946 -- ...ficate_registration_provider_operations.py | 104 - .../operations/_certificates_operations.py | 437 - .../_deleted_web_apps_operations.py | 238 - .../operations/_diagnostics_operations.py | 1713 - ...domain_registration_provider_operations.py | 104 - .../operations/_domains_operations.py | 1090 - .../operations/_provider_operations.py | 246 - .../operations/_recommendations_operations.py | 1070 - .../_resource_health_metadata_operations.py | 468 - .../operations/_static_sites_operations.py | 1820 - .../_top_level_domains_operations.py | 251 - .../operations/_web_apps_operations.py | 27342 --------------- .../_web_site_management_client_operations.py | 1061 - .../azure_mgmt_web/v2019_08_01/version.py | 13 - .../azure_mgmt_web/v2020_06_01/__init__.py | 19 - .../v2020_06_01/_configuration.py | 49 - .../_web_site_management_client.py | 121 - .../v2020_06_01/models/__init__.py | 1135 - .../v2020_06_01/models/_models.py | 14962 -------- .../v2020_06_01/models/_models_py3.py | 14962 -------- .../v2020_06_01/models/_paged_models.py | 781 - .../_web_site_management_client_enums.py | 620 - .../v2020_06_01/operations/__init__.py | 46 - ...p_service_certificate_orders_operations.py | 1423 - .../_app_service_environments_operations.py | 2858 -- .../_app_service_plans_operations.py | 1946 -- ...ficate_registration_provider_operations.py | 104 - .../operations/_certificates_operations.py | 437 - .../_deleted_web_apps_operations.py | 238 - .../operations/_diagnostics_operations.py | 1713 - ...domain_registration_provider_operations.py | 104 - .../operations/_domains_operations.py | 1090 - .../operations/_provider_operations.py | 246 - .../operations/_recommendations_operations.py | 1070 - .../_resource_health_metadata_operations.py | 468 - .../operations/_static_sites_operations.py | 1887 - .../_top_level_domains_operations.py | 251 - .../operations/_web_apps_operations.py | 27494 --------------- .../_web_site_management_client_operations.py | 1061 - .../azure_mgmt_web/v2020_06_01/version.py | 13 - .../azure_mgmt_web/v2020_09_01/__init__.py | 19 - .../v2020_09_01/_configuration.py | 49 - .../_web_site_management_client.py | 121 - .../v2020_09_01/models/__init__.py | 1146 - .../v2020_09_01/models/_models.py | 15503 --------- .../v2020_09_01/models/_models_py3.py | 15503 --------- .../v2020_09_01/models/_paged_models.py | 781 - .../_web_site_management_client_enums.py | 628 - .../v2020_09_01/operations/__init__.py | 46 - ...p_service_certificate_orders_operations.py | 1423 - .../_app_service_environments_operations.py | 2858 -- .../_app_service_plans_operations.py | 1946 -- ...ficate_registration_provider_operations.py | 104 - .../operations/_certificates_operations.py | 437 - .../_deleted_web_apps_operations.py | 238 - .../operations/_diagnostics_operations.py | 1713 - ...domain_registration_provider_operations.py | 104 - .../operations/_domains_operations.py | 1086 - .../operations/_provider_operations.py | 246 - .../operations/_recommendations_operations.py | 1070 - .../_resource_health_metadata_operations.py | 468 - .../operations/_static_sites_operations.py | 1878 - .../_top_level_domains_operations.py | 251 - .../operations/_web_apps_operations.py | 27447 --------------- .../_web_site_management_client_operations.py | 1124 - .../azure_mgmt_web/v2020_09_01/version.py | 13 - .../azure_mgmt_web/v2020_12_01/__init__.py | 19 - .../v2020_12_01/_configuration.py | 49 - .../_web_site_management_client.py | 136 - .../v2020_12_01/models/__init__.py | 1307 - .../v2020_12_01/models/_models.py | 16890 --------- .../v2020_12_01/models/_models_py3.py | 16890 --------- .../v2020_12_01/models/_paged_models.py | 859 - .../_web_site_management_client_enums.py | 725 - .../v2020_12_01/operations/__init__.py | 52 - ...p_service_certificate_orders_operations.py | 1423 - .../_app_service_environments_operations.py | 3425 -- .../_app_service_plans_operations.py | 1946 -- ...rtificate_orders_diagnostics_operations.py | 197 - ...ficate_registration_provider_operations.py | 104 - .../operations/_certificates_operations.py | 442 - .../_deleted_web_apps_operations.py | 238 - .../operations/_diagnostics_operations.py | 1713 - ...domain_registration_provider_operations.py | 104 - .../operations/_domains_operations.py | 1090 - .../operations/_global_model_operations.py | 211 - .../_kube_environments_operations.py | 501 - .../operations/_provider_operations.py | 533 - .../operations/_recommendations_operations.py | 1070 - .../_resource_health_metadata_operations.py | 468 - .../operations/_static_sites_operations.py | 3803 --- .../_top_level_domains_operations.py | 251 - .../operations/_web_apps_operations.py | 28441 ---------------- .../_web_site_management_client_operations.py | 1125 - .../azure_mgmt_web/v2020_12_01/version.py | 13 - 221 files changed, 124 insertions(+), 466534 deletions(-) delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/py.typed delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domain_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_top_level_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_app_service_certificate_orders_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_certificate_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_billing_meters_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_certificates_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_deleted_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_diagnostics_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_recommendations_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_resource_health_metadata_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_web_site_management_client_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_environments_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_plans_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_certificate_orders_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_environments_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_plans_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificate_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificates_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_deleted_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_diagnostics_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domain_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_recommendations_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_resource_health_metadata_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_top_level_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_site_management_client_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/_certificates_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_certificate_orders_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_environments_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_plans_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificate_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificates_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_deleted_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_diagnostics_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domain_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_recommendations_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_resource_health_metadata_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_static_sites_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_top_level_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_site_management_client_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_certificate_orders_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_environments_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_plans_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificate_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificates_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_deleted_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_diagnostics_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domain_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_recommendations_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_resource_health_metadata_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_static_sites_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_top_level_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_site_management_client_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_certificate_orders_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_environments_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_plans_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificate_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificates_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_deleted_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_diagnostics_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domain_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_recommendations_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_resource_health_metadata_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_static_sites_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_top_level_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_site_management_client_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/version.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_configuration.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_web_site_management_client.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_paged_models.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_web_site_management_client_enums.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/__init__.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_certificate_orders_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_environments_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_plans_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificates_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_deleted_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_diagnostics_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domain_registration_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_global_model_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_kube_environments_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_provider_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_recommendations_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_resource_health_metadata_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_static_sites_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_top_level_domains_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_site_management_client_operations.py delete mode 100644 src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/version.py diff --git a/src/appservice-kube/azext_appservice_kube/__init__.py b/src/appservice-kube/azext_appservice_kube/__init__.py index 261efc73108..06f46a0ca09 100644 --- a/src/appservice-kube/azext_appservice_kube/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/__init__.py @@ -7,20 +7,17 @@ from azure.cli.core.profiles import register_resource_type from azext_appservice_kube._help import helps # pylint: disable=unused-import -from azext_appservice_kube._client_factory import CUSTOM_MGMT_APPSERVICE class AppserviceCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - register_resource_type('latest', CUSTOM_MGMT_APPSERVICE, '2020-12-01') - - appservice_kube_custom = CliCommandType( - operations_tmpl='azext_appservice_kube.custom#{}') + from azure.cli.core.profiles import ResourceType + appservice_custom = CliCommandType(operations_tmpl='azext_appservice_kube.custom#{}') super(AppserviceCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=appservice_kube_custom, - resource_type=CUSTOM_MGMT_APPSERVICE) + custom_command_type=appservice_custom, + resource_type=ResourceType.MGMT_APPSERVICE) def load_command_table(self, args): super(AppserviceCommandsLoader, self).load_command_table(args) @@ -39,3 +36,5 @@ def load_arguments(self, command): COMMAND_LOADER_CLS = AppserviceCommandsLoader + + diff --git a/src/appservice-kube/azext_appservice_kube/_client_factory.py b/src/appservice-kube/azext_appservice_kube/_client_factory.py index 95de065a33c..362b6763905 100644 --- a/src/appservice-kube/azext_appservice_kube/_client_factory.py +++ b/src/appservice-kube/azext_appservice_kube/_client_factory.py @@ -3,12 +3,10 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.command_modules.appservice._client_factory import web_client_factory from azure.cli.core.profiles import ResourceType, CustomResourceType -CUSTOM_MGMT_APPSERVICE = CustomResourceType('azext_appservice_kube.vendored_sdks.azure_mgmt_web', - 'WebSiteManagementClient') - # pylint: disable=inconsistent-return-statements def ex_handler_factory(creating_plan=False, no_throw=False): @@ -37,11 +35,7 @@ def _polish_bad_errors(ex): def customlocation_client_factory(cli_ctx, **_): return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_CUSTOMLOCATION) - - -def web_client_factory(cli_ctx, **_): - return get_mgmt_service_client(cli_ctx, CUSTOM_MGMT_APPSERVICE) - + def resource_client_factory(cli_ctx, **_): from azure.cli.core.profiles import ResourceType diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 3cd380f73d4..51e07cc81aa 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -44,24 +44,18 @@ def _polish_bad_errors(ex): def load_command_table(self, _): - - kube_environments_sdk = CliCommandType( - operations_tmpl='azext_appservice_kube.vendored_sdks.azure_mgmt_web.operations#KubeEnvironmentsOperations.{}', - client_factory=cf_kube_environments - ) - appservice_plan_sdk = CliCommandType( - operations_tmpl='azext_appservice_kube.vendored_sdks.azure_mgmt_web.operations#AppServicePlansOperations.{}', + operations_tmpl='azure.mgmt.web.operations#AppServicePlansOperations.{}', client_factory=cf_plans ) - with self.command_group('appservice kube', kube_environments_sdk, is_preview=True) as g: - g.show_command('show') - g.wait_command('wait') - g.custom_command('list', 'list_kube_environments', client_factory=cf_kube_environments) - g.custom_command('create', 'create_kube_environment', client_factory=cf_kube_environments, supports_no_wait=True) - g.custom_command('update', 'update_kube_environment', client_factory=cf_kube_environments, supports_no_wait=True) - g.command('delete', 'delete', supports_no_wait=True, confirmation=True) + with self.command_group('appservice kube', is_preview=True) as g: + g.custom_command('show', 'show_kube_environments') + g.custom_command('wait', 'wait_kube_environment') + g.custom_command('list', 'list_kube_environments') + g.custom_command('create', 'create_kube_environment', supports_no_wait=True) + g.custom_command('update', 'update_kube_environment', supports_no_wait=True) + g.custom_command('delete', 'delete_kube_environment', supports_no_wait=True, confirmation=True) with self.command_group('appservice plan', appservice_plan_sdk) as g: g.custom_command('create', 'create_app_service_plan', supports_no_wait=True, diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 5b38e8af0e7..33cb050b85a 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -12,6 +12,9 @@ import sys import platform +from azure.cli.core.util import send_raw_request +from azure.cli.core.commands.client_factory import get_subscription_id + try: from urllib.parse import urlparse except ImportError: @@ -99,45 +102,111 @@ # pylint: disable=too-many-locals,too-many-lines -def create_kube_environment(cmd, client, name, resource_group_name, custom_location, static_ip=None, location=None, +# TODO remove and replace with calls to KubeEnvironmentsOperations once the SDK gets updated +class KubeEnvironmentClient(): + @classmethod + def create(cls, cmd, resource_group_name, name, kube_environment_envelope, **kwargs): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(kube_environment_envelope)) + return r.json() + + # TODO + @classmethod + def show(cls): + raise NotImplementedError() + + # TODO + @classmethod + def wait(cls): + raise NotImplementedError() + + # TODO + @classmethod + def delete(cls): + raise NotImplementedError() + + # TODO + @classmethod + def list(cls): + raise NotImplementedError() + + # TODO + @classmethod + def update(cls): + raise NotImplementedError() + + +#TODO implement +def show_kube_environments(*args, **kwargs): + raise NotImplementedError() + +# TODO implement +def wait_kube_environment(*args, **kwargs): + raise NotImplementedError() + +# TODO implement +def delete_kube_environment(*args, **kwargs): + raise NotImplementedError() + +def create_kube_environment(cmd, name, resource_group_name, custom_location, static_ip=None, location=None, tags=None, no_wait=False): - KubeEnvironment, ExtendedLocation, ArcConfiguration, FrontEndConfiguration = cmd.get_models('KubeEnvironment', - 'ExtendedLocation', 'ArcConfiguration', 'FrontEndConfiguration') - - custom_location_client = customlocation_client_factory(cmd.cli_ctx) - custom_location_object = None - - if is_valid_resource_id(custom_location): - parsed_custom_location = parse_resource_id(custom_location) - if parsed_custom_location['resource_type'].lower() != 'customlocations': - raise CLIError('Invalid custom location') - - custom_location_object = custom_location_client.custom_locations.get( - parsed_custom_location['resource_group'], - parsed_custom_location['name']) - else: - custom_location_object = custom_location_client.custom_locations.get(resource_group_name, custom_location) - custom_location = custom_location_object.id - - if not location: - location = custom_location_object.location - - front_end_configuration = FrontEndConfiguration(kind="LoadBalancer") - extended_location = ExtendedLocation(custom_location=custom_location) - arc_configuration = ArcConfiguration( - artifacts_storage_type="NetworkFileSystem", artifact_storage_class_name="default", front_end_service_configuration=front_end_configuration) - kube_environment = KubeEnvironment( - name=name, - location=location, - kind="null", - tags=tags, - plan=None, - extended_location=extended_location, - static_ip=static_ip, - arc_configuration=arc_configuration) + # TODO replace some of this validation from the original method VVVV + + # custom_location_client = customlocation_client_factory(cmd.cli_ctx) + # custom_location_object = None + + # if is_valid_resource_id(custom_location): + # parsed_custom_location = parse_resource_id(custom_location) + # if parsed_custom_location['resource_type'].lower() != 'customlocations': + # raise CLIError('Invalid custom location') + + # custom_location_object = custom_location_client.custom_locations.get( + # parsed_custom_location['resource_group'], + # parsed_custom_location['name']) + # else: + # custom_location_object = custom_location_client.custom_locations.get(resource_group_name, custom_location) + # custom_location = custom_location_object.id + + # if not location: + # location = custom_location_object.location + + # TODO replace with a FrontEndConfiguration model from the SDK + front_end_configuration = {"kind": "LoadBalancer"} + + # TODO replace with an ExtendedLocation model from the SDK + # TODO may need to make this a custom location ID + extended_location = {"customLocation":custom_location} + + # TODO replace with an ArcConfiguration model from the SDK + arc_configuration = { + "artifactsStorageType": "NetworkFileSystem", + "artifactStorageClassName": "default", + "frontEndServiceConfiguration": front_end_configuration + } + + # TODO replace with a KubeEnvironmentEnvelope model from the SDK + kube_environment = { + "kind": None, + "location": location, + "properties": { + "extendedLocation": extended_location, + "staticIp": static_ip, + "arcConfiguration": arc_configuration + } + } try: - return sdk_no_wait(no_wait, client.create, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment, polling=False) + # TODO add support for wait/no_wait polling behavior + return KubeEnvironmentClient.create(cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) except Exception as e: try: import json @@ -146,13 +215,13 @@ def create_kube_environment(cmd, client, name, resource_group_name, custom_locat raise e raise ValidationError(msg) - +# TODO fix def list_kube_environments(client, resource_group_name=None): if resource_group_name is None: return client.list_by_subscription() return client.list_by_resource_group(resource_group_name) - +# TODO fix def update_kube_environment(cmd, kube_name, resource_group_name, diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/__init__.py deleted file mode 100644 index a5b81f3bde4..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -__import__('pkg_resources').declare_namespace(__name__) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py deleted file mode 100644 index 52fd452901f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from ._version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py deleted file mode 100644 index 53c93356cb9..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from ._version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py deleted file mode 100644 index 392c53afb7a..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_operations_mixin.py +++ /dev/null @@ -1,787 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrest import Serializer, Deserializer - - -class WebSiteManagementClientOperationsMixin(object): - - - def check_name_availability(self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): - """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. 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('check_name_availability') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.check_name_availability(name, type, is_fqdn, custom_headers, raw, **operation_config) - - def generate_github_access_token_for_appservice_cli_async(self, code, state, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppserviceGithubToken or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - 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 NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.generate_github_access_token_for_appservice_cli_async(code, state, custom_headers, raw, **operation_config) - - def get_publishing_user(self, custom_headers=None, raw=False, **operation_config): - """Gets publishing user. - - Description for Gets publishing user. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('get_publishing_user') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.get_publishing_user(custom_headers, raw, **operation_config) - - def get_source_control(self, source_control_type, custom_headers=None, raw=False, **operation_config): - """Gets source control token. - - Description for Gets source control token. - - :param source_control_type: Type of source control - :type source_control_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('get_source_control') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.get_source_control(source_control_type, custom_headers, raw, **operation_config) - - def get_subscription_deployment_locations(self, custom_headers=None, raw=False, **operation_config): - """Gets list of available geo regions plus ministamps. - - Description for Gets list of available geo regions plus ministamps. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('get_subscription_deployment_locations') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.get_subscription_deployment_locations(custom_headers, raw, **operation_config) - - def list_billing_meters(self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BillingMeter - :rtype: - ~azure.mgmt.web.v2020_12_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeter] - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('list_billing_meters') - if api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.list_billing_meters(billing_location, os_type, custom_headers, raw, **operation_config) - - def list_geo_regions(self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values - include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - 'Isolated', 'IsolatedV2', 'PremiumV2', 'PremiumV3', - 'PremiumContainer', 'ElasticPremium', 'ElasticIsolated' - :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName - :param linux_workers_enabled: Specify true if you want to - filter to only regions that support Linux workers. - :type linux_workers_enabled: bool - :param xenon_workers_enabled: Specify true if you want to - filter to only regions that support Xenon workers. - :type xenon_workers_enabled: bool - :param linux_dynamic_workers_enabled: Specify true if you - want to filter to only regions that support Linux Consumption Workers. - :type linux_dynamic_workers_enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GeoRegion - :rtype: - ~azure.mgmt.web.v2020_12_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegion] - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('list_geo_regions') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.list_geo_regions(sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled, custom_headers, raw, **operation_config) - - def list_premier_add_on_offers(self, custom_headers=None, raw=False, **operation_config): - """List all premier add-on offers. - - Description for List all premier add-on offers. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PremierAddOnOffer - :rtype: - ~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOffer] - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('list_premier_add_on_offers') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.list_premier_add_on_offers(custom_headers, raw, **operation_config) - - def list_site_identifiers_assigned_to_host_name(self, name=None, custom_headers=None, raw=False, **operation_config): - """List all apps that are assigned to a hostname. - - Description for List all apps that are assigned to a hostname. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_12_01.models.IdentifierPaged[~azure.mgmt.web.v2020_12_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('list_site_identifiers_assigned_to_host_name') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.list_site_identifiers_assigned_to_host_name(name, custom_headers, raw, **operation_config) - - def list_skus(self, custom_headers=None, raw=False, **operation_config): - """List all SKUs. - - Description for List all SKUs. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('list_skus') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.list_skus(custom_headers, raw, **operation_config) - - def list_source_controls(self, custom_headers=None, raw=False, **operation_config): - """Gets the source controls available for Azure websites. - - Description for Gets the source controls available for Azure websites. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SourceControl - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SourceControlPaged[~azure.mgmt.web.v2020_12_01.models.SourceControl] - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('list_source_controls') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.list_source_controls(custom_headers, raw, **operation_config) - - def move(self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('move') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.move(resource_group_name, target_resource_group, resources, custom_headers, raw, **operation_config) - - def update_publishing_user(self, user_details, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('update_publishing_user') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.update_publishing_user(user_details, custom_headers, raw, **operation_config) - - def update_source_control(self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('update_source_control') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.update_source_control(source_control_type, request_message, custom_headers, raw, **operation_config) - - def validate(self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('validate') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.validate(resource_group_name, validate_request, custom_headers, raw, **operation_config) - - def validate_container_settings(self, validate_container_settings_request, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Validate if the container settings are correct. - - Validate if the container settings are correct. - - :param validate_container_settings_request: - :type validate_container_settings_request: - ~azure.mgmt.web.v2018_02_01.models.ValidateContainerSettingsRequest - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('validate_container_settings') - if api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.validate_container_settings(validate_container_settings_request, resource_group_name, custom_headers, raw, **operation_config) - - def validate_move(self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('validate_move') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.validate_move(resource_group_name, target_resource_group, resources, custom_headers, raw, **operation_config) - - def verify_hosting_environment_vnet(self, parameters, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetValidationFailureDetails or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - - """ - api_version = self._get_api_version('verify_hosting_environment_vnet') - if api_version == '2016-03-01': - from .v2016_03_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebSiteManagementClientOperationsMixin as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance.config = self.config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - mixin_instance.api_version = api_version - return mixin_instance.verify_hosting_environment_vnet(parameters, custom_headers, raw, **operation_config) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_version.py deleted file mode 100644 index 48944bf3938..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2.0.0" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py deleted file mode 100644 index 90fa76f1ff7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/_web_site_management_client.py +++ /dev/null @@ -1,591 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from azure.profiles import KnownProfiles, ProfileDefinition -from azure.profiles.multiapiclient import MultiApiClientMixin -from ._configuration import WebSiteManagementClientConfiguration -from ._operations_mixin import WebSiteManagementClientOperationsMixin - - -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiClientMixin, SDKClient): - """WebSite Management Client - - This ready contains multiple API versions, to help you deal with all Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, uses latest API version available on public Azure. - For production, you should stick a particular api-version and/or profile. - The profile sets a mapping between the operation group and an API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :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 profile: A profile definition, from KnownProfiles to dict. - :type profile: azure.profiles.KnownProfiles - """ - - DEFAULT_API_VERSION = '2020-12-01' - _PROFILE_TAG = "azure.mgmt.web.WebSiteManagementClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - 'billing_meters': '2016-03-01', - 'validate_container_settings': '2018-02-01', - }}, - _PROFILE_TAG + " latest" - ) - - def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default): - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__( - credentials, - self.config, - api_version=api_version, - profile=profile - ) - - @classmethod - def _models_dict(cls, api_version): - return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} - - @classmethod - def models(cls, api_version=DEFAULT_API_VERSION): - """Module depends on the API version: - - * 2015-04-01: :mod:`v2015_04_01.models` - * 2015-08-01: :mod:`v2015_08_01.models` - * 2016-03-01: :mod:`v2016_03_01.models` - * 2016-08-01: :mod:`v2016_08_01.models` - * 2016-09-01: :mod:`v2016_09_01.models` - * 2018-02-01: :mod:`v2018_02_01.models` - * 2018-11-01: :mod:`v2018_11_01.models` - * 2019-08-01: :mod:`v2019_08_01.models` - * 2020-06-01: :mod:`v2020_06_01.models` - * 2020-09-01: :mod:`v2020_09_01.models` - * 2020-12-01: :mod:`v2020_12_01.models` - """ - if api_version == '2015-04-01': - from .v2015_04_01 import models - return models - elif api_version == '2015-08-01': - from .v2015_08_01 import models - return models - elif api_version == '2016-03-01': - from .v2016_03_01 import models - return models - elif api_version == '2016-08-01': - from .v2016_08_01 import models - return models - elif api_version == '2016-09-01': - from .v2016_09_01 import models - return models - elif api_version == '2018-02-01': - from .v2018_02_01 import models - return models - elif api_version == '2018-11-01': - from .v2018_11_01 import models - return models - elif api_version == '2019-08-01': - from .v2019_08_01 import models - return models - elif api_version == '2020-06-01': - from .v2020_06_01 import models - return models - elif api_version == '2020-09-01': - from .v2020_09_01 import models - return models - elif api_version == '2020-12-01': - from .v2020_12_01 import models - return models - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - - @property - def app_service_certificate_orders(self): - """Instance depends on the API version: - - * 2015-08-01: :class:`AppServiceCertificateOrdersOperations` - * 2018-02-01: :class:`AppServiceCertificateOrdersOperations` - * 2019-08-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-06-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-09-01: :class:`AppServiceCertificateOrdersOperations` - * 2020-12-01: :class:`AppServiceCertificateOrdersOperations` - """ - api_version = self._get_api_version('app_service_certificate_orders') - if api_version == '2015-08-01': - from .v2015_08_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import AppServiceCertificateOrdersOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import AppServiceCertificateOrdersOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def app_service_environments(self): - """Instance depends on the API version: - - * 2016-09-01: :class:`AppServiceEnvironmentsOperations` - * 2018-02-01: :class:`AppServiceEnvironmentsOperations` - * 2019-08-01: :class:`AppServiceEnvironmentsOperations` - * 2020-06-01: :class:`AppServiceEnvironmentsOperations` - * 2020-09-01: :class:`AppServiceEnvironmentsOperations` - * 2020-12-01: :class:`AppServiceEnvironmentsOperations` - """ - api_version = self._get_api_version('app_service_environments') - if api_version == '2016-09-01': - from .v2016_09_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import AppServiceEnvironmentsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import AppServiceEnvironmentsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def app_service_plans(self): - """Instance depends on the API version: - - * 2016-09-01: :class:`AppServicePlansOperations` - * 2018-02-01: :class:`AppServicePlansOperations` - * 2019-08-01: :class:`AppServicePlansOperations` - * 2020-06-01: :class:`AppServicePlansOperations` - * 2020-09-01: :class:`AppServicePlansOperations` - * 2020-12-01: :class:`AppServicePlansOperations` - """ - api_version = self._get_api_version('app_service_plans') - if api_version == '2016-09-01': - from .v2016_09_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import AppServicePlansOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import AppServicePlansOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def billing_meters(self): - """Instance depends on the API version: - - * 2016-03-01: :class:`BillingMetersOperations` - """ - api_version = self._get_api_version('billing_meters') - if api_version == '2016-03-01': - from .v2016_03_01.operations import BillingMetersOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".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 NotImplementedError("APIVersion {} is not available".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: - - * 2015-08-01: :class:`CertificateRegistrationProviderOperations` - * 2018-02-01: :class:`CertificateRegistrationProviderOperations` - * 2019-08-01: :class:`CertificateRegistrationProviderOperations` - * 2020-06-01: :class:`CertificateRegistrationProviderOperations` - * 2020-09-01: :class:`CertificateRegistrationProviderOperations` - * 2020-12-01: :class:`CertificateRegistrationProviderOperations` - """ - api_version = self._get_api_version('certificate_registration_provider') - if api_version == '2015-08-01': - from .v2015_08_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import CertificateRegistrationProviderOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import CertificateRegistrationProviderOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def certificates(self): - """Instance depends on the API version: - - * 2016-03-01: :class:`CertificatesOperations` - * 2018-02-01: :class:`CertificatesOperations` - * 2018-11-01: :class:`CertificatesOperations` - * 2019-08-01: :class:`CertificatesOperations` - * 2020-06-01: :class:`CertificatesOperations` - * 2020-09-01: :class:`CertificatesOperations` - * 2020-12-01: :class:`CertificatesOperations` - """ - api_version = self._get_api_version('certificates') - if api_version == '2016-03-01': - from .v2016_03_01.operations import CertificatesOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import CertificatesOperations as OperationClass - elif api_version == '2018-11-01': - from .v2018_11_01.operations import CertificatesOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import CertificatesOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import CertificatesOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import CertificatesOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import CertificatesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def deleted_web_apps(self): - """Instance depends on the API version: - - * 2016-03-01: :class:`DeletedWebAppsOperations` - * 2018-02-01: :class:`DeletedWebAppsOperations` - * 2019-08-01: :class:`DeletedWebAppsOperations` - * 2020-06-01: :class:`DeletedWebAppsOperations` - * 2020-09-01: :class:`DeletedWebAppsOperations` - * 2020-12-01: :class:`DeletedWebAppsOperations` - """ - api_version = self._get_api_version('deleted_web_apps') - if api_version == '2016-03-01': - from .v2016_03_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import DeletedWebAppsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import DeletedWebAppsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def diagnostics(self): - """Instance depends on the API version: - - * 2016-03-01: :class:`DiagnosticsOperations` - * 2018-02-01: :class:`DiagnosticsOperations` - * 2019-08-01: :class:`DiagnosticsOperations` - * 2020-06-01: :class:`DiagnosticsOperations` - * 2020-09-01: :class:`DiagnosticsOperations` - * 2020-12-01: :class:`DiagnosticsOperations` - """ - api_version = self._get_api_version('diagnostics') - if api_version == '2016-03-01': - from .v2016_03_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import DiagnosticsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import DiagnosticsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def domain_registration_provider(self): - """Instance depends on the API version: - - * 2015-04-01: :class:`DomainRegistrationProviderOperations` - * 2018-02-01: :class:`DomainRegistrationProviderOperations` - * 2019-08-01: :class:`DomainRegistrationProviderOperations` - * 2020-06-01: :class:`DomainRegistrationProviderOperations` - * 2020-09-01: :class:`DomainRegistrationProviderOperations` - * 2020-12-01: :class:`DomainRegistrationProviderOperations` - """ - api_version = self._get_api_version('domain_registration_provider') - if api_version == '2015-04-01': - from .v2015_04_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import DomainRegistrationProviderOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import DomainRegistrationProviderOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def domains(self): - """Instance depends on the API version: - - * 2015-04-01: :class:`DomainsOperations` - * 2018-02-01: :class:`DomainsOperations` - * 2019-08-01: :class:`DomainsOperations` - * 2020-06-01: :class:`DomainsOperations` - * 2020-09-01: :class:`DomainsOperations` - * 2020-12-01: :class:`DomainsOperations` - """ - api_version = self._get_api_version('domains') - if api_version == '2015-04-01': - from .v2015_04_01.operations import DomainsOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import DomainsOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import DomainsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import DomainsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import DomainsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import DomainsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".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:`GlobalModelOperations` - """ - api_version = self._get_api_version('global_model') - if api_version == '2020-12-01': - from .v2020_12_01.operations import GlobalModelOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def kube_environments(self): - """Instance depends on the API version: - - * 2020-12-01: :class:`KubeEnvironmentsOperations` - """ - api_version = self._get_api_version('kube_environments') - if api_version == '2020-12-01': - from .v2020_12_01.operations import KubeEnvironmentsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".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: - - * 2016-03-01: :class:`ProviderOperations` - * 2018-02-01: :class:`ProviderOperations` - * 2019-08-01: :class:`ProviderOperations` - * 2020-06-01: :class:`ProviderOperations` - * 2020-09-01: :class:`ProviderOperations` - * 2020-12-01: :class:`ProviderOperations` - """ - api_version = self._get_api_version('provider') - if api_version == '2016-03-01': - from .v2016_03_01.operations import ProviderOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import ProviderOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import ProviderOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import ProviderOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import ProviderOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import ProviderOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def recommendations(self): - """Instance depends on the API version: - - * 2016-03-01: :class:`RecommendationsOperations` - * 2018-02-01: :class:`RecommendationsOperations` - * 2019-08-01: :class:`RecommendationsOperations` - * 2020-06-01: :class:`RecommendationsOperations` - * 2020-09-01: :class:`RecommendationsOperations` - * 2020-12-01: :class:`RecommendationsOperations` - """ - api_version = self._get_api_version('recommendations') - if api_version == '2016-03-01': - from .v2016_03_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import RecommendationsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import RecommendationsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def resource_health_metadata(self): - """Instance depends on the API version: - - * 2016-03-01: :class:`ResourceHealthMetadataOperations` - * 2018-02-01: :class:`ResourceHealthMetadataOperations` - * 2019-08-01: :class:`ResourceHealthMetadataOperations` - * 2020-06-01: :class:`ResourceHealthMetadataOperations` - * 2020-09-01: :class:`ResourceHealthMetadataOperations` - * 2020-12-01: :class:`ResourceHealthMetadataOperations` - """ - api_version = self._get_api_version('resource_health_metadata') - if api_version == '2016-03-01': - from .v2016_03_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import ResourceHealthMetadataOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import ResourceHealthMetadataOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def static_sites(self): - """Instance depends on the API version: - - * 2019-08-01: :class:`StaticSitesOperations` - * 2020-06-01: :class:`StaticSitesOperations` - * 2020-09-01: :class:`StaticSitesOperations` - * 2020-12-01: :class:`StaticSitesOperations` - """ - api_version = self._get_api_version('static_sites') - if api_version == '2019-08-01': - from .v2019_08_01.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import StaticSitesOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import StaticSitesOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def top_level_domains(self): - """Instance depends on the API version: - - * 2015-04-01: :class:`TopLevelDomainsOperations` - * 2018-02-01: :class:`TopLevelDomainsOperations` - * 2019-08-01: :class:`TopLevelDomainsOperations` - * 2020-06-01: :class:`TopLevelDomainsOperations` - * 2020-09-01: :class:`TopLevelDomainsOperations` - * 2020-12-01: :class:`TopLevelDomainsOperations` - """ - api_version = self._get_api_version('top_level_domains') - if api_version == '2015-04-01': - from .v2015_04_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import TopLevelDomainsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import TopLevelDomainsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def web_apps(self): - """Instance depends on the API version: - - * 2016-08-01: :class:`WebAppsOperations` - * 2018-02-01: :class:`WebAppsOperations` - * 2019-08-01: :class:`WebAppsOperations` - * 2020-06-01: :class:`WebAppsOperations` - * 2020-09-01: :class:`WebAppsOperations` - * 2020-12-01: :class:`WebAppsOperations` - """ - api_version = self._get_api_version('web_apps') - if api_version == '2016-08-01': - from .v2016_08_01.operations import WebAppsOperations as OperationClass - elif api_version == '2018-02-01': - from .v2018_02_01.operations import WebAppsOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_08_01.operations import WebAppsOperations as OperationClass - elif api_version == '2020-06-01': - from .v2020_06_01.operations import WebAppsOperations as OperationClass - elif api_version == '2020-09-01': - from .v2020_09_01.operations import WebAppsOperations as OperationClass - elif api_version == '2020-12-01': - from .v2020_12_01.operations import WebAppsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py deleted file mode 100644 index f0f487c4400..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/models.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from .v2016_03_01.models import * -from .v2018_02_01.models import * -from .v2020_12_01.models import * diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/py.typed b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_web_site_management_client.py deleted file mode 100644 index 2095c1d25e5..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/_web_site_management_client.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import DomainsOperations -from .operations import TopLevelDomainsOperations -from .operations import DomainRegistrationProviderOperations -from . import models - - -class WebSiteManagementClient(SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar domains: Domains operations - :vartype domains: azure.mgmt.web.v2015_04_01.operations.DomainsOperations - :ivar top_level_domains: TopLevelDomains operations - :vartype top_level_domains: azure.mgmt.web.v2015_04_01.operations.TopLevelDomainsOperations - :ivar domain_registration_provider: DomainRegistrationProvider operations - :vartype domain_registration_provider: azure.mgmt.web.v2015_04_01.operations.DomainRegistrationProviderOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - 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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/__init__.py deleted file mode 100644 index fe5a475ae20..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/__init__.py +++ /dev/null @@ -1,271 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import Address - from ._models_py3 import ApiDefinitionInfo - from ._models_py3 import AppServicePlan - from ._models_py3 import AutoHealActions - from ._models_py3 import AutoHealCustomAction - from ._models_py3 import AutoHealRules - from ._models_py3 import AutoHealTriggers - from ._models_py3 import Capability - from ._models_py3 import CloningInfo - from ._models_py3 import ConnStringInfo - from ._models_py3 import Contact - from ._models_py3 import CorsSettings - from ._models_py3 import CsmOperationDescription - from ._models_py3 import CsmOperationDescriptionProperties - from ._models_py3 import CsmOperationDisplay - from ._models_py3 import Dimension - from ._models_py3 import Domain - from ._models_py3 import DomainAvailablilityCheckResult - from ._models_py3 import DomainControlCenterSsoRequest - from ._models_py3 import DomainOwnershipIdentifier - from ._models_py3 import DomainPatchResource - from ._models_py3 import DomainPurchaseConsent - from ._models_py3 import DomainRecommendationSearchParameters - from ._models_py3 import ErrorResponse, ErrorResponseException - from ._models_py3 import Experiments - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostName - from ._models_py3 import HostNameSslState - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import Identifier - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import MetricAvailability - from ._models_py3 import MetricSpecification - from ._models_py3 import NameIdentifier - from ._models_py3 import NameValuePair - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceMetricName - from ._models_py3 import ServiceSpecification - from ._models_py3 import Site - from ._models_py3 import SiteConfig - from ._models_py3 import SiteLimits - from ._models_py3 import SiteMachineKey - from ._models_py3 import SkuCapacity - from ._models_py3 import SkuDescription - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import SnapshotRecoveryRequest - from ._models_py3 import SnapshotRecoveryTarget - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import TldLegalAgreement - from ._models_py3 import TopLevelDomain - from ._models_py3 import TopLevelDomainAgreementOption - from ._models_py3 import User - from ._models_py3 import VirtualApplication - from ._models_py3 import VirtualDirectory - from ._models_py3 import VnetGateway - from ._models_py3 import VnetInfo - from ._models_py3 import VnetRoute -except (SyntaxError, ImportError): - from ._models import Address - from ._models import ApiDefinitionInfo - from ._models import AppServicePlan - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import Capability - from ._models import CloningInfo - from ._models import ConnStringInfo - from ._models import Contact - from ._models import CorsSettings - from ._models import CsmOperationDescription - from ._models import CsmOperationDescriptionProperties - from ._models import CsmOperationDisplay - from ._models import Dimension - from ._models import Domain - from ._models import DomainAvailablilityCheckResult - from ._models import DomainControlCenterSsoRequest - from ._models import DomainOwnershipIdentifier - from ._models import DomainPatchResource - from ._models import DomainPurchaseConsent - from ._models import DomainRecommendationSearchParameters - from ._models import ErrorResponse, ErrorResponseException - from ._models import Experiments - from ._models import HandlerMapping - from ._models import HostingEnvironmentProfile - from ._models import HostName - from ._models import HostNameSslState - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import Identifier - from ._models import IpSecurityRestriction - from ._models import ManagedServiceIdentity - from ._models import MetricAvailability - from ._models import MetricSpecification - from ._models import NameIdentifier - from ._models import NameValuePair - from ._models import ProxyOnlyResource - from ._models import PushSettings - from ._models import RampUpRule - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceMetricName - from ._models import ServiceSpecification - from ._models import Site - from ._models import SiteConfig - from ._models import SiteLimits - from ._models import SiteMachineKey - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import SnapshotRecoveryRequest - from ._models import SnapshotRecoveryTarget - from ._models import StatusCodesBasedTrigger - from ._models import TldLegalAgreement - from ._models import TopLevelDomain - from ._models import TopLevelDomainAgreementOption - from ._models import User - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetRoute -from ._paged_models import CsmOperationDescriptionPaged -from ._paged_models import DomainOwnershipIdentifierPaged -from ._paged_models import DomainPaged -from ._paged_models import NameIdentifierPaged -from ._paged_models import TldLegalAgreementPaged -from ._paged_models import TopLevelDomainPaged -from ._web_site_management_client_enums import ( - DomainStatus, - ProvisioningState, - AzureResourceType, - CustomHostNameDnsRecordType, - HostNameType, - DnsType, - DomainType, - RouteType, - ManagedServiceIdentityType, - AutoHealActionType, - ConnectionStringType, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - StatusOptions, -) - -__all__ = [ - 'Address', - 'ApiDefinitionInfo', - 'AppServicePlan', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'Capability', - 'CloningInfo', - 'ConnStringInfo', - 'Contact', - 'CorsSettings', - 'CsmOperationDescription', - 'CsmOperationDescriptionProperties', - 'CsmOperationDisplay', - 'Dimension', - 'Domain', - 'DomainAvailablilityCheckResult', - 'DomainControlCenterSsoRequest', - 'DomainOwnershipIdentifier', - 'DomainPatchResource', - 'DomainPurchaseConsent', - 'DomainRecommendationSearchParameters', - 'ErrorResponse', 'ErrorResponseException', - 'Experiments', - 'HandlerMapping', - 'HostingEnvironmentProfile', - 'HostName', - 'HostNameSslState', - 'HybridConnection', - 'HybridConnectionKey', - 'Identifier', - 'IpSecurityRestriction', - 'ManagedServiceIdentity', - 'MetricAvailability', - 'MetricSpecification', - 'NameIdentifier', - 'NameValuePair', - 'ProxyOnlyResource', - 'PushSettings', - 'RampUpRule', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceMetricName', - 'ServiceSpecification', - 'Site', - 'SiteConfig', - 'SiteLimits', - 'SiteMachineKey', - 'SkuCapacity', - 'SkuDescription', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'SnapshotRecoveryRequest', - 'SnapshotRecoveryTarget', - 'StatusCodesBasedTrigger', - 'TldLegalAgreement', - 'TopLevelDomain', - 'TopLevelDomainAgreementOption', - 'User', - 'VirtualApplication', - 'VirtualDirectory', - 'VnetGateway', - 'VnetInfo', - 'VnetRoute', - 'DomainPaged', - 'NameIdentifierPaged', - 'DomainOwnershipIdentifierPaged', - 'TopLevelDomainPaged', - 'TldLegalAgreementPaged', - 'CsmOperationDescriptionPaged', - 'DomainStatus', - 'ProvisioningState', - 'AzureResourceType', - 'CustomHostNameDnsRecordType', - 'HostNameType', - 'DnsType', - 'DomainType', - 'RouteType', - 'ManagedServiceIdentityType', - 'AutoHealActionType', - 'ConnectionStringType', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'StatusOptions', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models.py deleted file mode 100644 index ef083134b52..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models.py +++ /dev/null @@ -1,3126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Address(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.get('address1', None) - self.address2 = kwargs.get('address2', None) - self.city = kwargs.get('city', None) - self.country = kwargs.get('country', None) - self.postal_code = kwargs.get('postal_code', None) - self.state = kwargs.get('state', None) - - -class ApiDefinitionInfo(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 Resource(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: 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.get('location', None) - self.type = None - self.tags = kwargs.get('tags', None) - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2015_04_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2015_04_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2015_04_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2015_04_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, self).__init__(**kwargs) - self.app_service_plan_name = kwargs.get('app_service_plan_name', None) - self.worker_tier_name = kwargs.get('worker_tier_name', None) - self.status = None - self.subscription = None - self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None - self.is_spot = kwargs.get('is_spot', None) - self.spot_expiration_time = kwargs.get('spot_expiration_time', None) - self.resource_group = None - self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', None) - - -class AutoHealActions(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.v2015_04_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2015_04_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': 'AutoHealActionType'}, - '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(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(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.v2015_04_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2015_04_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2015_04_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) - - -class Capability(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 CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - 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.get('source_web_app_id', 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) - self.ignore_quotas = kwargs.get('ignore_quotas', None) - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2015_04_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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 Contact(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.v2015_04_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.get('email', None) - self.fax = kwargs.get('fax', None) - self.job_title = kwargs.get('job_title', None) - self.name_first = kwargs.get('name_first', None) - self.name_last = kwargs.get('name_last', None) - self.name_middle = kwargs.get('name_middle', None) - self.organization = kwargs.get('organization', None) - self.phone = kwargs.get('phone', None) - - -class CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = kwargs.get('allowed_origins', None) - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2015_04_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2015_04_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(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2015_04_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(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 Dimension(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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2015_04_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.v2015_04_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.v2015_04_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2015_04_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2015_04_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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 DomainAvailablilityCheckResult(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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.v2015_04_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - def __init__(self, **kwargs): - super(DomainAvailablilityCheckResult, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.available = kwargs.get('available', None) - self.domain_type = kwargs.get('domain_type', None) - - -class DomainControlCenterSsoRequest(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 ProxyOnlyResource(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 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 DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2015_04_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.v2015_04_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.v2015_04_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2015_04_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2015_04_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(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 - 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 - """ - - _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(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 ErrorResponse(Model): - """Error Response. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) - - -class Experiments(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2015_04_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 HandlerMapping(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 HostingEnvironmentProfile(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 HostName(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.v2015_04_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.v2015_04_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.v2015_04_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - 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 HostNameSslState(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.v2015_04_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 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.v2015_04_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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 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 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 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identifier, self).__init__(**kwargs) - self.identifier_id = kwargs.get('identifier_id', None) - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', '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) - - -class ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2015_04_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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.tenant_id = None - self.principal_id = None - - -class MetricAvailability(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(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.v2015_04_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2015_04_01.models.MetricAvailability] - """ - - _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]'}, - } - - 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) - - -class NameIdentifier(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 NameValuePair(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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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 RequestsBasedTrigger(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 ResourceMetricAvailability(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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2015_04_01.models.ResourceMetricName - :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.v2015_04_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricDefinition, self).__init__(**kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2015_04_01.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, **kwargs): - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_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: Resource tags. - :type tags: dict[str, str] - :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.v2015_04_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2015_04_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.v2015_04_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2015_04_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2015_04_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2015_04_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2015_04_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2015_04_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2015_04_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = kwargs.get('https_only', None) - self.identity = kwargs.get('identity', None) - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2015_04_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2015_04_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2015_04_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2015_04_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' - :type scm_type: str or ~azure.mgmt.web.v2015_04_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2015_04_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2015_04_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2015_04_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2015_04_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2015_04_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2015_04_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2015_04_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2015_04_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2015_04_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2015_04_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2015_04_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) - self.http20_enabled = kwargs.get('http20_enabled', True) - self.min_tls_version = kwargs.get('min_tls_version', None) - - -class SiteLimits(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 SiteMachineKey(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 SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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.v2015_04_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.v2015_04_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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', None) - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2015_04_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SnapshotRecoveryRequest, self).__init__(**kwargs) - self.snapshot_time = kwargs.get('snapshot_time', None) - self.recovery_target = kwargs.get('recovery_target', 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) - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.id = kwargs.get('id', None) - - -class StatusCodesBasedTrigger(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 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', None) - - -class TldLegalAgreement(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.get('agreement_key', None) - self.title = kwargs.get('title', None) - self.content = kwargs.get('content', None) - self.url = kwargs.get('url', 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 - :ivar domain_name: Name of the top level domain. - :vartype domain_name: str - :param privacy: If true, then the top level domain supports - domain privacy; otherwise, false. - :type privacy: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_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'}, - 'domain_name': {'key': 'properties.name', 'type': 'str'}, - 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(TopLevelDomain, self).__init__(**kwargs) - self.domain_name = None - self.privacy = kwargs.get('privacy', None) - - -class TopLevelDomainAgreementOption(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - 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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.user_name = kwargs.get('user_name', None) - 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) - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2015_04_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(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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2015_04_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - 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) - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2015_04_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'}, - 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) - self.start_address = kwargs.get('start_address', None) - self.end_address = kwargs.get('end_address', None) - self.route_type = kwargs.get('route_type', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models_py3.py deleted file mode 100644 index dd0eb24ec94..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_models_py3.py +++ /dev/null @@ -1,3126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Address(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: str=None, **kwargs) -> None: - 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 ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class Resource(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: 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: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.location = location - self.type = None - self.tags = tags - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2015_04_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2015_04_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2015_04_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2015_04_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_plan_name = app_service_plan_name - self.worker_tier_name = worker_tier_name - self.status = None - self.subscription = None - self.admin_site_name = admin_site_name - 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.number_of_sites = None - self.is_spot = is_spot - self.spot_expiration_time = spot_expiration_time - self.resource_group = None - self.reserved = reserved - self.target_worker_count = target_worker_count - self.target_worker_size_id = target_worker_size_id - self.provisioning_state = None - self.sku = sku - - -class AutoHealActions(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.v2015_04_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2015_04_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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.v2015_04_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2015_04_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2015_04_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - super(Capability, self).__init__(**kwargs) - self.name = name - self.value = value - self.reason = reason - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: - 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.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 - self.ignore_quotas = ignore_quotas - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2015_04_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class Contact(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.v2015_04_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: - 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 CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, *, allowed_origins=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2015_04_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2015_04_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(CsmOperationDescription, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class CsmOperationDescriptionProperties(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2015_04_01.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(CsmOperationDescriptionProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(CsmOperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class Dimension(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2015_04_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.v2015_04_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.v2015_04_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2015_04_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2015_04_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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 DomainAvailablilityCheckResult(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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.v2015_04_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: - super(DomainAvailablilityCheckResult, self).__init__(**kwargs) - self.name = name - self.available = available - self.domain_type = domain_type - - -class DomainControlCenterSsoRequest(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) -> None: - super(DomainControlCenterSsoRequest, self).__init__(**kwargs) - self.url = None - self.post_parameter_key = None - self.post_parameter_value = None - - -class ProxyOnlyResource(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: str=None, **kwargs) -> None: - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.type = 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: str=None, ownership_id: str=None, **kwargs) -> None: - super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) - self.ownership_id = ownership_id - - -class DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2015_04_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2015_04_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.v2015_04_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.v2015_04_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2015_04_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2015_04_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2015_04_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.v2015_04_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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(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 - 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 - """ - - _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: - super(DomainPurchaseConsent, self).__init__(**kwargs) - self.agreement_keys = agreement_keys - self.agreed_by = agreed_by - self.agreed_at = agreed_at - - -class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: - super(DomainRecommendationSearchParameters, self).__init__(**kwargs) - self.keywords = keywords - self.max_domain_recommendations = max_domain_recommendations - - -class ErrorResponse(Model): - """Error Response. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) - - -class Experiments(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2015_04_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostName(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.v2015_04_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.v2015_04_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.v2015_04_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: - 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 HostNameSslState(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.v2015_04_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 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.v2015_04_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) - self.send_key_name = None - self.send_key_value = 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.identifier_id = identifier_id - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: - super(IpSecurityRestriction, self).__init__(**kwargs) - self.ip_address = ip_address - self.subnet_mask = subnet_mask - - -class ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2015_04_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 - """ - - _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'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - - -class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricSpecification(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.v2015_04_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2015_04_01.models.MetricAvailability] - """ - - _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]'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, **kwargs) -> None: - 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 - - -class NameIdentifier(Model): - """Identifies an object. - - :param name: Name of the object. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(NameIdentifier, self).__init__(**kwargs) - self.name = name - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -class ResourceMetricAvailability(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) -> None: - 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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2015_04_01.models.ResourceMetricName - :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.v2015_04_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2015_04_01.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, **kwargs) -> None: - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = metric_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: Resource tags. - :type tags: dict[str, str] - :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.v2015_04_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2015_04_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.v2015_04_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2015_04_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2015_04_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2015_04_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2015_04_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2015_04_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2015_04_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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.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.host_names_disabled = host_names_disabled - 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.snapshot_info = snapshot_info - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = https_only - self.identity = identity - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2015_04_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2015_04_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2015_04_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2015_04_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' - :type scm_type: str or ~azure.mgmt.web.v2015_04_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2015_04_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2015_04_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2015_04_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2015_04_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2015_04_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2015_04_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2015_04_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2015_04_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2015_04_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2015_04_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2015_04_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: - 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.linux_fx_version = linux_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.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.cors = cors - self.push = push - self.api_definition = api_definition - self.auto_swap_slot_name = auto_swap_slot_name - self.local_my_sql_enabled = local_my_sql_enabled - self.ip_security_restrictions = ip_security_restrictions - self.http20_enabled = http20_enabled - self.min_tls_version = min_tls_version - - -class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - super(SiteMachineKey, self).__init__(**kwargs) - self.validation = validation - self.validation_key = validation_key - self.decryption = decryption - self.decryption_key = decryption_key - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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.v2015_04_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.v2015_04_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - self.count = count - self.time_interval = time_interval - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2015_04_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: - super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) - self.snapshot_time = snapshot_time - self.recovery_target = recovery_target - self.overwrite = overwrite - self.recover_configuration = recover_configuration - self.ignore_conflicting_host_names = ignore_conflicting_host_names - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: - super(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = location - self.id = id - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - self.count = count - self.time_interval = time_interval - - -class TldLegalAgreement(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: str=None, **kwargs) -> None: - super(TldLegalAgreement, self).__init__(**kwargs) - self.agreement_key = agreement_key - self.title = title - self.content = content - self.url = url - - -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 - :ivar domain_name: Name of the top level domain. - :vartype domain_name: str - :param privacy: If true, then the top level domain supports - domain privacy; otherwise, false. - :type privacy: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_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'}, - 'domain_name': {'key': 'properties.name', 'type': 'str'}, - 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, privacy: bool=None, **kwargs) -> None: - super(TopLevelDomain, self).__init__(kind=kind, **kwargs) - self.domain_name = None - self.privacy = privacy - - -class TopLevelDomainAgreementOption(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - """ - - _attribute_map = { - 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, - 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, - } - - def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: - super(TopLevelDomainAgreementOption, self).__init__(**kwargs) - self.include_privacy = include_privacy - self.for_transfer = for_transfer - - -class User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: - super(User, self).__init__(kind=kind, **kwargs) - self.user_name = user_name - 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 - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2015_04_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2015_04_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: - 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 - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2015_04_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'}, - 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - super(VnetRoute, self).__init__(kind=kind, **kwargs) - self.vnet_route_name = vnet_route_name - self.start_address = start_address - self.end_address = end_address - self.route_type = route_type diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_paged_models.py deleted file mode 100644 index 8a4a1bd3928..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_paged_models.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`Domain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Domain]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainPaged, self).__init__(*args, **kwargs) -class NameIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`NameIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(NameIdentifierPaged, self).__init__(*args, **kwargs) -class DomainOwnershipIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) -class TopLevelDomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`TopLevelDomain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} - } - - def __init__(self, *args, **kwargs): - - super(TopLevelDomainPaged, self).__init__(*args, **kwargs) -class TldLegalAgreementPaged(Paged): - """ - A paging container for iterating over a list of :class:`TldLegalAgreement ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} - } - - def __init__(self, *args, **kwargs): - - super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) -class CsmOperationDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmOperationDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_web_site_management_client_enums.py deleted file mode 100644 index 22f218bb63e..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DomainStatus(str, Enum): - - 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 ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class AzureResourceType(str, Enum): - - website = "Website" - traffic_manager = "TrafficManager" - - -class CustomHostNameDnsRecordType(str, Enum): - - cname = "CName" - a = "A" - - -class HostNameType(str, Enum): - - verified = "Verified" - managed = "Managed" - - -class DnsType(str, Enum): - - azure_dns = "AzureDns" - default_domain_registrar_dns = "DefaultDomainRegistrarDns" - - -class DomainType(str, Enum): - - regular = "Regular" - soft_deleted = "SoftDeleted" - - -class RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 ScmType(str, Enum): - - 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" - - -class ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/__init__.py deleted file mode 100644 index c190a5674c8..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._domains_operations import DomainsOperations -from ._top_level_domains_operations import TopLevelDomainsOperations -from ._domain_registration_provider_operations import DomainRegistrationProviderOperations - -__all__ = [ - 'DomainsOperations', - 'TopLevelDomainsOperations', - 'DomainRegistrationProviderOperations', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domain_registration_provider_operations.py deleted file mode 100644 index c2d79d623ed..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domain_registration_provider_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class DomainRegistrationProviderOperations(object): - """DomainRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """Implements Csm operations Api to exposes the list of available Csm Apis - under the resource provider. - - Implements Csm operations Api to exposes the list of available Csm Apis - under the resource provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2015_04_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2015_04_01.models.CsmOperationDescription] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py deleted file mode 100644 index ff0a257aa46..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_domains_operations.py +++ /dev/null @@ -1,1104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DomainsOperations(object): - """DomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-01" - - self.config = config - - def check_availability( - self, name=None, custom_headers=None, raw=False, **operation_config): - """Check if a domain is available for registration. - - Check if a domain is available for registration. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainAvailablilityCheckResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2015_04_01.models.DomainAvailablilityCheckResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.check_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainAvailablilityCheckResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all domains in a subscription. - - Get all domains in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2015_04_01.models.DomainPaged[~azure.mgmt.web.v2015_04_01.models.Domain] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} - - def get_control_center_sso_request( - self, custom_headers=None, raw=False, **operation_config): - """Generate a single sign-on request for the domain management portal. - - Generate a single sign-on request for the domain management portal. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainControlCenterSsoRequest or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2015_04_01.models.DomainControlCenterSsoRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_control_center_sso_request.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainControlCenterSsoRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} - - def list_recommendations( - self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): - """Get domain name recommendations based on keywords. - - Get domain name recommendations based on keywords. - - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NameIdentifier - :rtype: - ~azure.mgmt.web.v2015_04_01.models.NameIdentifierPaged[~azure.mgmt.web.v2015_04_01.models.NameIdentifier] - :raises: :class:`CloudError` - """ - parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommendations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all domains in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2015_04_01.models.DomainPaged[~azure.mgmt.web.v2015_04_01.models.Domain] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} - - def get( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Get a domain. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_04_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - - def _create_or_update_initial( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'Domain') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a domain. - - 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.v2015_04_01.models.Domain - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2015_04_01.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2015_04_01.models.Domain]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - domain=domain, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def delete( - self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): - """Delete a domain. - - 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 true to delete - the domain immediately. The default is false which - deletes the domain after 24 hours. - :type force_hard_delete_domain: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - """Creates or updates a domain. - - 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.v2015_04_01.models.DomainPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_04_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'DomainPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def list_ownership_identifiers( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Lists domain ownership identifiers. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DomainOwnershipIdentifier - :rtype: - ~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifier] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_ownership_identifiers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} - - def get_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """Get ownership identifier for domain. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def create_or_update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.create_or_update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def delete_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """Delete ownership identifier for domain. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def renew( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Renew a domain. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_top_level_domains_operations.py deleted file mode 100644 index bdfe01b2f80..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/operations/_top_level_domains_operations.py +++ /dev/null @@ -1,255 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class TopLevelDomainsOperations(object): - """TopLevelDomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all top-level domains supported for registration. - - Get all top-level domains supported for registration. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TopLevelDomain - :rtype: - ~azure.mgmt.web.v2015_04_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2015_04_01.models.TopLevelDomain] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} - - def get( - self, name, custom_headers=None, raw=False, **operation_config): - """Get details of a top-level domain. - - Get details of a top-level domain. - - :param name: Name of the top-level domain. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TopLevelDomain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_04_01.models.TopLevelDomain or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TopLevelDomain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} - - def list_agreements( - self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): - """Gets all legal agreements that user needs to accept before purchasing a - domain. - - 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 include_privacy: If true, then the list of - agreements will include agreements for domain privacy as well; - otherwise, false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TldLegalAgreement - :rtype: - ~azure.mgmt.web.v2015_04_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2015_04_01.models.TldLegalAgreement] - :raises: :class:`CloudError` - """ - agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_agreements.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_04_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_web_site_management_client.py deleted file mode 100644 index ffe20b2588d..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/_web_site_management_client.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import AppServiceCertificateOrdersOperations -from .operations import CertificateRegistrationProviderOperations -from . import models - - -class WebSiteManagementClient(SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar app_service_certificate_orders: AppServiceCertificateOrders operations - :vartype app_service_certificate_orders: azure.mgmt.web.v2015_08_01.operations.AppServiceCertificateOrdersOperations - :ivar certificate_registration_provider: CertificateRegistrationProvider operations - :vartype certificate_registration_provider: azure.mgmt.web.v2015_08_01.operations.CertificateRegistrationProviderOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-08-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.certificate_registration_provider = CertificateRegistrationProviderOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/__init__.py deleted file mode 100644 index 325f9d716c7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/__init__.py +++ /dev/null @@ -1,255 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import ApiDefinitionInfo - from ._models_py3 import AppServiceCertificate - from ._models_py3 import AppServiceCertificateOrder - from ._models_py3 import AppServiceCertificateOrderPatchResource - from ._models_py3 import AppServiceCertificatePatchResource - from ._models_py3 import AppServiceCertificateResource - from ._models_py3 import AppServicePlan - from ._models_py3 import AutoHealActions - from ._models_py3 import AutoHealCustomAction - from ._models_py3 import AutoHealRules - from ._models_py3 import AutoHealTriggers - from ._models_py3 import Capability - from ._models_py3 import CertificateDetails - from ._models_py3 import CertificateEmail - from ._models_py3 import CertificateOrderAction - from ._models_py3 import CloningInfo - from ._models_py3 import ConnStringInfo - from ._models_py3 import CorsSettings - from ._models_py3 import CsmOperationDescription - from ._models_py3 import CsmOperationDescriptionProperties - from ._models_py3 import CsmOperationDisplay - from ._models_py3 import Dimension - from ._models_py3 import Experiments - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostNameSslState - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import Identifier - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import MetricAvailability - from ._models_py3 import MetricSpecification - from ._models_py3 import NameIdentifier - from ._models_py3 import NameValuePair - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import ReissueCertificateOrderRequest - from ._models_py3 import RenewCertificateOrderRequest - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceMetricName - from ._models_py3 import ServiceSpecification - from ._models_py3 import Site - from ._models_py3 import SiteConfig - from ._models_py3 import SiteLimits - from ._models_py3 import SiteMachineKey - from ._models_py3 import SiteSeal - from ._models_py3 import SiteSealRequest - from ._models_py3 import SkuCapacity - from ._models_py3 import SkuDescription - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import SnapshotRecoveryRequest - from ._models_py3 import SnapshotRecoveryTarget - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import User - from ._models_py3 import VirtualApplication - from ._models_py3 import VirtualDirectory - from ._models_py3 import VnetGateway - from ._models_py3 import VnetInfo - from ._models_py3 import VnetRoute -except (SyntaxError, ImportError): - from ._models import ApiDefinitionInfo - from ._models import AppServiceCertificate - from ._models import AppServiceCertificateOrder - from ._models import AppServiceCertificateOrderPatchResource - from ._models import AppServiceCertificatePatchResource - from ._models import AppServiceCertificateResource - from ._models import AppServicePlan - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import Capability - from ._models import CertificateDetails - from ._models import CertificateEmail - from ._models import CertificateOrderAction - from ._models import CloningInfo - from ._models import ConnStringInfo - from ._models import CorsSettings - from ._models import CsmOperationDescription - from ._models import CsmOperationDescriptionProperties - from ._models import CsmOperationDisplay - from ._models import Dimension - from ._models import Experiments - from ._models import HandlerMapping - from ._models import HostingEnvironmentProfile - from ._models import HostNameSslState - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import Identifier - from ._models import IpSecurityRestriction - from ._models import ManagedServiceIdentity - from ._models import MetricAvailability - from ._models import MetricSpecification - from ._models import NameIdentifier - from ._models import NameValuePair - from ._models import ProxyOnlyResource - from ._models import PushSettings - from ._models import RampUpRule - from ._models import ReissueCertificateOrderRequest - from ._models import RenewCertificateOrderRequest - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceMetricName - from ._models import ServiceSpecification - from ._models import Site - from ._models import SiteConfig - from ._models import SiteLimits - from ._models import SiteMachineKey - from ._models import SiteSeal - from ._models import SiteSealRequest - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import SnapshotRecoveryRequest - from ._models import SnapshotRecoveryTarget - from ._models import StatusCodesBasedTrigger - from ._models import User - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetRoute -from ._paged_models import AppServiceCertificateOrderPaged -from ._paged_models import AppServiceCertificateResourcePaged -from ._paged_models import CsmOperationDescriptionPaged -from ._web_site_management_client_enums import ( - KeyVaultSecretStatus, - CertificateProductType, - ProvisioningState, - CertificateOrderStatus, - CertificateOrderActionType, - RouteType, - ManagedServiceIdentityType, - AutoHealActionType, - ConnectionStringType, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - StatusOptions, -) - -__all__ = [ - 'ApiDefinitionInfo', - 'AppServiceCertificate', - 'AppServiceCertificateOrder', - 'AppServiceCertificateOrderPatchResource', - 'AppServiceCertificatePatchResource', - 'AppServiceCertificateResource', - 'AppServicePlan', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'Capability', - 'CertificateDetails', - 'CertificateEmail', - 'CertificateOrderAction', - 'CloningInfo', - 'ConnStringInfo', - 'CorsSettings', - 'CsmOperationDescription', - 'CsmOperationDescriptionProperties', - 'CsmOperationDisplay', - 'Dimension', - 'Experiments', - 'HandlerMapping', - 'HostingEnvironmentProfile', - 'HostNameSslState', - 'HybridConnection', - 'HybridConnectionKey', - 'Identifier', - 'IpSecurityRestriction', - 'ManagedServiceIdentity', - 'MetricAvailability', - 'MetricSpecification', - 'NameIdentifier', - 'NameValuePair', - 'ProxyOnlyResource', - 'PushSettings', - 'RampUpRule', - 'ReissueCertificateOrderRequest', - 'RenewCertificateOrderRequest', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceMetricName', - 'ServiceSpecification', - 'Site', - 'SiteConfig', - 'SiteLimits', - 'SiteMachineKey', - 'SiteSeal', - 'SiteSealRequest', - 'SkuCapacity', - 'SkuDescription', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'SnapshotRecoveryRequest', - 'SnapshotRecoveryTarget', - 'StatusCodesBasedTrigger', - 'User', - 'VirtualApplication', - 'VirtualDirectory', - 'VnetGateway', - 'VnetInfo', - 'VnetRoute', - 'AppServiceCertificateOrderPaged', - 'AppServiceCertificateResourcePaged', - 'CsmOperationDescriptionPaged', - 'KeyVaultSecretStatus', - 'CertificateProductType', - 'ProvisioningState', - 'CertificateOrderStatus', - 'CertificateOrderActionType', - 'RouteType', - 'ManagedServiceIdentityType', - 'AutoHealActionType', - 'ConnectionStringType', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'StatusOptions', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models.py deleted file mode 100644 index 9e7cf0ed076..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models.py +++ /dev/null @@ -1,3126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiDefinitionInfo(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 AppServiceCertificate(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.v2015_08_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': 'KeyVaultSecretStatus'}, - } - - 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 Resource(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: 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.get('location', None) - 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: Resource tags. - :type tags: dict[str, str] - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2015_08_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2015_08_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2015_08_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.v2015_08_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2015_08_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -class ProxyOnlyResource(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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2015_08_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2015_08_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2015_08_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.v2015_08_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2015_08_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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.v2015_08_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': 'KeyVaultSecretStatus'}, - } - - 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: 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.v2015_08_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': 'KeyVaultSecretStatus'}, - } - - 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 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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2015_08_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2015_08_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2015_08_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2015_08_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, self).__init__(**kwargs) - self.app_service_plan_name = kwargs.get('app_service_plan_name', None) - self.worker_tier_name = kwargs.get('worker_tier_name', None) - self.status = None - self.subscription = None - self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None - self.is_spot = kwargs.get('is_spot', None) - self.spot_expiration_time = kwargs.get('spot_expiration_time', None) - self.resource_group = None - self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', None) - - -class AutoHealActions(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.v2015_08_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2015_08_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': 'AutoHealActionType'}, - '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(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(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.v2015_08_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2015_08_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2015_08_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) - - -class Capability(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 CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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 - """ - - _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 - :param certificate_order_action_type: Action type. Possible values - include: 'CertificateIssued', 'CertificateOrderCanceled', - 'CertificateOrderCreated', 'CertificateRevoked', - 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', - 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', - 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' - :type certificate_order_action_type: str or - ~azure.mgmt.web.v2015_08_01.models.CertificateOrderActionType - :param created_at: Time at which the certificate action was performed. - :type created_at: 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'}, - 'certificate_order_action_type': {'key': 'properties.type', 'type': 'CertificateOrderActionType'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(CertificateOrderAction, self).__init__(**kwargs) - self.certificate_order_action_type = kwargs.get('certificate_order_action_type', None) - self.created_at = kwargs.get('created_at', None) - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - 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.get('source_web_app_id', 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) - self.ignore_quotas = kwargs.get('ignore_quotas', None) - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2015_08_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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 CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = kwargs.get('allowed_origins', None) - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2015_08_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2015_08_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(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2015_08_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(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 Dimension(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 Experiments(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2015_08_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 HandlerMapping(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 HostingEnvironmentProfile(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 HostNameSslState(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.v2015_08_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 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.v2015_08_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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 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 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 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identifier, self).__init__(**kwargs) - self.identifier_id = kwargs.get('identifier_id', None) - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', '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) - - -class ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2015_08_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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.tenant_id = None - self.principal_id = None - - -class MetricAvailability(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(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.v2015_08_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2015_08_01.models.MetricAvailability] - """ - - _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]'}, - } - - 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) - - -class NameIdentifier(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 NameValuePair(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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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 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 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(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 ResourceMetricAvailability(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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2015_08_01.models.ResourceMetricName - :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.v2015_08_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricDefinition, self).__init__(**kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2015_08_01.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, **kwargs): - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_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: Resource tags. - :type tags: dict[str, str] - :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.v2015_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2015_08_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.v2015_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2015_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2015_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2015_08_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2015_08_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2015_08_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2015_08_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = kwargs.get('https_only', None) - self.identity = kwargs.get('identity', None) - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2015_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2015_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2015_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2015_08_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' - :type scm_type: str or ~azure.mgmt.web.v2015_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2015_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2015_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2015_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2015_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2015_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2015_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2015_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2015_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2015_08_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2015_08_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2015_08_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) - self.http20_enabled = kwargs.get('http20_enabled', True) - self.min_tls_version = kwargs.get('min_tls_version', None) - - -class SiteLimits(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 SiteMachineKey(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 SiteSeal(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.get('html', None) - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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 SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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.v2015_08_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.v2015_08_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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', None) - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2015_08_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SnapshotRecoveryRequest, self).__init__(**kwargs) - self.snapshot_time = kwargs.get('snapshot_time', None) - self.recovery_target = kwargs.get('recovery_target', 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) - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.id = kwargs.get('id', None) - - -class StatusCodesBasedTrigger(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 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.user_name = kwargs.get('user_name', None) - 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) - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2015_08_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(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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2015_08_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - 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) - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2015_08_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'}, - 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) - self.start_address = kwargs.get('start_address', None) - self.end_address = kwargs.get('end_address', None) - self.route_type = kwargs.get('route_type', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models_py3.py deleted file mode 100644 index 72f7a806ea2..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_models_py3.py +++ /dev/null @@ -1,3126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class AppServiceCertificate(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.v2015_08_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2015_08_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2015_08_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2015_08_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.v2015_08_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2015_08_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, location: str, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 - - -class ProxyOnlyResource(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: str=None, **kwargs) -> None: - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.type = 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2015_08_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2015_08_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2015_08_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.v2015_08_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2015_08_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 - - -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.v2015_08_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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: 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.v2015_08_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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 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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2015_08_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2015_08_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2015_08_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2015_08_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_plan_name = app_service_plan_name - self.worker_tier_name = worker_tier_name - self.status = None - self.subscription = None - self.admin_site_name = admin_site_name - 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.number_of_sites = None - self.is_spot = is_spot - self.spot_expiration_time = spot_expiration_time - self.resource_group = None - self.reserved = reserved - self.target_worker_count = target_worker_count - self.target_worker_size_id = target_worker_size_id - self.provisioning_state = None - self.sku = sku - - -class AutoHealActions(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.v2015_08_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2015_08_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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.v2015_08_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2015_08_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2015_08_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.v2015_08_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2015_08_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - super(Capability, self).__init__(**kwargs) - self.name = name - self.value = value - self.reason = reason - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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) -> None: - 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 - """ - - _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: - 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 - :param certificate_order_action_type: Action type. Possible values - include: 'CertificateIssued', 'CertificateOrderCanceled', - 'CertificateOrderCreated', 'CertificateRevoked', - 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', - 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', - 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' - :type certificate_order_action_type: str or - ~azure.mgmt.web.v2015_08_01.models.CertificateOrderActionType - :param created_at: Time at which the certificate action was performed. - :type created_at: 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'}, - 'certificate_order_action_type': {'key': 'properties.type', 'type': 'CertificateOrderActionType'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, certificate_order_action_type=None, created_at=None, **kwargs) -> None: - super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) - self.certificate_order_action_type = certificate_order_action_type - self.created_at = created_at - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: - 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.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 - self.ignore_quotas = ignore_quotas - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2015_08_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, *, allowed_origins=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2015_08_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2015_08_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(CsmOperationDescription, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class CsmOperationDescriptionProperties(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2015_08_01.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(CsmOperationDescriptionProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(CsmOperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class Dimension(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - 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 Experiments(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2015_08_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostNameSslState(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.v2015_08_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 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.v2015_08_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) - self.send_key_name = None - self.send_key_value = 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.identifier_id = identifier_id - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: - super(IpSecurityRestriction, self).__init__(**kwargs) - self.ip_address = ip_address - self.subnet_mask = subnet_mask - - -class ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2015_08_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 - """ - - _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'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - - -class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricSpecification(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.v2015_08_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2015_08_01.models.MetricAvailability] - """ - - _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]'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, **kwargs) -> None: - 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 - - -class NameIdentifier(Model): - """Identifies an object. - - :param name: Name of the object. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(NameIdentifier, self).__init__(**kwargs) - self.name = name - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -class ResourceMetricAvailability(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) -> None: - 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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2015_08_01.models.ResourceMetricName - :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.v2015_08_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2015_08_01.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, **kwargs) -> None: - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = metric_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: Resource tags. - :type tags: dict[str, str] - :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.v2015_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2015_08_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.v2015_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2015_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2015_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2015_08_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2015_08_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2015_08_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2015_08_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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.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.host_names_disabled = host_names_disabled - 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.snapshot_info = snapshot_info - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = https_only - self.identity = identity - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2015_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2015_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2015_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2015_08_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' - :type scm_type: str or ~azure.mgmt.web.v2015_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2015_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2015_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2015_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2015_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2015_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2015_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2015_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2015_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2015_08_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2015_08_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2015_08_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: - 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.linux_fx_version = linux_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.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.cors = cors - self.push = push - self.api_definition = api_definition - self.auto_swap_slot_name = auto_swap_slot_name - self.local_my_sql_enabled = local_my_sql_enabled - self.ip_security_restrictions = ip_security_restrictions - self.http20_enabled = http20_enabled - self.min_tls_version = min_tls_version - - -class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - super(SiteMachineKey, self).__init__(**kwargs) - self.validation = validation - self.validation_key = validation_key - self.decryption = decryption - self.decryption_key = decryption_key - - -class SiteSeal(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) -> None: - super(SiteSeal, self).__init__(**kwargs) - self.html = html - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: - super(SiteSealRequest, self).__init__(**kwargs) - self.light_theme = light_theme - self.locale = locale - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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.v2015_08_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.v2015_08_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - self.count = count - self.time_interval = time_interval - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2015_08_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: - super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) - self.snapshot_time = snapshot_time - self.recovery_target = recovery_target - self.overwrite = overwrite - self.recover_configuration = recover_configuration - self.ignore_conflicting_host_names = ignore_conflicting_host_names - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: - super(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = location - self.id = id - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - self.count = count - self.time_interval = time_interval - - -class User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: - super(User, self).__init__(kind=kind, **kwargs) - self.user_name = user_name - 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 - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2015_08_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2015_08_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: - 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 - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2015_08_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'}, - 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - super(VnetRoute, self).__init__(kind=kind, **kwargs) - self.vnet_route_name = vnet_route_name - self.start_address = start_address - self.end_address = end_address - self.route_type = route_type diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_paged_models.py deleted file mode 100644 index b3350494ff6..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AppServiceCertificateOrderPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) -class AppServiceCertificateResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) -class CsmOperationDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmOperationDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_web_site_management_client_enums.py deleted file mode 100644 index facff8cc4f7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class KeyVaultSecretStatus(str, Enum): - - 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 CertificateProductType(str, Enum): - - standard_domain_validated_ssl = "StandardDomainValidatedSsl" - standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class CertificateOrderStatus(str, Enum): - - pendingissuance = "Pendingissuance" - issued = "Issued" - revoked = "Revoked" - canceled = "Canceled" - denied = "Denied" - pendingrevocation = "Pendingrevocation" - pending_rekey = "PendingRekey" - unused = "Unused" - expired = "Expired" - not_submitted = "NotSubmitted" - - -class CertificateOrderActionType(str, Enum): - - 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 RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 ScmType(str, Enum): - - 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" - - -class ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/__init__.py deleted file mode 100644 index 075b7482c6a..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations -from ._certificate_registration_provider_operations import CertificateRegistrationProviderOperations - -__all__ = [ - 'AppServiceCertificateOrdersOperations', - 'CertificateRegistrationProviderOperations', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_app_service_certificate_orders_operations.py deleted file mode 100644 index df4d5fd7567..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_app_service_certificate_orders_operations.py +++ /dev/null @@ -1,1439 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceCertificateOrdersOperations(object): - """AppServiceCertificateOrdersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all certificate orders in a subscription. - - List all certificate orders in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def validate_purchase_information( - self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): - """Validate information for a certificate order. - - Validate information for a certificate order. - - :param app_service_certificate_order: Information for a certificate - order. - :type app_service_certificate_order: - ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.validate_purchase_information.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get certificate orders in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def get( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """Get a certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - - def _create_or_update_initial( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a certificate purchase order. - - 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.v2015_08_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateOrder or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def delete( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """Delete an existing certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate purchase order. - - 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.v2015_08_01.models.AppServiceCertificateOrderPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def list_certificates( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """List all certificates associated with a certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateResource - :rtype: - ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_certificates.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} - - def get_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """Get the certificate associated with a certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - - def _create_or_update_certificate_initial( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a certificate and associates with key vault secret. - - 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.v2015_08_01.models.AppServiceCertificateResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def delete_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """Delete the certificate associated with a certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - """Creates or updates a certificate and associates with key vault secret. - - 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.v2015_08_01.models.AppServiceCertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def reissue( - self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """Reissue an existing certificate order. - - 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.v2015_08_01.models.ReissueCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reissue.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} - - def renew( - self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """Renew an existing certificate order. - - 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.v2015_08_01.models.RenewCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} - - def resend_email( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """Resend certificate email. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.resend_email.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} - - def resend_request_emails( - self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): - """Verify domain ownership for this certificate order. - - 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: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - name_identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.resend_request_emails.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} - - def retrieve_site_seal( - self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): - """Verify domain ownership for this certificate order. - - 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 light_theme: If 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSeal or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2015_08_01.models.SiteSeal or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) - - # Construct URL - url = self.retrieve_site_seal.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSeal', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} - - def verify_domain_ownership( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """Verify domain ownership for this certificate order. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.verify_domain_ownership.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} - - def retrieve_certificate_actions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieve the list of certificate actions. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2015_08_01.models.CertificateOrderAction] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.retrieve_certificate_actions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateOrderAction]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} - - def retrieve_certificate_email_history( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieve email history. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2015_08_01.models.CertificateEmail] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.retrieve_certificate_email_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateEmail]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_certificate_registration_provider_operations.py deleted file mode 100644 index a4d40b237ed..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/operations/_certificate_registration_provider_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CertificateRegistrationProviderOperations(object): - """CertificateRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-08-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """Implements Csm operations Api to exposes the list of available Csm Apis - under the resource provider. - - Implements Csm operations Api to exposes the list of available Csm Apis - under the resource provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2015_08_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2015_08_01.models.CsmOperationDescription] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2015_08_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_web_site_management_client.py deleted file mode 100644 index b514a5c2e71..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/_web_site_management_client.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import WebSiteManagementClientOperationsMixin -from .operations import CertificatesOperations -from .operations import DeletedWebAppsOperations -from .operations import DiagnosticsOperations -from .operations import ProviderOperations -from .operations import RecommendationsOperations -from .operations import ResourceHealthMetadataOperations -from .operations import BillingMetersOperations -from . import models - - -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.web.v2016_03_01.operations.CertificatesOperations - :ivar deleted_web_apps: DeletedWebApps operations - :vartype deleted_web_apps: azure.mgmt.web.v2016_03_01.operations.DeletedWebAppsOperations - :ivar diagnostics: Diagnostics operations - :vartype diagnostics: azure.mgmt.web.v2016_03_01.operations.DiagnosticsOperations - :ivar provider: Provider operations - :vartype provider: azure.mgmt.web.v2016_03_01.operations.ProviderOperations - :ivar recommendations: Recommendations operations - :vartype recommendations: azure.mgmt.web.v2016_03_01.operations.RecommendationsOperations - :ivar resource_health_metadata: ResourceHealthMetadata operations - :vartype resource_health_metadata: azure.mgmt.web.v2016_03_01.operations.ResourceHealthMetadataOperations - :ivar billing_meters: BillingMeters operations - :vartype billing_meters: azure.mgmt.web.v2016_03_01.operations.BillingMetersOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2016-03-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - 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.provider = ProviderOperations( - self._client, self.config, self._serialize, self._deserialize) - self.recommendations = RecommendationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resource_health_metadata = ResourceHealthMetadataOperations( - self._client, self.config, self._serialize, self._deserialize) - self.billing_meters = BillingMetersOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/__init__.py deleted file mode 100644 index 9ba7d02fc42..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/__init__.py +++ /dev/null @@ -1,469 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AbnormalTimePeriod - from ._models_py3 import AnalysisData - from ._models_py3 import AnalysisDefinition - from ._models_py3 import ApiDefinitionInfo - from ._models_py3 import ApplicationStack - from ._models_py3 import AppServiceEnvironment - from ._models_py3 import AppServicePlan - from ._models_py3 import AppServicePlanCollection - from ._models_py3 import AutoHealActions - from ._models_py3 import AutoHealCustomAction - from ._models_py3 import AutoHealRules - from ._models_py3 import AutoHealTriggers - from ._models_py3 import BillingMeter - from ._models_py3 import Capability - from ._models_py3 import Certificate - from ._models_py3 import CertificatePatchResource - from ._models_py3 import CloningInfo - from ._models_py3 import ConnStringInfo - from ._models_py3 import CorsSettings - from ._models_py3 import CsmMoveResourceEnvelope - from ._models_py3 import CsmOperationDescription - from ._models_py3 import CsmOperationDescriptionProperties - from ._models_py3 import CsmOperationDisplay - from ._models_py3 import CsmUsageQuota - from ._models_py3 import CsmUsageQuotaCollection - from ._models_py3 import DataSource - from ._models_py3 import DataTableResponseColumn - from ._models_py3 import DataTableResponseObject - from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException - from ._models_py3 import DefaultErrorResponseError - from ._models_py3 import DefaultErrorResponseErrorDetailsItem - from ._models_py3 import DeletedSite - 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 DiagnosticAnalysis - from ._models_py3 import DiagnosticCategory - from ._models_py3 import DiagnosticData - from ._models_py3 import DiagnosticDetectorResponse - from ._models_py3 import DiagnosticMetricSample - from ._models_py3 import DiagnosticMetricSet - from ._models_py3 import Dimension - from ._models_py3 import ErrorEntity - from ._models_py3 import Experiments - from ._models_py3 import GeoRegion - from ._models_py3 import GlobalCsmSkuDescription - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentDeploymentInfo - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostNameSslState - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import Identifier - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import LocalizableString - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import MetricAvailability - from ._models_py3 import MetricSpecification - from ._models_py3 import NameIdentifier - from ._models_py3 import NameValuePair - from ._models_py3 import NetworkAccessControlEntry - from ._models_py3 import Operation - from ._models_py3 import PremierAddOnOffer - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import Recommendation - from ._models_py3 import RecommendationRule - from ._models_py3 import Rendering - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceHealthMetadata - from ._models_py3 import ResourceMetric - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricCollection - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceMetricDefinitionCollection - from ._models_py3 import ResourceMetricName - from ._models_py3 import ResourceMetricProperty - from ._models_py3 import ResourceMetricValue - from ._models_py3 import ResourceNameAvailability - from ._models_py3 import ResourceNameAvailabilityRequest - from ._models_py3 import ResponseMetaData - from ._models_py3 import ServiceSpecification - from ._models_py3 import Site - from ._models_py3 import SiteConfig - from ._models_py3 import SiteLimits - from ._models_py3 import SiteMachineKey - from ._models_py3 import SkuCapacity - from ._models_py3 import SkuDescription - from ._models_py3 import SkuInfos - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import SnapshotRecoveryRequest - from ._models_py3 import SnapshotRecoveryTarget - from ._models_py3 import Solution - from ._models_py3 import SourceControl - from ._models_py3 import StackMajorVersion - from ._models_py3 import StackMinorVersion - from ._models_py3 import StampCapacity - from ._models_py3 import StatusCodesBasedTrigger - 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 WorkerPool -except (SyntaxError, ImportError): - from ._models import AbnormalTimePeriod - from ._models import AnalysisData - from ._models import AnalysisDefinition - from ._models import ApiDefinitionInfo - from ._models import ApplicationStack - from ._models import AppServiceEnvironment - from ._models import AppServicePlan - from ._models import AppServicePlanCollection - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import BillingMeter - from ._models import Capability - from ._models import Certificate - from ._models import CertificatePatchResource - from ._models import CloningInfo - from ._models import ConnStringInfo - from ._models import CorsSettings - from ._models import CsmMoveResourceEnvelope - from ._models import CsmOperationDescription - from ._models import CsmOperationDescriptionProperties - from ._models import CsmOperationDisplay - from ._models import CsmUsageQuota - from ._models import CsmUsageQuotaCollection - from ._models import DataSource - from ._models import DataTableResponseColumn - from ._models import DataTableResponseObject - from ._models import DefaultErrorResponse, DefaultErrorResponseException - from ._models import DefaultErrorResponseError - from ._models import DefaultErrorResponseErrorDetailsItem - from ._models import DeletedSite - from ._models import DeploymentLocations - from ._models import DetectorAbnormalTimePeriod - from ._models import DetectorDefinition - from ._models import DetectorInfo - from ._models import DetectorResponse - from ._models import DiagnosticAnalysis - from ._models import DiagnosticCategory - from ._models import DiagnosticData - from ._models import DiagnosticDetectorResponse - from ._models import DiagnosticMetricSample - from ._models import DiagnosticMetricSet - from ._models import Dimension - from ._models import ErrorEntity - from ._models import Experiments - from ._models import GeoRegion - from ._models import GlobalCsmSkuDescription - from ._models import HandlerMapping - from ._models import HostingEnvironmentDeploymentInfo - from ._models import HostingEnvironmentProfile - from ._models import HostNameSslState - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import Identifier - from ._models import IpSecurityRestriction - from ._models import LocalizableString - from ._models import ManagedServiceIdentity - from ._models import MetricAvailability - from ._models import MetricSpecification - from ._models import NameIdentifier - from ._models import NameValuePair - from ._models import NetworkAccessControlEntry - from ._models import Operation - from ._models import PremierAddOnOffer - from ._models import ProxyOnlyResource - from ._models import PushSettings - from ._models import RampUpRule - from ._models import Recommendation - from ._models import RecommendationRule - from ._models import Rendering - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceHealthMetadata - from ._models import ResourceMetric - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricCollection - from ._models import ResourceMetricDefinition - from ._models import ResourceMetricDefinitionCollection - from ._models import ResourceMetricName - from ._models import ResourceMetricProperty - from ._models import ResourceMetricValue - from ._models import ResourceNameAvailability - from ._models import ResourceNameAvailabilityRequest - from ._models import ResponseMetaData - from ._models import ServiceSpecification - from ._models import Site - from ._models import SiteConfig - from ._models import SiteLimits - from ._models import SiteMachineKey - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SkuInfos - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import SnapshotRecoveryRequest - from ._models import SnapshotRecoveryTarget - from ._models import Solution - from ._models import SourceControl - from ._models import StackMajorVersion - from ._models import StackMinorVersion - from ._models import StampCapacity - from ._models import StatusCodesBasedTrigger - from ._models import User - from ._models import ValidateRequest - from ._models import ValidateResponse - from ._models import ValidateResponseError - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VirtualIPMapping - from ._models import VirtualNetworkProfile - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetParameters - from ._models import VnetRoute - from ._models import VnetValidationFailureDetails - from ._models import VnetValidationTestFailure - from ._models import WebAppCollection - from ._models import WorkerPool -from ._paged_models import AnalysisDefinitionPaged -from ._paged_models import ApplicationStackPaged -from ._paged_models import BillingMeterPaged -from ._paged_models import CertificatePaged -from ._paged_models import CsmOperationDescriptionPaged -from ._paged_models import DeletedSitePaged -from ._paged_models import DetectorDefinitionPaged -from ._paged_models import DetectorResponsePaged -from ._paged_models import DiagnosticCategoryPaged -from ._paged_models import GeoRegionPaged -from ._paged_models import IdentifierPaged -from ._paged_models import PremierAddOnOfferPaged -from ._paged_models import RecommendationPaged -from ._paged_models import ResourceHealthMetadataPaged -from ._paged_models import SourceControlPaged -from ._web_site_management_client_enums import ( - KeyVaultSecretStatus, - RouteType, - ManagedServiceIdentityType, - AutoHealActionType, - ConnectionStringType, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - StatusOptions, - ProvisioningState, - HostingEnvironmentStatus, - InternalLoadBalancingMode, - ComputeModeOptions, - WorkerSizeOptions, - AccessControlEntryAction, - OperationStatus, - IssueType, - SolutionType, - RenderingType, - ResourceScopeType, - NotificationLevel, - Channels, - AppServicePlanRestrictions, - InAvailabilityReasonType, - CheckNameResourceTypes, - ValidateResourceTypes, - SkuName, -) - -__all__ = [ - 'AbnormalTimePeriod', - 'AnalysisData', - 'AnalysisDefinition', - 'ApiDefinitionInfo', - 'ApplicationStack', - 'AppServiceEnvironment', - 'AppServicePlan', - 'AppServicePlanCollection', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'BillingMeter', - 'Capability', - 'Certificate', - 'CertificatePatchResource', - 'CloningInfo', - 'ConnStringInfo', - 'CorsSettings', - 'CsmMoveResourceEnvelope', - 'CsmOperationDescription', - 'CsmOperationDescriptionProperties', - 'CsmOperationDisplay', - 'CsmUsageQuota', - 'CsmUsageQuotaCollection', - 'DataSource', - 'DataTableResponseColumn', - 'DataTableResponseObject', - 'DefaultErrorResponse', 'DefaultErrorResponseException', - 'DefaultErrorResponseError', - 'DefaultErrorResponseErrorDetailsItem', - 'DeletedSite', - 'DeploymentLocations', - 'DetectorAbnormalTimePeriod', - 'DetectorDefinition', - 'DetectorInfo', - 'DetectorResponse', - 'DiagnosticAnalysis', - 'DiagnosticCategory', - 'DiagnosticData', - 'DiagnosticDetectorResponse', - 'DiagnosticMetricSample', - 'DiagnosticMetricSet', - 'Dimension', - 'ErrorEntity', - 'Experiments', - 'GeoRegion', - 'GlobalCsmSkuDescription', - 'HandlerMapping', - 'HostingEnvironmentDeploymentInfo', - 'HostingEnvironmentProfile', - 'HostNameSslState', - 'HybridConnection', - 'HybridConnectionKey', - 'Identifier', - 'IpSecurityRestriction', - 'LocalizableString', - 'ManagedServiceIdentity', - 'MetricAvailability', - 'MetricSpecification', - 'NameIdentifier', - 'NameValuePair', - 'NetworkAccessControlEntry', - 'Operation', - 'PremierAddOnOffer', - 'ProxyOnlyResource', - 'PushSettings', - 'RampUpRule', - 'Recommendation', - 'RecommendationRule', - 'Rendering', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceHealthMetadata', - 'ResourceMetric', - 'ResourceMetricAvailability', - 'ResourceMetricCollection', - 'ResourceMetricDefinition', - 'ResourceMetricDefinitionCollection', - 'ResourceMetricName', - 'ResourceMetricProperty', - 'ResourceMetricValue', - 'ResourceNameAvailability', - 'ResourceNameAvailabilityRequest', - 'ResponseMetaData', - 'ServiceSpecification', - 'Site', - 'SiteConfig', - 'SiteLimits', - 'SiteMachineKey', - 'SkuCapacity', - 'SkuDescription', - 'SkuInfos', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'SnapshotRecoveryRequest', - 'SnapshotRecoveryTarget', - 'Solution', - 'SourceControl', - 'StackMajorVersion', - 'StackMinorVersion', - 'StampCapacity', - 'StatusCodesBasedTrigger', - 'User', - 'ValidateRequest', - 'ValidateResponse', - 'ValidateResponseError', - 'VirtualApplication', - 'VirtualDirectory', - 'VirtualIPMapping', - 'VirtualNetworkProfile', - 'VnetGateway', - 'VnetInfo', - 'VnetParameters', - 'VnetRoute', - 'VnetValidationFailureDetails', - 'VnetValidationTestFailure', - 'WebAppCollection', - 'WorkerPool', - 'CertificatePaged', - 'DeletedSitePaged', - 'DetectorResponsePaged', - 'DiagnosticCategoryPaged', - 'AnalysisDefinitionPaged', - 'DetectorDefinitionPaged', - 'ApplicationStackPaged', - 'CsmOperationDescriptionPaged', - 'RecommendationPaged', - 'ResourceHealthMetadataPaged', - 'SourceControlPaged', - 'GeoRegionPaged', - 'IdentifierPaged', - 'PremierAddOnOfferPaged', - 'BillingMeterPaged', - 'KeyVaultSecretStatus', - 'RouteType', - 'ManagedServiceIdentityType', - 'AutoHealActionType', - 'ConnectionStringType', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'StatusOptions', - 'ProvisioningState', - 'HostingEnvironmentStatus', - 'InternalLoadBalancingMode', - 'ComputeModeOptions', - 'WorkerSizeOptions', - 'AccessControlEntryAction', - 'OperationStatus', - 'IssueType', - 'SolutionType', - 'RenderingType', - 'ResourceScopeType', - 'NotificationLevel', - 'Channels', - 'AppServicePlanRestrictions', - 'InAvailabilityReasonType', - 'CheckNameResourceTypes', - 'ValidateResourceTypes', - 'SkuName', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models.py deleted file mode 100644 index a73b194762c..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models.py +++ /dev/null @@ -1,5418 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2016_03_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2016_03_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 AnalysisData(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.v2016_03_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2016_03_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2016_03_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 ProxyOnlyResource(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 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(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 ApplicationStack(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.v2016_03_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2016_03_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]'}, - } - - 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) - - -class AppServiceEnvironment(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2016_03_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.v2016_03_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2016_03_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2016_03_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2016_03_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2016_03_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2016_03_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2016_03_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2016_03_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) - self.cluster_settings = kwargs.get('cluster_settings', None) - self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) - - -class Resource(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: 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.get('location', None) - self.type = None - self.tags = kwargs.get('tags', None) - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2016_03_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2016_03_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2016_03_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2016_03_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, self).__init__(**kwargs) - self.app_service_plan_name = kwargs.get('app_service_plan_name', None) - self.worker_tier_name = kwargs.get('worker_tier_name', None) - self.status = None - self.subscription = None - self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None - self.is_spot = kwargs.get('is_spot', None) - self.spot_expiration_time = kwargs.get('spot_expiration_time', None) - self.resource_group = None - self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', None) - - -class AppServicePlanCollection(Model): - """Collection of App Service plans. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. Collection of resources. - :type value: list[~azure.mgmt.web.v2016_03_01.models.AppServicePlan] - :param next_link: Link to next page of resources. - :type next_link: str - """ - - _validation = { - 'value': {'required': 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.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class AutoHealActions(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.v2016_03_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2016_03_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': 'AutoHealActionType'}, - '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(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(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.v2016_03_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2016_03_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2016_03_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.v2016_03_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2016_03_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', 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 resource type meter used for - :type resource_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'}, - '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'}, - } - - 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) - - -class Capability(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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2016_03_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.v2016_03_01.models.KeyVaultSecretStatus - :ivar geo_region: Region of the certificate. - :vartype geo_region: str - :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 - """ - - _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}, - 'password': {'required': 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}, - 'geo_region': {'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': 'KeyVaultSecretStatus'}, - 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, - 'server_farm_id': {'key': 'properties.serverFarmId', '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.geo_region = None - self.server_farm_id = kwargs.get('server_farm_id', None) - - -class CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2016_03_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.v2016_03_01.models.KeyVaultSecretStatus - :ivar geo_region: Region of the certificate. - :vartype geo_region: str - :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 - """ - - _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}, - 'password': {'required': 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}, - 'geo_region': {'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': 'KeyVaultSecretStatus'}, - 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, - 'server_farm_id': {'key': 'properties.serverFarmId', '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.geo_region = None - self.server_farm_id = kwargs.get('server_farm_id', None) - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - 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.get('source_web_app_id', 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) - self.ignore_quotas = kwargs.get('ignore_quotas', None) - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2016_03_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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 CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = kwargs.get('allowed_origins', None) - - -class CsmMoveResourceEnvelope(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 CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2016_03_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2016_03_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(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2016_03_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(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 CsmUsageQuota(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 - :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.v2016_03_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(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.v2016_03_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.get('value', None) - self.next_link = None - - -class DataSource(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.v2016_03_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(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(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.v2016_03_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(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.v2016_03_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 DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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.v2016_03_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(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 DeletedSite(Model): - """A deleted app. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Numeric id for the deleted site - :type 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 name: Name of the deleted site - :vartype name: str - :ivar slot: Slot of the deleted site - :vartype slot: str - """ - - _validation = { - 'deleted_timestamp': {'readonly': True}, - 'subscription': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'name': {'readonly': True}, - 'slot': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, - 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, - 'subscription': {'key': 'subscription', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'slot': {'key': 'slot', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeletedSite, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.deleted_timestamp = None - self.subscription = None - self.resource_group = None - self.name = None - self.slot = None - - -class DeploymentLocations(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.v2016_03_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2016_03_01.models.AppServiceEnvironment] - :param hosting_environment_deployment_infos: Available App Service - Environments with basic information. - :type hosting_environment_deployment_infos: - list[~azure.mgmt.web.v2016_03_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(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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.v2016_03_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.v2016_03_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2016_03_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': 'IssueType'}, - '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(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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.v2016_03_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2016_03_01.models.DiagnosticData] - """ - - _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]'}, - } - - def __init__(self, **kwargs): - super(DetectorResponse, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.dataset = kwargs.get('dataset', 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 - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2016_03_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2016_03_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.v2016_03_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 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 DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2016_03_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2016_03_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 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 - :param end_time: End time of the period - :type end_time: 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.v2016_03_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2016_03_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2016_03_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2016_03_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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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(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 - :param end_time: End time of the period - :type end_time: 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.v2016_03_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(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 ErrorEntity(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.v2016_03_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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2016_03_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 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 geo_region_name: Region name. - :vartype geo_region_name: str - :ivar description: Region description. - :vartype description: str - :ivar display_name: Display name for region. - :vartype display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'geo_region_name': {'readonly': True}, - 'description': {'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'}, - 'geo_region_name': {'key': 'properties.name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoRegion, self).__init__(**kwargs) - self.geo_region_name = None - self.description = None - self.display_name = None - - -class GlobalCsmSkuDescription(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.v2016_03_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.v2016_03_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 HandlerMapping(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(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 HostingEnvironmentProfile(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 HostNameSslState(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.v2016_03_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 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.v2016_03_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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 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 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 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identifier, self).__init__(**kwargs) - self.identifier_id = kwargs.get('identifier_id', None) - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', '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) - - -class LocalizableString(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 ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2016_03_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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.tenant_id = None - self.principal_id = None - - -class MetricAvailability(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(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.v2016_03_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2016_03_01.models.MetricAvailability] - """ - - _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]'}, - } - - 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) - - -class NameIdentifier(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 NameValuePair(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 NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2016_03_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = kwargs.get('action', None) - self.description = kwargs.get('description', None) - self.order = kwargs.get('order', None) - self.remote_subnet = kwargs.get('remote_subnet', None) - - -class Operation(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.v2016_03_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2016_03_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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 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 premier_add_on_offer_name: Premier add on offer Name. - :type premier_add_on_offer_name: str - :param promo_code_required: true if promotion code is - required; otherwise, 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.v2016_03_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'}, - 'premier_add_on_offer_name': {'key': 'properties.name', 'type': 'str'}, - 'promo_code_required': {'key': 'properties.promoCodeRequired', 'type': 'bool'}, - 'quota': {'key': 'properties.quota', 'type': 'int'}, - 'web_hosting_plan_restrictions': {'key': 'properties.webHostingPlanRestrictions', 'type': 'AppServicePlanRestrictions'}, - '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.premier_add_on_offer_name = kwargs.get('premier_add_on_offer_name', 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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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 - :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.v2016_03_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.v2016_03_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.v2016_03_01.models.Channels - :param tags: The list of category tags that this recommendation belongs - to. - :type tags: list[str] - :param action_name: Name of action recommended by this object. - :type action_name: str - :param start_time: The beginning time in UTC of a range that the - recommendation refers to. - :type start_time: datetime - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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}, - } - - _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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, - 'action_name': {'key': 'properties.actionName', '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.tags = kwargs.get('tags', None) - self.action_name = kwargs.get('action_name', 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 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_rule_name: Unique name of the rule. - :type recommendation_rule_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.v2016_03_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.v2016_03_01.models.Channels - :param tags: An array of category tags that the rule contains. - :type 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}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recommendation_rule_name': {'key': 'properties.name', '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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - 'tags': {'key': 'properties.tags', '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_rule_name = kwargs.get('recommendation_rule_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.tags = kwargs.get('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 Rendering(Model): - """Instructions for rendering the data. - - :param rendering_type: Rendering Type. Possible values include: 'NoGraph', - 'Table', 'TimeSeries', 'TimeSeriesPerInstance' - :type rendering_type: str or - ~azure.mgmt.web.v2016_03_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 = { - 'rendering_type': {'key': 'renderingType', 'type': 'RenderingType'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Rendering, self).__init__(**kwargs) - self.rendering_type = kwargs.get('rendering_type', None) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - - -class RequestsBasedTrigger(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 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 ResourceMetric(Model): - """Object representing a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of metric. - :vartype name: ~azure.mgmt.web.v2016_03_01.models.ResourceMetricName - :ivar unit: Metric unit. - :vartype unit: str - :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D - :vartype time_grain: str - :ivar start_time: Metric start time. - :vartype start_time: datetime - :ivar end_time: Metric end time. - :vartype end_time: datetime - :ivar resource_id: Metric resource Id. - :vartype resource_id: str - :ivar id: Resource Id. - :vartype id: str - :ivar metric_values: Metric values. - :vartype metric_values: - list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricValue] - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricProperty] - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'id': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'ResourceMetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs): - super(ResourceMetric, self).__init__(**kwargs) - self.name = None - self.unit = None - self.time_grain = None - self.start_time = None - self.end_time = None - self.resource_id = None - self.id = None - self.metric_values = None - self.properties = None - - -class ResourceMetricAvailability(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 ResourceMetricCollection(Model): - """Collection of metric 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.v2016_03_01.models.ResourceMetric] - :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': '[ResourceMetric]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = 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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2016_03_01.models.ResourceMetricName - :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.v2016_03_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricDefinition, self).__init__(**kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricDefinitionCollection(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.v2016_03_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.get('value', None) - self.next_link = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ResourceMetricProperty(Model): - """Resource metric property. - - :param key: Key for resource metric property. - :type key: str - :param value: Value of pair. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricProperty, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ResourceMetricValue(Model): - """Value of resource metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Value timestamp. - :vartype timestamp: str - :ivar average: Value average. - :vartype average: float - :ivar minimum: Value minimum. - :vartype minimum: float - :ivar maximum: Value maximum. - :vartype maximum: float - :ivar total: Value total. - :vartype total: float - :ivar count: Value count. - :vartype count: float - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricProperty] - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'average': {'readonly': True}, - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'total': {'readonly': True}, - 'count': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'average': {'key': 'average', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricValue, self).__init__(**kwargs) - self.timestamp = None - self.average = None - self.minimum = None - self.maximum = None - self.total = None - self.count = None - self.properties = None - - -class ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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.v2016_03_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(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.v2016_03_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.get('name', None) - self.type = kwargs.get('type', None) - self.is_fqdn = kwargs.get('is_fqdn', None) - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2016_03_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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2016_03_01.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, **kwargs): - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_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: Resource tags. - :type tags: dict[str, str] - :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.v2016_03_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2016_03_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.v2016_03_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2016_03_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2016_03_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2016_03_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2016_03_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2016_03_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2016_03_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = kwargs.get('https_only', None) - self.identity = kwargs.get('identity', None) - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2016_03_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2016_03_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2016_03_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2016_03_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' - :type scm_type: str or ~azure.mgmt.web.v2016_03_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2016_03_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2016_03_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2016_03_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2016_03_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2016_03_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2016_03_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2016_03_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2016_03_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2016_03_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2016_03_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2016_03_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) - self.http20_enabled = kwargs.get('http20_enabled', True) - self.min_tls_version = kwargs.get('min_tls_version', None) - - -class SiteLimits(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 SiteMachineKey(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 SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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.v2016_03_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.v2016_03_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 SkuInfos(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.v2016_03_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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', None) - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2016_03_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SnapshotRecoveryRequest, self).__init__(**kwargs) - self.snapshot_time = kwargs.get('snapshot_time', None) - self.recovery_target = kwargs.get('recovery_target', 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) - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.id = kwargs.get('id', None) - - -class Solution(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.v2016_03_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2016_03_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': 'SolutionType'}, - '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 source_control_name: Name or source control type. - :type source_control_name: 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 - """ - - _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'}, - 'source_control_name': {'key': 'properties.name', '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.source_control_name = kwargs.get('source_control_name', None) - 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 StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2016_03_01.models.StackMinorVersion] - """ - - _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]'}, - } - - 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) - - -class StackMinorVersion(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - """ - - _attribute_map = { - 'display_version': {'key': 'displayVersion', 'type': 'str'}, - 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, - 'is_default': {'key': 'isDefault', '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) - - -class StampCapacity(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.v2016_03_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' - :type worker_size: str or - ~azure.mgmt.web.v2016_03_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 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: true if capacity - is applicable for all apps; otherwise, false. - :type is_applicable_for_all_compute_modes: bool - :param site_mode: Shared or Dedicated. - :type site_mode: str - """ - - _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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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'}, - } - - 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) - - -class StatusCodesBasedTrigger(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 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.user_name = kwargs.get('user_name', None) - 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) - - -class ValidateRequest(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' - :type type: str or - ~azure.mgmt.web.v2016_03_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ValidateRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.location = kwargs.get('location', None) - 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) - - -class ValidateResponse(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.v2016_03_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(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(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2016_03_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(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(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 - """ - - _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'}, - } - - 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) - - -class VirtualNetworkProfile(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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.get('id', None) - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2016_03_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - 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) - - -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 - """ - - _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'}, - } - - 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) - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2016_03_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'}, - 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) - 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 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.v2016_03_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'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, **kwargs): - super(VnetValidationFailureDetails, self).__init__(**kwargs) - self.failed = kwargs.get('failed', None) - self.failed_tests = kwargs.get('failed_tests', 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(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.v2016_03_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.get('value', None) - self.next_link = None - - -class WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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.v2016_03_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(WorkerPool, self).__init__(**kwargs) - 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models_py3.py deleted file mode 100644 index 8080cffded3..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_models_py3.py +++ /dev/null @@ -1,5418 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2016_03_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2016_03_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: - super(AbnormalTimePeriod, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.events = events - self.solutions = solutions - - -class AnalysisData(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.v2016_03_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2016_03_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2016_03_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: - 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 ProxyOnlyResource(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: str=None, **kwargs) -> None: - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.type = 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, *, kind: str=None, **kwargs) -> None: - super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) - self.description = None - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class ApplicationStack(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.v2016_03_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2016_03_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]'}, - } - - def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: - super(ApplicationStack, self).__init__(**kwargs) - self.name = name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - - -class AppServiceEnvironment(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2016_03_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.v2016_03_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2016_03_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2016_03_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2016_03_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2016_03_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2016_03_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2016_03_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2016_03_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - } - - def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - - -class Resource(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: 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: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.location = location - self.type = None - self.tags = tags - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2016_03_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2016_03_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2016_03_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2016_03_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_plan_name = app_service_plan_name - self.worker_tier_name = worker_tier_name - self.status = None - self.subscription = None - self.admin_site_name = admin_site_name - 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.number_of_sites = None - self.is_spot = is_spot - self.spot_expiration_time = spot_expiration_time - self.resource_group = None - self.reserved = reserved - self.target_worker_count = target_worker_count - self.target_worker_size_id = target_worker_size_id - self.provisioning_state = None - self.sku = sku - - -class AppServicePlanCollection(Model): - """Collection of App Service plans. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. Collection of resources. - :type value: list[~azure.mgmt.web.v2016_03_01.models.AppServicePlan] - :param next_link: Link to next page of resources. - :type next_link: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[AppServicePlan]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value, next_link: str=None, **kwargs) -> None: - super(AppServicePlanCollection, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class AutoHealActions(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.v2016_03_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2016_03_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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.v2016_03_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2016_03_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2016_03_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.v2016_03_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2016_03_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -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 resource type meter used for - :type resource_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'}, - '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'}, - } - - def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, **kwargs) -> None: - 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 - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - 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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2016_03_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.v2016_03_01.models.KeyVaultSecretStatus - :ivar geo_region: Region of the certificate. - :vartype geo_region: str - :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 - """ - - _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}, - 'password': {'required': 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}, - 'geo_region': {'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': 'KeyVaultSecretStatus'}, - 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - } - - def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: - 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.geo_region = None - self.server_farm_id = server_farm_id - - -class CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2016_03_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.v2016_03_01.models.KeyVaultSecretStatus - :ivar geo_region: Region of the certificate. - :vartype geo_region: str - :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 - """ - - _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}, - 'password': {'required': 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}, - 'geo_region': {'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': 'KeyVaultSecretStatus'}, - 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - } - - def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: - 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.geo_region = None - self.server_farm_id = server_farm_id - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: - 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.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 - self.ignore_quotas = ignore_quotas - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2016_03_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, *, allowed_origins=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - - -class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: - super(CsmMoveResourceEnvelope, self).__init__(**kwargs) - self.target_resource_group = target_resource_group - self.resources = resources - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2016_03_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2016_03_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(CsmOperationDescription, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class CsmOperationDescriptionProperties(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2016_03_01.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(CsmOperationDescriptionProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(CsmOperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class CsmUsageQuota(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 - :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.v2016_03_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - 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(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.v2016_03_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, **kwargs) -> None: - super(CsmUsageQuotaCollection, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class DataSource(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.v2016_03_01.models.NameValuePair] - """ - - _attribute_map = { - 'instructions': {'key': 'instructions', 'type': '[str]'}, - 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, - } - - def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: - super(DataSource, self).__init__(**kwargs) - self.instructions = instructions - self.data_source_uri = data_source_uri - - -class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: - super(DataTableResponseColumn, self).__init__(**kwargs) - self.column_name = column_name - self.data_type = data_type - self.column_type = column_type - - -class DataTableResponseObject(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.v2016_03_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: str=None, columns=None, rows=None, **kwargs) -> None: - super(DataTableResponseObject, self).__init__(**kwargs) - self.table_name = table_name - self.columns = columns - self.rows = rows - - -class DefaultErrorResponse(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.v2016_03_01.models.DefaultErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, - } - - def __init__(self, **kwargs) -> None: - super(DefaultErrorResponse, self).__init__(**kwargs) - self.error = None - - -class DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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.v2016_03_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=None, **kwargs) -> None: - super(DefaultErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = details - self.innererror = None - - -class DefaultErrorResponseErrorDetailsItem(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) -> None: - super(DefaultErrorResponseErrorDetailsItem, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - - -class DeletedSite(Model): - """A deleted app. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Numeric id for the deleted site - :type 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 name: Name of the deleted site - :vartype name: str - :ivar slot: Slot of the deleted site - :vartype slot: str - """ - - _validation = { - 'deleted_timestamp': {'readonly': True}, - 'subscription': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'name': {'readonly': True}, - 'slot': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, - 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, - 'subscription': {'key': 'subscription', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'slot': {'key': 'slot', 'type': 'str'}, - } - - def __init__(self, *, id: int=None, **kwargs) -> None: - super(DeletedSite, self).__init__(**kwargs) - self.id = id - self.deleted_timestamp = None - self.subscription = None - self.resource_group = None - self.name = None - self.slot = None - - -class DeploymentLocations(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.v2016_03_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2016_03_01.models.AppServiceEnvironment] - :param hosting_environment_deployment_infos: Available App Service - Environments with basic information. - :type hosting_environment_deployment_infos: - list[~azure.mgmt.web.v2016_03_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: - super(DeploymentLocations, self).__init__(**kwargs) - self.locations = locations - self.hosting_environments = hosting_environments - self.hosting_environment_deployment_infos = hosting_environment_deployment_infos - - -class DetectorAbnormalTimePeriod(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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.v2016_03_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.v2016_03_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2016_03_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': 'IssueType'}, - 'solutions': {'key': 'solutions', 'type': '[Solution]'}, - } - - def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(DetectorDefinition, self).__init__(kind=kind, **kwargs) - self.display_name = None - self.description = None - self.rank = None - self.is_enabled = None - - -class DetectorInfo(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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.v2016_03_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2016_03_01.models.DiagnosticData] - """ - - _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]'}, - } - - def __init__(self, *, kind: str=None, metadata=None, dataset=None, **kwargs) -> None: - super(DetectorResponse, self).__init__(kind=kind, **kwargs) - self.metadata = metadata - self.dataset = dataset - - -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 - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2016_03_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2016_03_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.v2016_03_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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) - self.description = None - - -class DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2016_03_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2016_03_01.models.Rendering - """ - - _attribute_map = { - 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, - 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, - } - - def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: - super(DiagnosticData, self).__init__(**kwargs) - self.table = table - self.rendering_properties = rendering_properties - - -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 - :param end_time: End time of the period - :type end_time: 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.v2016_03_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2016_03_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2016_03_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2016_03_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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: - 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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: - 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(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 - :param end_time: End time of the period - :type end_time: 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.v2016_03_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - 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 ErrorEntity(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.v2016_03_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: - 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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2016_03_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -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 geo_region_name: Region name. - :vartype geo_region_name: str - :ivar description: Region description. - :vartype description: str - :ivar display_name: Display name for region. - :vartype display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'geo_region_name': {'readonly': True}, - 'description': {'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'}, - 'geo_region_name': {'key': 'properties.name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(GeoRegion, self).__init__(kind=kind, **kwargs) - self.geo_region_name = None - self.description = None - self.display_name = None - - -class GlobalCsmSkuDescription(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.v2016_03_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.v2016_03_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: - super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) - self.name = name - self.location = location - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostNameSslState(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.v2016_03_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 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.v2016_03_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) - self.send_key_name = None - self.send_key_value = 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.identifier_id = identifier_id - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: - super(IpSecurityRestriction, self).__init__(**kwargs) - self.ip_address = ip_address - self.subnet_mask = subnet_mask - - -class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: - super(LocalizableString, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2016_03_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 - """ - - _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'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - - -class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricSpecification(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.v2016_03_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2016_03_01.models.MetricAvailability] - """ - - _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]'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, **kwargs) -> None: - 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 - - -class NameIdentifier(Model): - """Identifies an object. - - :param name: Name of the object. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(NameIdentifier, self).__init__(**kwargs) - self.name = name - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2016_03_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = action - self.description = description - self.order = order - self.remote_subnet = remote_subnet - - -class Operation(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.v2016_03_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2016_03_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: - 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 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 premier_add_on_offer_name: Premier add on offer Name. - :type premier_add_on_offer_name: str - :param promo_code_required: true if promotion code is - required; otherwise, 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.v2016_03_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'}, - 'premier_add_on_offer_name': {'key': 'properties.name', 'type': 'str'}, - 'promo_code_required': {'key': 'properties.promoCodeRequired', 'type': 'bool'}, - 'quota': {'key': 'properties.quota', 'type': 'int'}, - 'web_hosting_plan_restrictions': {'key': 'properties.webHostingPlanRestrictions', 'type': 'AppServicePlanRestrictions'}, - '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: str=None, sku: str=None, product: str=None, vendor: str=None, premier_add_on_offer_name: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - super(PremierAddOnOffer, self).__init__(kind=kind, **kwargs) - self.sku = sku - self.product = product - self.vendor = vendor - self.premier_add_on_offer_name = premier_add_on_offer_name - 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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 - :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.v2016_03_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.v2016_03_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.v2016_03_01.models.Channels - :param tags: The list of category tags that this recommendation belongs - to. - :type tags: list[str] - :param action_name: Name of action recommended by this object. - :type action_name: str - :param start_time: The beginning time in UTC of a range that the - recommendation refers to. - :type start_time: datetime - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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}, - } - - _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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, - 'action_name': {'key': 'properties.actionName', '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, tags=None, action_name: str=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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.tags = tags - self.action_name = action_name - 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 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_rule_name: Unique name of the rule. - :type recommendation_rule_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.v2016_03_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.v2016_03_01.models.Channels - :param tags: An array of category tags that the rule contains. - :type 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}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recommendation_rule_name': {'key': 'properties.name', '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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - 'tags': {'key': 'properties.tags', '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: str=None, recommendation_rule_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, tags=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - super(RecommendationRule, self).__init__(kind=kind, **kwargs) - self.recommendation_rule_name = recommendation_rule_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.tags = tags - self.is_dynamic = is_dynamic - self.extension_name = extension_name - self.blade_name = blade_name - self.forward_link = forward_link - - -class Rendering(Model): - """Instructions for rendering the data. - - :param rendering_type: Rendering Type. Possible values include: 'NoGraph', - 'Table', 'TimeSeries', 'TimeSeriesPerInstance' - :type rendering_type: str or - ~azure.mgmt.web.v2016_03_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 = { - 'rendering_type': {'key': 'renderingType', 'type': 'RenderingType'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, rendering_type=None, title: str=None, description: str=None, **kwargs) -> None: - super(Rendering, self).__init__(**kwargs) - self.rendering_type = rendering_type - self.title = title - self.description = description - - -class RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: - super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) - self.category = category - self.signal_availability = signal_availability - - -class ResourceMetric(Model): - """Object representing a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of metric. - :vartype name: ~azure.mgmt.web.v2016_03_01.models.ResourceMetricName - :ivar unit: Metric unit. - :vartype unit: str - :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D - :vartype time_grain: str - :ivar start_time: Metric start time. - :vartype start_time: datetime - :ivar end_time: Metric end time. - :vartype end_time: datetime - :ivar resource_id: Metric resource Id. - :vartype resource_id: str - :ivar id: Resource Id. - :vartype id: str - :ivar metric_values: Metric values. - :vartype metric_values: - list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricValue] - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricProperty] - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'id': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'ResourceMetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetric, self).__init__(**kwargs) - self.name = None - self.unit = None - self.time_grain = None - self.start_time = None - self.end_time = None - self.resource_id = None - self.id = None - self.metric_values = None - self.properties = None - - -class ResourceMetricAvailability(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) -> None: - super(ResourceMetricAvailability, self).__init__(**kwargs) - self.time_grain = None - self.retention = None - - -class ResourceMetricCollection(Model): - """Collection of metric 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.v2016_03_01.models.ResourceMetric] - :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': '[ResourceMetric]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(ResourceMetricCollection, self).__init__(**kwargs) - self.value = value - self.next_link = 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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2016_03_01.models.ResourceMetricName - :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.v2016_03_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricDefinitionCollection(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.v2016_03_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, **kwargs) -> None: - super(ResourceMetricDefinitionCollection, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ResourceMetricProperty(Model): - """Resource metric property. - - :param key: Key for resource metric property. - :type key: str - :param value: Value of pair. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: - super(ResourceMetricProperty, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ResourceMetricValue(Model): - """Value of resource metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Value timestamp. - :vartype timestamp: str - :ivar average: Value average. - :vartype average: float - :ivar minimum: Value minimum. - :vartype minimum: float - :ivar maximum: Value maximum. - :vartype maximum: float - :ivar total: Value total. - :vartype total: float - :ivar count: Value count. - :vartype count: float - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_03_01.models.ResourceMetricProperty] - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'average': {'readonly': True}, - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'total': {'readonly': True}, - 'count': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'average': {'key': 'average', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricValue, self).__init__(**kwargs) - self.timestamp = None - self.average = None - self.minimum = None - self.maximum = None - self.total = None - self.count = None - self.properties = None - - -class ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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.v2016_03_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: bool=None, reason=None, message: str=None, **kwargs) -> None: - super(ResourceNameAvailability, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class ResourceNameAvailabilityRequest(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.v2016_03_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, is_fqdn: bool=None, **kwargs) -> None: - super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.is_fqdn = is_fqdn - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2016_03_01.models.DataSource - """ - - _attribute_map = { - 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, - } - - def __init__(self, *, data_source=None, **kwargs) -> None: - super(ResponseMetaData, self).__init__(**kwargs) - self.data_source = data_source - - -class ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2016_03_01.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, **kwargs) -> None: - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = metric_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: Resource tags. - :type tags: dict[str, str] - :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.v2016_03_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2016_03_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.v2016_03_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2016_03_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2016_03_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2016_03_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2016_03_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2016_03_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2016_03_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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.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.host_names_disabled = host_names_disabled - 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.snapshot_info = snapshot_info - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = https_only - self.identity = identity - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2016_03_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2016_03_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2016_03_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2016_03_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' - :type scm_type: str or ~azure.mgmt.web.v2016_03_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2016_03_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2016_03_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2016_03_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2016_03_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2016_03_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2016_03_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2016_03_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2016_03_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2016_03_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2016_03_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2016_03_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: - 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.linux_fx_version = linux_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.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.cors = cors - self.push = push - self.api_definition = api_definition - self.auto_swap_slot_name = auto_swap_slot_name - self.local_my_sql_enabled = local_my_sql_enabled - self.ip_security_restrictions = ip_security_restrictions - self.http20_enabled = http20_enabled - self.min_tls_version = min_tls_version - - -class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - super(SiteMachineKey, self).__init__(**kwargs) - self.validation = validation - self.validation_key = validation_key - self.decryption = decryption - self.decryption_key = decryption_key - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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.v2016_03_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.v2016_03_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 SkuInfos(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.v2016_03_01.models.GlobalCsmSkuDescription] - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, - } - - def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: - super(SkuInfos, self).__init__(**kwargs) - self.resource_type = resource_type - self.skus = skus - - -class SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - self.count = count - self.time_interval = time_interval - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2016_03_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: - super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) - self.snapshot_time = snapshot_time - self.recovery_target = recovery_target - self.overwrite = overwrite - self.recover_configuration = recover_configuration - self.ignore_conflicting_host_names = ignore_conflicting_host_names - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: - super(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = location - self.id = id - - -class Solution(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.v2016_03_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2016_03_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2016_03_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': 'SolutionType'}, - 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, - 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, - } - - def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: - 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 source_control_name: Name or source control type. - :type source_control_name: 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 - """ - - _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'}, - 'source_control_name': {'key': 'properties.name', '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: str=None, source_control_name: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: - super(SourceControl, self).__init__(kind=kind, **kwargs) - self.source_control_name = source_control_name - self.token = token - self.token_secret = token_secret - self.refresh_token = refresh_token - self.expiration_time = expiration_time - - -class StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2016_03_01.models.StackMinorVersion] - """ - - _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]'}, - } - - def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, **kwargs) -> None: - 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 - - -class StackMinorVersion(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - """ - - _attribute_map = { - 'display_version': {'key': 'displayVersion', 'type': 'str'}, - 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, - 'is_default': {'key': 'isDefault', 'type': 'bool'}, - } - - def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, **kwargs) -> None: - super(StackMinorVersion, self).__init__(**kwargs) - self.display_version = display_version - self.runtime_version = runtime_version - self.is_default = is_default - - -class StampCapacity(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.v2016_03_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' - :type worker_size: str or - ~azure.mgmt.web.v2016_03_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 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: true if capacity - is applicable for all apps; otherwise, false. - :type is_applicable_for_all_compute_modes: bool - :param site_mode: Shared or Dedicated. - :type site_mode: str - """ - - _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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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'}, - } - - def __init__(self, *, name: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, **kwargs) -> None: - 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 - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - self.count = count - self.time_interval = time_interval - - -class User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: - super(User, self).__init__(kind=kind, **kwargs) - self.user_name = user_name - 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 - - -class ValidateRequest(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' - :type type: str or - ~azure.mgmt.web.v2016_03_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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 - """ - - _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'}, - } - - def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, **kwargs) -> None: - 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 - - -class ValidateResponse(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.v2016_03_01.models.ValidateResponseError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ValidateResponseError'}, - } - - def __init__(self, *, status: str=None, error=None, **kwargs) -> None: - super(ValidateResponse, self).__init__(**kwargs) - self.status = status - self.error = error - - -class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: - super(ValidateResponseError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2016_03_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -class VirtualIPMapping(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 - """ - - _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'}, - } - - def __init__(self, *, virtual_ip: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, **kwargs) -> None: - 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 - - -class VirtualNetworkProfile(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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=None, subnet: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2016_03_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: - 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 - - -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 - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: - 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 - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2016_03_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'}, - 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - super(VnetRoute, self).__init__(kind=kind, **kwargs) - self.vnet_route_name = vnet_route_name - 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 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.v2016_03_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'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, *, kind: str=None, failed: bool=None, failed_tests=None, **kwargs) -> None: - super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) - self.failed = failed - self.failed_tests = failed_tests - - -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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: - super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) - self.test_name = test_name - self.details = details - - -class WebAppCollection(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.v2016_03_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, **kwargs) -> None: - super(WebAppCollection, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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.v2016_03_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: - super(WorkerPool, self).__init__(**kwargs) - 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/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_paged_models.py deleted file mode 100644 index 9b44d6574fc..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_paged_models.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`Certificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Certificate]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificatePaged, self).__init__(*args, **kwargs) -class DeletedSitePaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSite ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSite]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSitePaged, self).__init__(*args, **kwargs) -class DetectorResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorResponsePaged, self).__init__(*args, **kwargs) -class DiagnosticCategoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiagnosticCategory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} - } - - def __init__(self, *args, **kwargs): - - super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) -class AnalysisDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`AnalysisDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) -class DetectorDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) -class ApplicationStackPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationStack ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationStack]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationStackPaged, self).__init__(*args, **kwargs) -class CsmOperationDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmOperationDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) -class RecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Recommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Recommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendationPaged, self).__init__(*args, **kwargs) -class ResourceHealthMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) -class SourceControlPaged(Paged): - """ - A paging container for iterating over a list of :class:`SourceControl ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SourceControl]'} - } - - def __init__(self, *args, **kwargs): - - super(SourceControlPaged, self).__init__(*args, **kwargs) -class GeoRegionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoRegion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoRegion]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoRegionPaged, self).__init__(*args, **kwargs) -class IdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`Identifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Identifier]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentifierPaged, self).__init__(*args, **kwargs) -class PremierAddOnOfferPaged(Paged): - """ - A paging container for iterating over a list of :class:`PremierAddOnOffer ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} - } - - def __init__(self, *args, **kwargs): - - super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) -class BillingMeterPaged(Paged): - """ - A paging container for iterating over a list of :class:`BillingMeter ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BillingMeter]'} - } - - def __init__(self, *args, **kwargs): - - super(BillingMeterPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_web_site_management_client_enums.py deleted file mode 100644 index 598dc7b2586..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,287 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class KeyVaultSecretStatus(str, Enum): - - 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 RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 ScmType(str, Enum): - - 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" - - -class ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class HostingEnvironmentStatus(str, Enum): - - preparing = "Preparing" - ready = "Ready" - scaling = "Scaling" - deleting = "Deleting" - - -class InternalLoadBalancingMode(str, Enum): - - none = "None" - web = "Web" - publishing = "Publishing" - - -class ComputeModeOptions(str, Enum): - - shared = "Shared" - dedicated = "Dedicated" - dynamic = "Dynamic" - - -class WorkerSizeOptions(str, Enum): - - default = "Default" - small = "Small" - medium = "Medium" - large = "Large" - d1 = "D1" - d2 = "D2" - d3 = "D3" - - -class AccessControlEntryAction(str, Enum): - - permit = "Permit" - deny = "Deny" - - -class OperationStatus(str, Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" - - -class IssueType(str, Enum): - - 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 SolutionType(str, Enum): - - quick_solution = "QuickSolution" - deep_investigation = "DeepInvestigation" - best_practices = "BestPractices" - - -class RenderingType(str, Enum): - - no_graph = "NoGraph" - table = "Table" - time_series = "TimeSeries" - time_series_per_instance = "TimeSeriesPerInstance" - - -class ResourceScopeType(str, Enum): - - server_farm = "ServerFarm" - subscription = "Subscription" - web_site = "WebSite" - - -class NotificationLevel(str, Enum): - - critical = "Critical" - warning = "Warning" - information = "Information" - non_urgent_suggestion = "NonUrgentSuggestion" - - -class Channels(str, Enum): - - notification = "Notification" - api = "Api" - email = "Email" - webhook = "Webhook" - all = "All" - - -class AppServicePlanRestrictions(str, Enum): - - none = "None" - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - - -class InAvailabilityReasonType(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" - - -class CheckNameResourceTypes(str, Enum): - - site = "Site" - slot = "Slot" - hosting_environment = "HostingEnvironment" - publishing_user = "PublishingUser" - microsoft_websites = "Microsoft.Web/sites" - microsoft_websitesslots = "Microsoft.Web/sites/slots" - microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" - microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" - - -class ValidateResourceTypes(str, Enum): - - server_farm = "ServerFarm" - site = "Site" - - -class SkuName(str, Enum): - - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - premium_v2 = "PremiumV2" - dynamic = "Dynamic" - isolated = "Isolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/__init__.py deleted file mode 100644 index 00a18715fd9..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._certificates_operations import CertificatesOperations -from ._deleted_web_apps_operations import DeletedWebAppsOperations -from ._diagnostics_operations import DiagnosticsOperations -from ._provider_operations import ProviderOperations -from ._recommendations_operations import RecommendationsOperations -from ._resource_health_metadata_operations import ResourceHealthMetadataOperations -from ._billing_meters_operations import BillingMetersOperations -from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin - -__all__ = [ - 'CertificatesOperations', - 'DeletedWebAppsOperations', - 'DiagnosticsOperations', - 'ProviderOperations', - 'RecommendationsOperations', - 'ResourceHealthMetadataOperations', - 'BillingMetersOperations', - 'WebSiteManagementClientOperationsMixin', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_billing_meters_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_billing_meters_operations.py deleted file mode 100644 index 292ab542cc4..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_billing_meters_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class BillingMetersOperations(object): - """BillingMetersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def list( - self, billing_location=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of meters for a given location. - - Gets a list of meters for a given location. - - :param billing_location: Azure Location of billable resource - :type billing_location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BillingMeter - :rtype: - ~azure.mgmt.web.v2016_03_01.models.BillingMeterPaged[~azure.mgmt.web.v2016_03_01.models.BillingMeter] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if billing_location is not None: - query_parameters['billingLocation'] = self._serialize.query("billing_location", billing_location, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_certificates_operations.py deleted file mode 100644 index 057be75f276..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_certificates_operations.py +++ /dev/null @@ -1,444 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CertificatesOperations(object): - """CertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all certificates for a subscription. - - Get all certificates for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2016_03_01.models.CertificatePaged[~azure.mgmt.web.v2016_03_01.models.Certificate] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all certificates in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2016_03_01.models.CertificatePaged[~azure.mgmt.web.v2016_03_01.models.Certificate] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get a certificate. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def create_or_update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate. - - 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.v2016_03_01.models.Certificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'Certificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Delete a certificate. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate. - - 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.v2016_03_01.models.CertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_deleted_web_apps_operations.py deleted file mode 100644 index ff1dd6a6530..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_deleted_web_apps_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class DeletedWebAppsOperations(object): - """DeletedWebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all deleted apps for a subscription. - - Get all deleted apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DeletedSitePaged[~azure.mgmt.web.v2016_03_01.models.DeletedSite] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_diagnostics_operations.py deleted file mode 100644 index 23da7c5a1f8..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_diagnostics_operations.py +++ /dev/null @@ -1,1758 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class DiagnosticsOperations(object): - """DiagnosticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def list_hosting_environment_detector_responses( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List Hosting Environment Detector Responses. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DetectorResponsePaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponse] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hosting_environment_detector_responses.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} - - def get_hosting_environment_detector_response( - self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Get Hosting Environment Detector Response. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_hosting_environment_detector_response.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} - - def list_site_detector_responses( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """List Site Detector Responses. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DetectorResponsePaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponse] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} - - def get_site_detector_response( - self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Get site detector response. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_detector_response.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} - - def list_site_diagnostic_categories( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """Get Diagnostics Categories. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticCategory] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} - - def get_site_diagnostic_category( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """Get Diagnostics Category. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_diagnostic_category.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """Get Site Analyses. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2016_03_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.AnalysisDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): - """Get Site Analysis. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_analysis.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Execute Analysis. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.execute_site_analysis.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """Get Detectors. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.DetectorDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector( - self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): - """Get Detector. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.DetectorDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_site_detector.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector( - self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Execute Detector. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.execute_site_detector.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} - - def list_site_detector_responses_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """List Site Detector Responses. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DetectorResponsePaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponse] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} - - def get_site_detector_response_slot( - self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Get site detector response. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_detector_response_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} - - def list_site_diagnostic_categories_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """Get Diagnostics Categories. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticCategory] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} - - def get_site_diagnostic_category_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """Get Diagnostics Category. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_diagnostic_category_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """Get Site Analyses. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2016_03_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.AnalysisDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): - """Get Site Analysis. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_analysis_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Execute Analysis. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.execute_site_analysis_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """Get Detectors. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.DetectorDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector_slot( - self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): - """Get Detector. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2016_03_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2016_03_01.models.DetectorDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_site_detector_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector_slot( - self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Execute Detector. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.execute_site_detector_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_provider_operations.py deleted file mode 100644 index 0081f39d0f9..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_provider_operations.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ProviderOperations(object): - """ProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def get_available_stacks( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Get available application frameworks and their versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStack - :rtype: - ~azure.mgmt.web.v2016_03_01.models.ApplicationStackPaged[~azure.mgmt.web.v2016_03_01.models.ApplicationStack] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks.metadata['url'] - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """Gets all available operations for the Microsoft.Web resource provider. - Also exposes resource metric definitions. - - Gets all available operations for the Microsoft.Web resource provider. - Also exposes resource metric definitions. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2016_03_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2016_03_01.models.CsmOperationDescription] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} - - def get_available_stacks_on_prem( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Get available application frameworks and their versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStack - :rtype: - ~azure.mgmt.web.v2016_03_01.models.ApplicationStackPaged[~azure.mgmt.web.v2016_03_01.models.ApplicationStack] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks_on_prem.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_recommendations_operations.py deleted file mode 100644 index e849b31b882..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_recommendations_operations.py +++ /dev/null @@ -1,644 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RecommendationsOperations(object): - """RecommendationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def list( - self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """List all recommendations for a subscription. - - List all recommendations for a subscription. - - :param featured: Specify true to return only the most - critical recommendations. The default is false, which - returns all recommendations. - :type featured: bool - :param filter: Filter is specified by using OData syntax. Example: - $filter=channels 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2016_03_01.models.RecommendationPaged[~azure.mgmt.web.v2016_03_01.models.Recommendation] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} - - def reset_all_filters( - self, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for a subscription. - - Reset all recommendation opt-out settings for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_all_filters.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} - - def disable_recommendation_for_subscription( - self, name, custom_headers=None, raw=False, **operation_config): - """Disables the specified rule so it will not apply to a subscription in - the future. - - Disables the specified rule so it will not apply to a subscription in - the future. - - :param name: Rule name - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_recommendation_for_subscription.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} - - def list_history_for_web_app( - self, resource_group_name, site_name, filter=None, custom_headers=None, raw=False, **operation_config): - """Get past recommendations for an app, optionally specified by the time - range. - - 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 filter: Filter is specified by using OData syntax. Example: - $filter=channels 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2016_03_01.models.RecommendationPaged[~azure.mgmt.web.v2016_03_01.models.Recommendation] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_web_app.metadata['url'] - 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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} - - def list_recommended_rules_for_web_app( - self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get all recommendations for an app. - - 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 true to return only the most - critical recommendations. The default is 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=channels eq 'Api' or - channel eq 'Notification' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2016_03_01.models.RecommendationPaged[~azure.mgmt.web.v2016_03_01.models.Recommendation] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} - - def disable_all_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """Disable all recommendations for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_all_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} - - def reset_all_filters_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_all_filters_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} - - def get_rule_details_by_web_app( - self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """Get a recommendation rule for an app. - - 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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_rule_details_by_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} - - def disable_recommendation_for_site( - self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): - """Disables the specific rule for a web site permanently. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_recommendation_for_site.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_resource_health_metadata_operations.py deleted file mode 100644 index 876c8fa050a..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_resource_health_metadata_operations.py +++ /dev/null @@ -1,465 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourceHealthMetadataOperations(object): - """ResourceHealthMetadataOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the subscription. - - List all ResourceHealthMetadata for all sites in the subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the resource group in - the subscription. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site - as a collection. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} - - def get_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} - - def list_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site - as a collection. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} - - def get_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_web_site_management_client_operations.py deleted file mode 100644 index f1def3b3f16..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/operations/_web_site_management_client_operations.py +++ /dev/null @@ -1,989 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from .. import models -import uuid - - -class WebSiteManagementClientOperationsMixin(object): - - def get_publishing_user( - self, custom_headers=None, raw=False, **operation_config): - """Gets publishing user. - - Gets publishing user. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def update_publishing_user( - self, user_details, custom_headers=None, raw=False, **operation_config): - """Updates publishing user. - - Updates publishing user. - - :param user_details: Details of publishing user - :type user_details: ~azure.mgmt.web.v2016_03_01.models.User - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(user_details, 'User') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def list_source_controls( - self, custom_headers=None, raw=False, **operation_config): - """Gets the source controls available for Azure websites. - - Gets the source controls available for Azure websites. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SourceControl - :rtype: - ~azure.mgmt.web.v2016_03_01.models.SourceControlPaged[~azure.mgmt.web.v2016_03_01.models.SourceControl] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_source_controls.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} - - def get_source_control( - self, source_control_type, custom_headers=None, raw=False, **operation_config): - """Gets source control token. - - Gets source control token. - - :param source_control_type: Type of source control - :type source_control_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def update_source_control( - self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): - """Updates source control token. - - 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.v2016_03_01.models.SourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_message, 'SourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def check_name_availability( - self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): - """Check if a resource name is available. - - Check if a resource name is available. - - :param name: Resource name to verify. - :type name: str - :param type: 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.v2016_03_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. - :type is_fqdn: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) - - # Construct URL - url = self.check_name_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceNameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} - - def get_subscription_deployment_locations( - self, custom_headers=None, raw=False, **operation_config): - """Gets list of available geo regions plus ministamps. - - Gets list of available geo regions plus ministamps. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.DeploymentLocations or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_subscription_deployment_locations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeploymentLocations', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} - - def list_geo_regions( - self, sku=None, linux_workers_enabled=None, custom_headers=None, raw=False, **operation_config): - """Get a list of available geographical regions. - - Get a list of available geographical regions. - - :param sku: Name of SKU used to filter the regions. Possible values - include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', - 'PremiumV2', 'Dynamic', 'Isolated' - :type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName - :param linux_workers_enabled: Specify true if you want to - filter to only regions that support Linux workers. - :type linux_workers_enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GeoRegion - :rtype: - ~azure.mgmt.web.v2016_03_01.models.GeoRegionPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegion] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_geo_regions.metadata['url'] - 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 = {} - 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') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} - - def list_site_identifiers_assigned_to_host_name( - self, name=None, custom_headers=None, raw=False, **operation_config): - """List all apps that are assigned to a hostname. - - List all apps that are assigned to a hostname. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2016_03_01.models.IdentifierPaged[~azure.mgmt.web.v2016_03_01.models.Identifier] - :raises: :class:`CloudError` - """ - name_identifier = models.NameIdentifier(name=name) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} - - def list_premier_add_on_offers( - self, custom_headers=None, raw=False, **operation_config): - """List all premier add-on offers. - - List all premier add-on offers. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PremierAddOnOffer - :rtype: - ~azure.mgmt.web.v2016_03_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2016_03_01.models.PremierAddOnOffer] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_premier_add_on_offers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} - - def list_skus( - self, custom_headers=None, raw=False, **operation_config): - """List all SKUs. - - List all SKUs. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.SkuInfos or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_skus.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SkuInfos', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} - - def verify_hosting_environment_vnet( - self, parameters, custom_headers=None, raw=False, **operation_config): - """Verifies if this VNET is compatible with an App Service Environment by - analyzing the Network Security Group rules. - - 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.v2016_03_01.models.VnetParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetValidationFailureDetails or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_03_01.models.VnetValidationFailureDetails or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.verify_hosting_environment_vnet.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VnetParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetValidationFailureDetails', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} - - def move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """Move resources between resource groups. - - 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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} - - def validate( - self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): - """Validate if a resource can be created. - - 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.v2016_03_01.models.ValidateRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_03_01.models.ValidateResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.validate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_request, 'ValidateRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidateResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} - - def validate_move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """Validate whether a resource can be moved. - - 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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.validate_move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_03_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_web_site_management_client.py deleted file mode 100644 index 50a0633dd1d..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/_web_site_management_client.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import WebAppsOperations -from . import models - - -class WebSiteManagementClient(SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar web_apps: WebApps operations - :vartype web_apps: azure.mgmt.web.v2016_08_01.operations.WebAppsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2016-08-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.web_apps = WebAppsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/__init__.py deleted file mode 100644 index 2f373565039..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/__init__.py +++ /dev/null @@ -1,477 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import ApiDefinitionInfo - from ._models_py3 import ApplicationLogsConfig - from ._models_py3 import AppServicePlan - from ._models_py3 import AutoHealActions - from ._models_py3 import AutoHealCustomAction - from ._models_py3 import AutoHealRules - from ._models_py3 import AutoHealTriggers - from ._models_py3 import AzureBlobStorageApplicationLogsConfig - from ._models_py3 import AzureBlobStorageHttpLogsConfig - from ._models_py3 import AzureTableStorageApplicationLogsConfig - from ._models_py3 import BackupItem - from ._models_py3 import BackupRequest - from ._models_py3 import BackupSchedule - from ._models_py3 import Capability - from ._models_py3 import CloningInfo - from ._models_py3 import ConnectionStringDictionary - from ._models_py3 import ConnStringInfo - from ._models_py3 import ConnStringValueTypePair - from ._models_py3 import ContinuousWebJob - from ._models_py3 import CorsSettings - from ._models_py3 import CsmPublishingProfileOptions - from ._models_py3 import CsmSlotEntity - from ._models_py3 import CsmUsageQuota - from ._models_py3 import CustomHostnameAnalysisResult - from ._models_py3 import DatabaseBackupSetting - from ._models_py3 import Deployment - from ._models_py3 import EnabledConfig - from ._models_py3 import ErrorEntity - from ._models_py3 import Experiments - from ._models_py3 import FileSystemApplicationLogsConfig - from ._models_py3 import FileSystemHttpLogsConfig - from ._models_py3 import FunctionEnvelope - from ._models_py3 import FunctionSecrets - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostNameBinding - from ._models_py3 import HostNameSslState - from ._models_py3 import HttpLogsConfig - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import Identifier - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import LocalizableString - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import MigrateMySqlRequest - from ._models_py3 import MigrateMySqlStatus - from ._models_py3 import MSDeploy - from ._models_py3 import MSDeployLog - from ._models_py3 import MSDeployLogEntry - from ._models_py3 import MSDeployStatus - from ._models_py3 import NameValuePair - from ._models_py3 import NetworkFeatures - from ._models_py3 import Operation - from ._models_py3 import PerfMonResponse - from ._models_py3 import PerfMonSample - from ._models_py3 import PerfMonSet - from ._models_py3 import PremierAddOn - from ._models_py3 import ProcessInfo - from ._models_py3 import ProcessModuleInfo - from ._models_py3 import ProcessThreadInfo - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PublicCertificate - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import RelayServiceConnectionEntity - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceMetric - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceMetricName - from ._models_py3 import ResourceMetricProperty - from ._models_py3 import ResourceMetricValue - from ._models_py3 import RestoreRequest - from ._models_py3 import RestoreResponse - from ._models_py3 import Site - from ._models_py3 import SiteAuthSettings - from ._models_py3 import SiteCloneability - from ._models_py3 import SiteCloneabilityCriterion - from ._models_py3 import SiteConfig - from ._models_py3 import SiteConfigResource - from ._models_py3 import SiteConfigurationSnapshotInfo - from ._models_py3 import SiteExtensionInfo - from ._models_py3 import SiteInstance - 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 SiteSourceControl - from ._models_py3 import SkuCapacity - from ._models_py3 import SkuDescription - from ._models_py3 import SlotConfigNamesResource - from ._models_py3 import SlotDifference - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import Snapshot - from ._models_py3 import SnapshotRecoveryRequest - from ._models_py3 import SnapshotRecoveryTarget - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import StorageMigrationOptions - from ._models_py3 import StorageMigrationResponse - from ._models_py3 import StringDictionary - from ._models_py3 import TriggeredJobHistory - from ._models_py3 import TriggeredJobRun - from ._models_py3 import TriggeredWebJob - from ._models_py3 import User - from ._models_py3 import VirtualApplication - from ._models_py3 import VirtualDirectory - from ._models_py3 import VnetGateway - from ._models_py3 import VnetInfo - from ._models_py3 import VnetRoute - from ._models_py3 import WebJob -except (SyntaxError, ImportError): - from ._models import ApiDefinitionInfo - from ._models import ApplicationLogsConfig - from ._models import AppServicePlan - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import AzureBlobStorageApplicationLogsConfig - from ._models import AzureBlobStorageHttpLogsConfig - from ._models import AzureTableStorageApplicationLogsConfig - from ._models import BackupItem - from ._models import BackupRequest - from ._models import BackupSchedule - from ._models import Capability - from ._models import CloningInfo - from ._models import ConnectionStringDictionary - from ._models import ConnStringInfo - from ._models import ConnStringValueTypePair - from ._models import ContinuousWebJob - from ._models import CorsSettings - from ._models import CsmPublishingProfileOptions - from ._models import CsmSlotEntity - from ._models import CsmUsageQuota - from ._models import CustomHostnameAnalysisResult - from ._models import DatabaseBackupSetting - from ._models import Deployment - from ._models import EnabledConfig - from ._models import ErrorEntity - from ._models import Experiments - from ._models import FileSystemApplicationLogsConfig - from ._models import FileSystemHttpLogsConfig - from ._models import FunctionEnvelope - from ._models import FunctionSecrets - from ._models import HandlerMapping - from ._models import HostingEnvironmentProfile - from ._models import HostNameBinding - from ._models import HostNameSslState - from ._models import HttpLogsConfig - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import Identifier - from ._models import IpSecurityRestriction - from ._models import LocalizableString - from ._models import ManagedServiceIdentity - from ._models import MigrateMySqlRequest - from ._models import MigrateMySqlStatus - from ._models import MSDeploy - from ._models import MSDeployLog - from ._models import MSDeployLogEntry - from ._models import MSDeployStatus - from ._models import NameValuePair - from ._models import NetworkFeatures - from ._models import Operation - from ._models import PerfMonResponse - from ._models import PerfMonSample - from ._models import PerfMonSet - from ._models import PremierAddOn - from ._models import ProcessInfo - from ._models import ProcessModuleInfo - from ._models import ProcessThreadInfo - from ._models import ProxyOnlyResource - from ._models import PublicCertificate - from ._models import PushSettings - from ._models import RampUpRule - from ._models import RelayServiceConnectionEntity - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceMetric - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceMetricName - from ._models import ResourceMetricProperty - from ._models import ResourceMetricValue - from ._models import RestoreRequest - from ._models import RestoreResponse - from ._models import Site - from ._models import SiteAuthSettings - from ._models import SiteCloneability - from ._models import SiteCloneabilityCriterion - from ._models import SiteConfig - from ._models import SiteConfigResource - from ._models import SiteConfigurationSnapshotInfo - from ._models import SiteExtensionInfo - from ._models import SiteInstance - from ._models import SiteLimits - from ._models import SiteLogsConfig - from ._models import SiteMachineKey - from ._models import SitePatchResource - from ._models import SitePhpErrorLogFlag - from ._models import SiteSourceControl - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SlotConfigNamesResource - from ._models import SlotDifference - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import Snapshot - from ._models import SnapshotRecoveryRequest - from ._models import SnapshotRecoveryTarget - from ._models import StatusCodesBasedTrigger - from ._models import StorageMigrationOptions - from ._models import StorageMigrationResponse - from ._models import StringDictionary - from ._models import TriggeredJobHistory - from ._models import TriggeredJobRun - from ._models import TriggeredWebJob - from ._models import User - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetRoute - from ._models import WebJob -from ._paged_models import BackupItemPaged -from ._paged_models import ContinuousWebJobPaged -from ._paged_models import CsmUsageQuotaPaged -from ._paged_models import DeploymentPaged -from ._paged_models import FunctionEnvelopePaged -from ._paged_models import HostNameBindingPaged -from ._paged_models import IdentifierPaged -from ._paged_models import PerfMonResponsePaged -from ._paged_models import ProcessInfoPaged -from ._paged_models import ProcessModuleInfoPaged -from ._paged_models import ProcessThreadInfoPaged -from ._paged_models import PublicCertificatePaged -from ._paged_models import ResourceMetricDefinitionPaged -from ._paged_models import ResourceMetricPaged -from ._paged_models import SiteConfigResourcePaged -from ._paged_models import SiteConfigurationSnapshotInfoPaged -from ._paged_models import SiteExtensionInfoPaged -from ._paged_models import SiteInstancePaged -from ._paged_models import SitePaged -from ._paged_models import SlotDifferencePaged -from ._paged_models import SnapshotPaged -from ._paged_models import TriggeredJobHistoryPaged -from ._paged_models import TriggeredWebJobPaged -from ._paged_models import WebJobPaged -from ._web_site_management_client_enums import ( - LogLevel, - BackupItemStatus, - DatabaseType, - FrequencyUnit, - BackupRestoreOperationType, - ConnectionStringType, - ContinuousWebJobStatus, - WebJobType, - PublishingProfileFormat, - DnsVerificationTestResult, - AzureResourceType, - CustomHostNameDnsRecordType, - HostNameType, - SslState, - MSDeployLogEntryType, - MSDeployProvisioningState, - MySqlMigrationType, - OperationStatus, - RouteType, - PublicCertificateLocation, - UnauthenticatedClientAction, - BuiltInAuthenticationProvider, - CloneAbilityResult, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - AutoHealActionType, - SupportedTlsVersions, - SiteExtensionType, - UsageState, - SiteAvailabilityState, - HostType, - TriggeredWebJobStatus, - ManagedServiceIdentityType, - StatusOptions, - ProvisioningState, -) - -__all__ = [ - 'ApiDefinitionInfo', - 'ApplicationLogsConfig', - 'AppServicePlan', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'AzureBlobStorageApplicationLogsConfig', - 'AzureBlobStorageHttpLogsConfig', - 'AzureTableStorageApplicationLogsConfig', - 'BackupItem', - 'BackupRequest', - 'BackupSchedule', - 'Capability', - 'CloningInfo', - 'ConnectionStringDictionary', - 'ConnStringInfo', - 'ConnStringValueTypePair', - 'ContinuousWebJob', - 'CorsSettings', - 'CsmPublishingProfileOptions', - 'CsmSlotEntity', - 'CsmUsageQuota', - 'CustomHostnameAnalysisResult', - 'DatabaseBackupSetting', - 'Deployment', - 'EnabledConfig', - 'ErrorEntity', - 'Experiments', - 'FileSystemApplicationLogsConfig', - 'FileSystemHttpLogsConfig', - 'FunctionEnvelope', - 'FunctionSecrets', - 'HandlerMapping', - 'HostingEnvironmentProfile', - 'HostNameBinding', - 'HostNameSslState', - 'HttpLogsConfig', - 'HybridConnection', - 'HybridConnectionKey', - 'Identifier', - 'IpSecurityRestriction', - 'LocalizableString', - 'ManagedServiceIdentity', - 'MigrateMySqlRequest', - 'MigrateMySqlStatus', - 'MSDeploy', - 'MSDeployLog', - 'MSDeployLogEntry', - 'MSDeployStatus', - 'NameValuePair', - 'NetworkFeatures', - 'Operation', - 'PerfMonResponse', - 'PerfMonSample', - 'PerfMonSet', - 'PremierAddOn', - 'ProcessInfo', - 'ProcessModuleInfo', - 'ProcessThreadInfo', - 'ProxyOnlyResource', - 'PublicCertificate', - 'PushSettings', - 'RampUpRule', - 'RelayServiceConnectionEntity', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceMetric', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceMetricName', - 'ResourceMetricProperty', - 'ResourceMetricValue', - 'RestoreRequest', - 'RestoreResponse', - 'Site', - 'SiteAuthSettings', - 'SiteCloneability', - 'SiteCloneabilityCriterion', - 'SiteConfig', - 'SiteConfigResource', - 'SiteConfigurationSnapshotInfo', - 'SiteExtensionInfo', - 'SiteInstance', - 'SiteLimits', - 'SiteLogsConfig', - 'SiteMachineKey', - 'SitePatchResource', - 'SitePhpErrorLogFlag', - 'SiteSourceControl', - 'SkuCapacity', - 'SkuDescription', - 'SlotConfigNamesResource', - 'SlotDifference', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'Snapshot', - 'SnapshotRecoveryRequest', - 'SnapshotRecoveryTarget', - 'StatusCodesBasedTrigger', - 'StorageMigrationOptions', - 'StorageMigrationResponse', - 'StringDictionary', - 'TriggeredJobHistory', - 'TriggeredJobRun', - 'TriggeredWebJob', - 'User', - 'VirtualApplication', - 'VirtualDirectory', - 'VnetGateway', - 'VnetInfo', - 'VnetRoute', - 'WebJob', - 'SitePaged', - 'BackupItemPaged', - 'SiteConfigResourcePaged', - 'SiteConfigurationSnapshotInfoPaged', - 'ContinuousWebJobPaged', - 'DeploymentPaged', - 'IdentifierPaged', - 'FunctionEnvelopePaged', - 'HostNameBindingPaged', - 'SiteInstancePaged', - 'ProcessInfoPaged', - 'ProcessModuleInfoPaged', - 'ProcessThreadInfoPaged', - 'ResourceMetricDefinitionPaged', - 'ResourceMetricPaged', - 'PerfMonResponsePaged', - 'PublicCertificatePaged', - 'SiteExtensionInfoPaged', - 'SlotDifferencePaged', - 'SnapshotPaged', - 'TriggeredWebJobPaged', - 'TriggeredJobHistoryPaged', - 'CsmUsageQuotaPaged', - 'WebJobPaged', - 'LogLevel', - 'BackupItemStatus', - 'DatabaseType', - 'FrequencyUnit', - 'BackupRestoreOperationType', - 'ConnectionStringType', - 'ContinuousWebJobStatus', - 'WebJobType', - 'PublishingProfileFormat', - 'DnsVerificationTestResult', - 'AzureResourceType', - 'CustomHostNameDnsRecordType', - 'HostNameType', - 'SslState', - 'MSDeployLogEntryType', - 'MSDeployProvisioningState', - 'MySqlMigrationType', - 'OperationStatus', - 'RouteType', - 'PublicCertificateLocation', - 'UnauthenticatedClientAction', - 'BuiltInAuthenticationProvider', - 'CloneAbilityResult', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'AutoHealActionType', - 'SupportedTlsVersions', - 'SiteExtensionType', - 'UsageState', - 'SiteAvailabilityState', - 'HostType', - 'TriggeredWebJobStatus', - 'ManagedServiceIdentityType', - 'StatusOptions', - 'ProvisioningState', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models.py deleted file mode 100644 index ce459a9f4c4..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models.py +++ /dev/null @@ -1,6213 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiDefinitionInfo(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 ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2016_08_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2016_08_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2016_08_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 Resource(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: 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.get('location', None) - self.type = None - self.tags = kwargs.get('tags', None) - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2016_08_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2016_08_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2016_08_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2016_08_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, self).__init__(**kwargs) - self.app_service_plan_name = kwargs.get('app_service_plan_name', None) - self.worker_tier_name = kwargs.get('worker_tier_name', None) - self.status = None - self.subscription = None - self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None - self.is_spot = kwargs.get('is_spot', None) - self.spot_expiration_time = kwargs.get('spot_expiration_time', None) - self.resource_group = None - self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', None) - - -class AutoHealActions(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.v2016_08_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2016_08_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': 'AutoHealActionType'}, - '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(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(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.v2016_08_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2016_08_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2016_08_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.v2016_08_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2016_08_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) - - -class AzureBlobStorageApplicationLogsConfig(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.v2016_08_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': 'LogLevel'}, - '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(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 AzureTableStorageApplicationLogsConfig(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.v2016_08_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': 'LogLevel'}, - '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.get('sas_url', None) - - -class ProxyOnlyResource(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 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 backup_item_name: Name of this backup. - :vartype backup_item_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.v2016_08_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 - :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.v2016_08_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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.backup_item_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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param backup_request_name: Required. Name of the backup. - :type backup_request_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: Required. 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.v2016_08_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2016_08_01.models.DatabaseBackupSetting] - :param backup_request_type: Type of the backup. Possible values include: - 'Default', 'Clone', 'Relocation', 'Snapshot' - :type backup_request_type: str or - ~azure.mgmt.web.v2016_08_01.models.BackupRestoreOperationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'backup_request_name': {'required': True}, - 'storage_account_url': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'backup_request_name': {'key': 'properties.name', '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]'}, - 'backup_request_type': {'key': 'properties.type', 'type': 'BackupRestoreOperationType'}, - } - - def __init__(self, **kwargs): - super(BackupRequest, self).__init__(**kwargs) - self.backup_request_name = kwargs.get('backup_request_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) - self.backup_request_type = kwargs.get('backup_request_type', None) - - -class BackupSchedule(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). Default value: 7 . - :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.v2016_08_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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 Capability(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 CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - 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.get('source_web_app_id', 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) - self.ignore_quotas = kwargs.get('ignore_quotas', None) - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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.v2016_08_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(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.v2016_08_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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(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.v2016_08_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, **kwargs): - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', 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.v2016_08_01.models.ContinuousWebJobStatus - :param detailed_status: Detailed status. - :type detailed_status: str - :param log_url: Log URL. - :type log_url: str - :ivar continuous_web_job_name: Job name. Used as job identifier in ARM - resource URI. - :vartype continuous_web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', - 'Triggered' - :type job_type: str or ~azure.mgmt.web.v2016_08_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}, - 'continuous_web_job_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'}, - 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, - 'detailed_status': {'key': 'properties.detailedStatus', 'type': 'str'}, - 'log_url': {'key': 'properties.logUrl', 'type': 'str'}, - 'continuous_web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', '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.continuous_web_job_name = 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.job_type = kwargs.get('job_type', None) - self.error = kwargs.get('error', None) - self.using_sdk = kwargs.get('using_sdk', None) - self.settings = kwargs.get('settings', None) - - -class CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = kwargs.get('allowed_origins', None) - - -class CsmPublishingProfileOptions(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.v2016_08_01.models.PublishingProfileFormat - """ - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CsmPublishingProfileOptions, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - - -class CsmSlotEntity(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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.get('target_slot', None) - self.preserve_vnet = kwargs.get('preserve_vnet', None) - - -class CsmUsageQuota(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 - :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.v2016_08_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 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: true if hostname is - already verified; otherwise, 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.v2016_08_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.v2016_08_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_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_cname_records = kwargs.get('alternate_cname_records', None) - self.alternate_txt_records = kwargs.get('alternate_txt_records', None) - - -class DatabaseBackupSetting(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.v2016_08_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.get('database_type', None) - 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 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 deployment_id: Identifier for deployment. - :type deployment_id: 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 - :param end_time: End time. - :type end_time: 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'}, - 'deployment_id': {'key': 'properties.id', '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.authorEmail', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', '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.deployment_id = kwargs.get('deployment_id', None) - 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 EnabledConfig(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 ErrorEntity(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.v2016_08_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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2016_08_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 FileSystemApplicationLogsConfig(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2016_08_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, **kwargs): - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = kwargs.get('level', "Off") - - -class FileSystemHttpLogsConfig(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 FunctionEnvelope(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 - :ivar function_envelope_name: Function name. - :vartype function_envelope_name: str - :ivar function_app_id: Function App ID. - :vartype 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 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'function_envelope_name': {'readonly': True}, - 'function_app_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'}, - 'function_envelope_name': {'key': 'properties.name', 'type': 'str'}, - 'function_app_id': {'key': 'properties.functionAppId', 'type': 'str'}, - 'script_root_path_href': {'key': 'properties.scriptRootPathHref', 'type': 'str'}, - 'script_href': {'key': 'properties.scriptHref', 'type': 'str'}, - 'config_href': {'key': 'properties.configHref', 'type': 'str'}, - 'secrets_file_href': {'key': 'properties.secretsFileHref', 'type': 'str'}, - 'href': {'key': 'properties.href', 'type': 'str'}, - 'config': {'key': 'properties.config', 'type': 'object'}, - 'files': {'key': 'properties.files', 'type': '{str}'}, - 'test_data': {'key': 'properties.testData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FunctionEnvelope, self).__init__(**kwargs) - self.function_envelope_name = None - self.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.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) - - -class FunctionSecrets(ProxyOnlyResource): - """Function secrets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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: Secret key. - :type key: str - :param trigger_url: Trigger URL. - :type trigger_url: 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'}, - 'key': {'key': 'properties.key', 'type': 'str'}, - 'trigger_url': {'key': 'properties.triggerUrl', '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 HandlerMapping(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 HostingEnvironmentProfile(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 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.v2016_08_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.v2016_08_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2016_08_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2016_08_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - '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 HostNameSslState(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.v2016_08_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 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.v2016_08_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2016_08_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2016_08_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 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 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 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identifier, self).__init__(**kwargs) - self.identifier_id = kwargs.get('identifier_id', None) - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', '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) - - -class LocalizableString(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 ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2016_08_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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.tenant_id = None - self.principal_id = None - - -class MigrateMySqlRequest(ProxyOnlyResource): - """MySQL migration request. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2016_08_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - 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.v2016_08_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': 'OperationStatus'}, - '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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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.v2016_08_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(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2016_08_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': 'MSDeployLogEntryType'}, - '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.v2016_08_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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 NameValuePair(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.v2016_08_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2016_08_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 Operation(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.v2016_08_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2016_08_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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 PerfMonResponse(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.v2016_08_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(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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 - :param core_count: Core Count of worker. Not a data member - :type core_count: int - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'iso-8601'}, - 'instance_name': {'key': 'instanceName', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - 'core_count': {'key': 'coreCount', 'type': 'int'}, - } - - 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) - self.core_count = kwargs.get('core_count', None) - - -class PerfMonSet(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 - :param end_time: End time of the period. - :type end_time: 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.v2016_08_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: 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 premier_add_on_name: Premier add on Name. - :type premier_add_on_name: str - :param premier_add_on_location: Premier add on Location. - :type premier_add_on_location: str - :param premier_add_on_tags: Premier add on Tags. - :type premier_add_on_tags: dict[str, 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'}, - 'premier_add_on_name': {'key': 'properties.name', 'type': 'str'}, - 'premier_add_on_location': {'key': 'properties.location', 'type': 'str'}, - 'premier_add_on_tags': {'key': 'properties.tags', '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.premier_add_on_name = kwargs.get('premier_add_on_name', None) - self.premier_add_on_location = kwargs.get('premier_add_on_location', None) - self.premier_add_on_tags = kwargs.get('premier_add_on_tags', None) - self.marketplace_publisher = kwargs.get('marketplace_publisher', None) - self.marketplace_offer = kwargs.get('marketplace_offer', None) - - -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 - :param process_info_id: ARM Identifier for deployment. - :type process_info_id: int - :param process_info_name: Deployment name. - :type process_info_name: str - :param href: HRef URI. - :type href: str - :param mini_dump: Minidump URI. - :type mini_dump: 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.v2016_08_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.v2016_08_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 - :param total_processor_time: Total CPU time. - :type total_processor_time: str - :param user_processor_time: User CPU time. - :type user_processor_time: str - :param privileged_processor_time: Privileged CPU time. - :type privileged_processor_time: str - :param working_set64: Working set. - :type working_set64: long - :param peak_working_set64: Peak working set. - :type peak_working_set64: long - :param private_memory_size64: Private memory size. - :type private_memory_size64: long - :param virtual_memory_size64: Virtual memory size. - :type virtual_memory_size64: long - :param peak_virtual_memory_size64: Peak virtual memory usage. - :type peak_virtual_memory_size64: long - :param paged_system_memory_size64: Paged system memory. - :type paged_system_memory_size64: long - :param nonpaged_system_memory_size64: Non-paged system memory. - :type nonpaged_system_memory_size64: long - :param paged_memory_size64: Paged memory. - :type paged_memory_size64: long - :param peak_paged_memory_size64: Peak paged memory. - :type peak_paged_memory_size64: long - :param time_stamp: Time stamp. - :type time_stamp: 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_web_job: Is this a Web Job? - :type is_web_job: bool - :param description: Description of process. - :type description: 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'}, - 'process_info_id': {'key': 'properties.id', 'type': 'int'}, - 'process_info_name': {'key': 'properties.name', 'type': 'str'}, - 'href': {'key': 'properties.href', 'type': 'str'}, - 'mini_dump': {'key': 'properties.miniDump', 'type': 'str'}, - 'is_profile_running': {'key': 'properties.isProfileRunning', 'type': 'bool'}, - 'is_iis_profile_running': {'key': 'properties.isIisProfileRunning', 'type': 'bool'}, - 'iis_profile_timeout_in_seconds': {'key': 'properties.iisProfileTimeoutInSeconds', '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.openFileHandles', 'type': '[str]'}, - 'modules': {'key': 'properties.modules', 'type': '[ProcessModuleInfo]'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'command_line': {'key': 'properties.commandLine', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'handle_count': {'key': 'properties.handleCount', 'type': 'int'}, - 'module_count': {'key': 'properties.moduleCount', 'type': 'int'}, - 'thread_count': {'key': 'properties.threadCount', 'type': 'int'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, - 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, - 'privileged_processor_time': {'key': 'properties.privilegedProcessorTime', 'type': 'str'}, - 'working_set64': {'key': 'properties.workingSet64', 'type': 'long'}, - 'peak_working_set64': {'key': 'properties.peakWorkingSet64', 'type': 'long'}, - 'private_memory_size64': {'key': 'properties.privateMemorySize64', 'type': 'long'}, - 'virtual_memory_size64': {'key': 'properties.virtualMemorySize64', 'type': 'long'}, - 'peak_virtual_memory_size64': {'key': 'properties.peakVirtualMemorySize64', 'type': 'long'}, - 'paged_system_memory_size64': {'key': 'properties.pagedSystemMemorySize64', 'type': 'long'}, - 'nonpaged_system_memory_size64': {'key': 'properties.nonpagedSystemMemorySize64', 'type': 'long'}, - 'paged_memory_size64': {'key': 'properties.pagedMemorySize64', 'type': 'long'}, - 'peak_paged_memory_size64': {'key': 'properties.peakPagedMemorySize64', 'type': 'long'}, - 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, - 'environment_variables': {'key': 'properties.environmentVariables', 'type': '{str}'}, - 'is_scm_site': {'key': 'properties.isScmSite', 'type': 'bool'}, - 'is_web_job': {'key': 'properties.isWebJob', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProcessInfo, self).__init__(**kwargs) - self.process_info_id = kwargs.get('process_info_id', None) - self.process_info_name = kwargs.get('process_info_name', None) - self.href = kwargs.get('href', None) - self.mini_dump = kwargs.get('mini_dump', 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_processor_time = kwargs.get('total_processor_time', None) - self.user_processor_time = kwargs.get('user_processor_time', None) - self.privileged_processor_time = kwargs.get('privileged_processor_time', None) - self.working_set64 = kwargs.get('working_set64', None) - self.peak_working_set64 = kwargs.get('peak_working_set64', None) - self.private_memory_size64 = kwargs.get('private_memory_size64', None) - self.virtual_memory_size64 = kwargs.get('virtual_memory_size64', None) - self.peak_virtual_memory_size64 = kwargs.get('peak_virtual_memory_size64', None) - self.paged_system_memory_size64 = kwargs.get('paged_system_memory_size64', None) - self.nonpaged_system_memory_size64 = kwargs.get('nonpaged_system_memory_size64', None) - self.paged_memory_size64 = kwargs.get('paged_memory_size64', None) - self.peak_paged_memory_size64 = kwargs.get('peak_paged_memory_size64', 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_web_job = kwargs.get('is_web_job', None) - self.description = kwargs.get('description', 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.baseAddress', 'type': 'str'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'href': {'key': 'properties.href', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'module_memory_size': {'key': 'properties.moduleMemorySize', 'type': 'int'}, - 'file_version': {'key': 'properties.fileVersion', 'type': 'str'}, - 'file_description': {'key': 'properties.fileDescription', 'type': 'str'}, - 'product': {'key': 'properties.product', 'type': 'str'}, - 'product_version': {'key': 'properties.productVersion', 'type': 'str'}, - 'is_debug': {'key': 'properties.isDebug', '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 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 - :param process_thread_info_id: ARM Identifier for deployment. - :type process_thread_info_id: 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 - :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 priviledged_processor_time: Privileged processor time. - :type priviledged_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}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'process_thread_info_id': {'key': 'properties.id', 'type': 'int'}, - 'href': {'key': 'properties.href', 'type': 'str'}, - 'process': {'key': 'properties.process', 'type': 'str'}, - 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, - 'current_priority': {'key': 'properties.currentPriority', 'type': 'int'}, - 'priority_level': {'key': 'properties.priorityLevel', 'type': 'str'}, - 'base_priority': {'key': 'properties.basePriority', 'type': 'int'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, - 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, - 'priviledged_processor_time': {'key': 'properties.priviledgedProcessorTime', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'wait_reason': {'key': 'properties.waitReason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProcessThreadInfo, self).__init__(**kwargs) - self.process_thread_info_id = kwargs.get('process_thread_info_id', 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.priviledged_processor_time = kwargs.get('priviledged_processor_time', None) - self.state = kwargs.get('state', None) - self.wait_reason = kwargs.get('wait_reason', 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.v2016_08_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': 'PublicCertificateLocation'}, - '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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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 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 RequestsBasedTrigger(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 ResourceMetric(Model): - """Object representing a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of metric. - :vartype name: ~azure.mgmt.web.v2016_08_01.models.ResourceMetricName - :ivar unit: Metric unit. - :vartype unit: str - :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D - :vartype time_grain: str - :ivar start_time: Metric start time. - :vartype start_time: datetime - :ivar end_time: Metric end time. - :vartype end_time: datetime - :ivar resource_id: Metric resource Id. - :vartype resource_id: str - :ivar id: Resource Id. - :vartype id: str - :ivar metric_values: Metric values. - :vartype metric_values: - list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricValue] - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricProperty] - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'id': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'ResourceMetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs): - super(ResourceMetric, self).__init__(**kwargs) - self.name = None - self.unit = None - self.time_grain = None - self.start_time = None - self.end_time = None - self.resource_id = None - self.id = None - self.metric_values = None - self.properties = None - - -class ResourceMetricAvailability(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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2016_08_01.models.ResourceMetricName - :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.v2016_08_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricDefinition, self).__init__(**kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ResourceMetricProperty(Model): - """Resource metric property. - - :param key: Key for resource metric property. - :type key: str - :param value: Value of pair. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricProperty, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ResourceMetricValue(Model): - """Value of resource metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Value timestamp. - :vartype timestamp: str - :ivar average: Value average. - :vartype average: float - :ivar minimum: Value minimum. - :vartype minimum: float - :ivar maximum: Value maximum. - :vartype maximum: float - :ivar total: Value total. - :vartype total: float - :ivar count: Value count. - :vartype count: float - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricProperty] - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'average': {'readonly': True}, - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'total': {'readonly': True}, - 'count': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'average': {'key': 'average', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricValue, self).__init__(**kwargs) - self.timestamp = None - self.average = None - self.minimum = None - self.maximum = None - self.total = None - self.count = None - self.properties = None - - -class RestoreRequest(ProxyOnlyResource): - """Description of a restore request. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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.v2016_08_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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'. Default value: "Default" . - :type operation_type: str or - ~azure.mgmt.web.v2016_08_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - '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 RestoreResponse(ProxyOnlyResource): - """Response for an app 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 - :ivar operation_id: When server starts the restore process, it will return - an operation ID identifying that particular restore 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(RestoreResponse, self).__init__(**kwargs) - self.operation_id = 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: Resource tags. - :type tags: dict[str, str] - :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.v2016_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2016_08_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.v2016_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2016_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2016_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2016_08_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2016_08_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2016_08_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = kwargs.get('https_only', None) - self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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.v2016_08_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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' - :type default_provider: str or - ~azure.mgmt.web.v2016_08_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 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 allowed_audiences: Allowed audience values to consider when - validating JWTs issued by - Azure Active Directory. Note that the 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - 'issuer': {'key': 'properties.issuer', 'type': 'str'}, - 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, - 'additional_login_params': {'key': 'properties.additionalLoginParams', 'type': '[str]'}, - 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, - 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, - 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, - 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, - 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, - 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, - 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, - 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, - 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, - 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, - 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', '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.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.issuer = kwargs.get('issuer', None) - self.allowed_audiences = kwargs.get('allowed_audiences', None) - self.additional_login_params = kwargs.get('additional_login_params', None) - self.google_client_id = kwargs.get('google_client_id', None) - self.google_client_secret = kwargs.get('google_client_secret', None) - self.google_oauth_scopes = kwargs.get('google_oauth_scopes', None) - self.facebook_app_id = kwargs.get('facebook_app_id', None) - self.facebook_app_secret = kwargs.get('facebook_app_secret', None) - self.facebook_oauth_scopes = kwargs.get('facebook_oauth_scopes', None) - self.twitter_consumer_key = kwargs.get('twitter_consumer_key', None) - self.twitter_consumer_secret = kwargs.get('twitter_consumer_secret', 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_oauth_scopes = kwargs.get('microsoft_account_oauth_scopes', None) - - -class SiteCloneability(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.v2016_08_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2016_08_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.v2016_08_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2016_08_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - '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(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(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2016_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2016_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2016_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2016_08_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' - :type scm_type: str or ~azure.mgmt.web.v2016_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2016_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2016_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2016_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2016_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2016_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2016_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2016_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2016_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2016_08_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2016_08_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2016_08_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) - self.http20_enabled = kwargs.get('http20_enabled', True) - self.min_tls_version = kwargs.get('min_tls_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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2016_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2016_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2016_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2016_08_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' - :type scm_type: str or ~azure.mgmt.web.v2016_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2016_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2016_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2016_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2016_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2016_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2016_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2016_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2016_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2016_08_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2016_08_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2016_08_01.models.SupportedTlsVersions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'properties.linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, - 'push': {'key': 'properties.push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'properties.autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, - } - - 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) - self.http20_enabled = kwargs.get('http20_enabled', True) - self.min_tls_version = kwargs.get('min_tls_version', 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 - :ivar site_configuration_snapshot_info_id: The id of the snapshot - :vartype site_configuration_snapshot_info_id: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'time': {'readonly': True}, - 'site_configuration_snapshot_info_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'}, - 'site_configuration_snapshot_info_id': {'key': 'properties.id', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SiteConfigurationSnapshotInfo, self).__init__(**kwargs) - self.time = None - self.site_configuration_snapshot_info_id = 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 site_extension_info_id: Site extension ID. - :type site_extension_info_id: str - :param title: Site extension title. - :type title: str - :param site_extension_info_type: Site extension type. Possible values - include: 'Gallery', 'WebRoot' - :type site_extension_info_type: str or - ~azure.mgmt.web.v2016_08_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 installation_args: Installer command line parameters. - :type installation_args: str - :param published_date_time: Published timestamp. - :type published_date_time: datetime - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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'}, - 'site_extension_info_id': {'key': 'properties.id', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'site_extension_info_type': {'key': 'properties.type', 'type': 'SiteExtensionType'}, - 'summary': {'key': 'properties.summary', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'extension_url': {'key': 'properties.extensionUrl', 'type': 'str'}, - 'project_url': {'key': 'properties.projectUrl', 'type': 'str'}, - 'icon_url': {'key': 'properties.iconUrl', 'type': 'str'}, - 'license_url': {'key': 'properties.licenseUrl', 'type': 'str'}, - 'feed_url': {'key': 'properties.feedUrl', 'type': 'str'}, - 'authors': {'key': 'properties.authors', 'type': '[str]'}, - 'installation_args': {'key': 'properties.installationArgs', 'type': 'str'}, - 'published_date_time': {'key': 'properties.publishedDateTime', 'type': 'iso-8601'}, - 'download_count': {'key': 'properties.downloadCount', 'type': 'int'}, - 'local_is_latest_version': {'key': 'properties.localIsLatestVersion', 'type': 'bool'}, - 'local_path': {'key': 'properties.localPath', 'type': 'str'}, - 'installed_date_time': {'key': 'properties.installedDateTime', '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.site_extension_info_id = kwargs.get('site_extension_info_id', None) - self.title = kwargs.get('title', None) - self.site_extension_info_type = kwargs.get('site_extension_info_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.installation_args = kwargs.get('installation_args', 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 SiteInstance(ProxyOnlyResource): - """Instance 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 site_instance_name: Name of instance. - :vartype site_instance_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'site_instance_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'}, - 'site_instance_name': {'key': 'properties.name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SiteInstance, self).__init__(**kwargs) - self.site_instance_name = None - - -class SiteLimits(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.v2016_08_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2016_08_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2016_08_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2016_08_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(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 - :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.v2016_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2016_08_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.v2016_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2016_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2016_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2016_08_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2016_08_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: 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}, - } - - _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'}, - 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, - 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, - 'usage_state': {'key': 'properties.usageState', 'type': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SitePatchResource, self).__init__(**kwargs) - 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = kwargs.get('https_only', 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 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, - 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, - 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, - } - - 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.deployment_rollback_enabled = kwargs.get('deployment_rollback_enabled', None) - self.is_mercurial = kwargs.get('is_mercurial', None) - - -class SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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.v2016_08_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.v2016_08_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 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] - """ - - _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]'}, - } - - 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) - - -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 slot_difference_type: Type of the difference: Information, Warning - or Error. - :vartype slot_difference_type: 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}, - 'slot_difference_type': {'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'}, - 'slot_difference_type': {'key': 'properties.type', '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.slot_difference_type = 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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.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 SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SnapshotRecoveryRequest, self).__init__(**kwargs) - self.snapshot_time = kwargs.get('snapshot_time', None) - self.recovery_target = kwargs.get('recovery_target', 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) - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.id = kwargs.get('id', None) - - -class StatusCodesBasedTrigger(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 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'}, - '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.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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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 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 triggered_job_runs: List of triggered web job runs. - :type triggered_job_runs: - list[~azure.mgmt.web.v2016_08_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'}, - 'triggered_job_runs': {'key': 'properties.triggeredJobRuns', 'type': '[TriggeredJobRun]'}, - } - - def __init__(self, **kwargs): - super(TriggeredJobHistory, self).__init__(**kwargs) - self.triggered_job_runs = kwargs.get('triggered_job_runs', 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 triggered_job_run_id: Job ID. - :type triggered_job_run_id: str - :ivar triggered_job_run_name: Job name. - :vartype triggered_job_run_name: str - :param status: Job status. Possible values include: 'Success', 'Failed', - 'Error' - :type status: str or - ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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}, - 'triggered_job_run_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'}, - 'triggered_job_run_id': {'key': 'properties.id', 'type': 'str'}, - 'triggered_job_run_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TriggeredWebJobStatus'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'duration': {'key': 'properties.duration', 'type': 'str'}, - 'output_url': {'key': 'properties.outputUrl', 'type': 'str'}, - 'error_url': {'key': 'properties.errorUrl', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'job_name': {'key': 'properties.jobName', 'type': 'str'}, - 'trigger': {'key': 'properties.trigger', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TriggeredJobRun, self).__init__(**kwargs) - self.triggered_job_run_id = kwargs.get('triggered_job_run_id', None) - self.triggered_job_run_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.v2016_08_01.models.TriggeredJobRun - :param history_url: History URL. - :type history_url: str - :param scheduler_logs_url: Scheduler Logs URL. - :type scheduler_logs_url: str - :ivar triggered_web_job_name: Job name. Used as job identifier in ARM - resource URI. - :vartype triggered_web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', - 'Triggered' - :type job_type: str or ~azure.mgmt.web.v2016_08_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}, - 'triggered_web_job_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'}, - 'latest_run': {'key': 'properties.latestRun', 'type': 'TriggeredJobRun'}, - 'history_url': {'key': 'properties.historyUrl', 'type': 'str'}, - 'scheduler_logs_url': {'key': 'properties.schedulerLogsUrl', 'type': 'str'}, - 'triggered_web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', '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.triggered_web_job_name = 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.job_type = kwargs.get('job_type', None) - self.error = kwargs.get('error', None) - self.using_sdk = kwargs.get('using_sdk', None) - self.settings = kwargs.get('settings', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.user_name = kwargs.get('user_name', None) - 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) - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2016_08_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(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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2016_08_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - 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) - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2016_08_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'}, - 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) - 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 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 - :ivar web_job_name: Job name. Used as job identifier in ARM resource URI. - :vartype web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', - 'Triggered' - :type job_type: str or ~azure.mgmt.web.v2016_08_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}, - 'web_job_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'}, - 'web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(WebJob, self).__init__(**kwargs) - self.web_job_name = 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.job_type = kwargs.get('job_type', None) - self.error = kwargs.get('error', None) - self.using_sdk = kwargs.get('using_sdk', None) - self.settings = kwargs.get('settings', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models_py3.py deleted file mode 100644 index a14b423c995..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_models_py3.py +++ /dev/null @@ -1,6213 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2016_08_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2016_08_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2016_08_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: - 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.location = location - self.type = None - self.tags = tags - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2016_08_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2016_08_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2016_08_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2016_08_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_plan_name = app_service_plan_name - self.worker_tier_name = worker_tier_name - self.status = None - self.subscription = None - self.admin_site_name = admin_site_name - 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.number_of_sites = None - self.is_spot = is_spot - self.spot_expiration_time = spot_expiration_time - self.resource_group = None - self.reserved = reserved - self.target_worker_count = target_worker_count - self.target_worker_size_id = target_worker_size_id - self.provisioning_state = None - self.sku = sku - - -class AutoHealActions(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.v2016_08_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2016_08_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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.v2016_08_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2016_08_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2016_08_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.v2016_08_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2016_08_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -class AzureBlobStorageApplicationLogsConfig(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.v2016_08_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, - } - - def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: - super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - self.sas_url = sas_url - self.retention_in_days = retention_in_days - - -class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) - self.sas_url = sas_url - self.retention_in_days = retention_in_days - self.enabled = enabled - - -class AzureTableStorageApplicationLogsConfig(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.v2016_08_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - } - - def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: - super(AzureTableStorageApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - self.sas_url = sas_url - - -class ProxyOnlyResource(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: str=None, **kwargs) -> None: - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.type = None - - -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 backup_item_name: Name of this backup. - :vartype backup_item_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.v2016_08_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 - :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.v2016_08_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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: str=None, **kwargs) -> None: - super(BackupItem, self).__init__(kind=kind, **kwargs) - self.backup_id = None - self.storage_account_url = None - self.blob_name = None - self.backup_item_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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param backup_request_name: Required. Name of the backup. - :type backup_request_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: Required. 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.v2016_08_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2016_08_01.models.DatabaseBackupSetting] - :param backup_request_type: Type of the backup. Possible values include: - 'Default', 'Clone', 'Relocation', 'Snapshot' - :type backup_request_type: str or - ~azure.mgmt.web.v2016_08_01.models.BackupRestoreOperationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'backup_request_name': {'required': True}, - 'storage_account_url': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'backup_request_name': {'key': 'properties.name', '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]'}, - 'backup_request_type': {'key': 'properties.type', 'type': 'BackupRestoreOperationType'}, - } - - def __init__(self, *, backup_request_name: str, storage_account_url: str, kind: str=None, enabled: bool=None, backup_schedule=None, databases=None, backup_request_type=None, **kwargs) -> None: - super(BackupRequest, self).__init__(kind=kind, **kwargs) - self.backup_request_name = backup_request_name - self.enabled = enabled - self.storage_account_url = storage_account_url - self.backup_schedule = backup_schedule - self.databases = databases - self.backup_request_type = backup_request_type - - -class BackupSchedule(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). Default value: 7 . - :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.v2016_08_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: - 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 Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - super(Capability, self).__init__(**kwargs) - self.name = name - self.value = value - self.reason = reason - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: - 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.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 - self.ignore_quotas = ignore_quotas - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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.v2016_08_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: str=None, properties=None, **kwargs) -> None: - super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class ConnStringInfo(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.v2016_08_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class ConnStringValueTypePair(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.v2016_08_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, value: str, type, **kwargs) -> None: - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = value - self.type = type - - -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.v2016_08_01.models.ContinuousWebJobStatus - :param detailed_status: Detailed status. - :type detailed_status: str - :param log_url: Log URL. - :type log_url: str - :ivar continuous_web_job_name: Job name. Used as job identifier in ARM - resource URI. - :vartype continuous_web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', - 'Triggered' - :type job_type: str or ~azure.mgmt.web.v2016_08_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}, - 'continuous_web_job_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'}, - 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, - 'detailed_status': {'key': 'properties.detailedStatus', 'type': 'str'}, - 'log_url': {'key': 'properties.logUrl', 'type': 'str'}, - 'continuous_web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - super(ContinuousWebJob, self).__init__(kind=kind, **kwargs) - self.status = status - self.detailed_status = detailed_status - self.log_url = log_url - self.continuous_web_job_name = None - self.run_command = run_command - self.url = url - self.extra_info_url = extra_info_url - self.job_type = job_type - self.error = error - self.using_sdk = using_sdk - self.settings = settings - - -class CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, *, allowed_origins=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - - -class CsmPublishingProfileOptions(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.v2016_08_01.models.PublishingProfileFormat - """ - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - } - - def __init__(self, *, format=None, **kwargs) -> None: - super(CsmPublishingProfileOptions, self).__init__(**kwargs) - self.format = format - - -class CsmSlotEntity(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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) -> None: - super(CsmSlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.preserve_vnet = preserve_vnet - - -class CsmUsageQuota(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 - :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.v2016_08_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - 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 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: true if hostname is - already verified; otherwise, 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.v2016_08_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.v2016_08_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, - 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: - 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_cname_records = alternate_cname_records - self.alternate_txt_records = alternate_txt_records - - -class DatabaseBackupSetting(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.v2016_08_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: - 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 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 deployment_id: Identifier for deployment. - :type deployment_id: 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 - :param end_time: End time. - :type end_time: 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'}, - 'deployment_id': {'key': 'properties.id', '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.authorEmail', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'active': {'key': 'properties.active', 'type': 'bool'}, - 'details': {'key': 'properties.details', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, deployment_id: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: - super(Deployment, self).__init__(kind=kind, **kwargs) - self.deployment_id = deployment_id - 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 EnabledConfig(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: bool=None, **kwargs) -> None: - super(EnabledConfig, self).__init__(**kwargs) - self.enabled = enabled - - -class ErrorEntity(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.v2016_08_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: - 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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2016_08_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -class FileSystemApplicationLogsConfig(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2016_08_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, *, level="Off", **kwargs) -> None: - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - - -class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - super(FileSystemHttpLogsConfig, self).__init__(**kwargs) - self.retention_in_mb = retention_in_mb - self.retention_in_days = retention_in_days - self.enabled = enabled - - -class FunctionEnvelope(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 - :ivar function_envelope_name: Function name. - :vartype function_envelope_name: str - :ivar function_app_id: Function App ID. - :vartype 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 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'function_envelope_name': {'readonly': True}, - 'function_app_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'}, - 'function_envelope_name': {'key': 'properties.name', 'type': 'str'}, - 'function_app_id': {'key': 'properties.functionAppId', 'type': 'str'}, - 'script_root_path_href': {'key': 'properties.scriptRootPathHref', 'type': 'str'}, - 'script_href': {'key': 'properties.scriptHref', 'type': 'str'}, - 'config_href': {'key': 'properties.configHref', 'type': 'str'}, - 'secrets_file_href': {'key': 'properties.secretsFileHref', 'type': 'str'}, - 'href': {'key': 'properties.href', 'type': 'str'}, - 'config': {'key': 'properties.config', 'type': 'object'}, - 'files': {'key': 'properties.files', 'type': '{str}'}, - 'test_data': {'key': 'properties.testData', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, **kwargs) -> None: - super(FunctionEnvelope, self).__init__(kind=kind, **kwargs) - self.function_envelope_name = None - self.function_app_id = None - self.script_root_path_href = script_root_path_href - self.script_href = script_href - self.config_href = config_href - self.secrets_file_href = secrets_file_href - self.href = href - self.config = config - self.files = files - self.test_data = test_data - - -class FunctionSecrets(ProxyOnlyResource): - """Function secrets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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: Secret key. - :type key: str - :param trigger_url: Trigger URL. - :type trigger_url: 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'}, - 'key': {'key': 'properties.key', 'type': 'str'}, - 'trigger_url': {'key': 'properties.triggerUrl', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, key: str=None, trigger_url: str=None, **kwargs) -> None: - super(FunctionSecrets, self).__init__(kind=kind, **kwargs) - self.key = key - self.trigger_url = trigger_url - - -class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.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.v2016_08_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.v2016_08_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2016_08_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2016_08_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: - 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 HostNameSslState(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.v2016_08_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 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.v2016_08_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2016_08_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2016_08_01.models.AzureBlobStorageHttpLogsConfig - """ - - _attribute_map = { - 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, - 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, - } - - def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: - super(HttpLogsConfig, self).__init__(**kwargs) - self.file_system = file_system - self.azure_blob_storage = azure_blob_storage - - -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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) - self.send_key_name = None - self.send_key_value = 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.identifier_id = identifier_id - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: - super(IpSecurityRestriction, self).__init__(**kwargs) - self.ip_address = ip_address - self.subnet_mask = subnet_mask - - -class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: - super(LocalizableString, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2016_08_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 - """ - - _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'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - - -class MigrateMySqlRequest(ProxyOnlyResource): - """MySQL migration request. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2016_08_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: - 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.v2016_08_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': 'OperationStatus'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: - 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.v2016_08_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: str=None, **kwargs) -> None: - super(MSDeployLog, self).__init__(kind=kind, **kwargs) - self.entries = None - - -class MSDeployLogEntry(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2016_08_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': 'MSDeployLogEntryType'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - 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.v2016_08_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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: str=None, **kwargs) -> None: - 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 NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - 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.v2016_08_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2016_08_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: str=None, **kwargs) -> None: - 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 Operation(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.v2016_08_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2016_08_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: - 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 PerfMonResponse(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.v2016_08_01.models.PerfMonSet - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'PerfMonSet'}, - } - - def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: - super(PerfMonResponse, self).__init__(**kwargs) - self.code = code - self.message = message - self.data = data - - -class PerfMonSample(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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 - :param core_count: Core Count of worker. Not a data member - :type core_count: int - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'iso-8601'}, - 'instance_name': {'key': 'instanceName', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - 'core_count': {'key': 'coreCount', 'type': 'int'}, - } - - def __init__(self, *, time=None, instance_name: str=None, value: float=None, core_count: int=None, **kwargs) -> None: - super(PerfMonSample, self).__init__(**kwargs) - self.time = time - self.instance_name = instance_name - self.value = value - self.core_count = core_count - - -class PerfMonSet(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 - :param end_time: End time of the period. - :type end_time: 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.v2016_08_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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: 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 premier_add_on_name: Premier add on Name. - :type premier_add_on_name: str - :param premier_add_on_location: Premier add on Location. - :type premier_add_on_location: str - :param premier_add_on_tags: Premier add on Tags. - :type premier_add_on_tags: dict[str, 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'}, - 'premier_add_on_name': {'key': 'properties.name', 'type': 'str'}, - 'premier_add_on_location': {'key': 'properties.location', 'type': 'str'}, - 'premier_add_on_tags': {'key': 'properties.tags', 'type': '{str}'}, - 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, - 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, premier_add_on_name: str=None, premier_add_on_location: str=None, premier_add_on_tags=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - super(PremierAddOn, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.sku = sku - self.product = product - self.vendor = vendor - self.premier_add_on_name = premier_add_on_name - self.premier_add_on_location = premier_add_on_location - self.premier_add_on_tags = premier_add_on_tags - self.marketplace_publisher = marketplace_publisher - self.marketplace_offer = marketplace_offer - - -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 - :param process_info_id: ARM Identifier for deployment. - :type process_info_id: int - :param process_info_name: Deployment name. - :type process_info_name: str - :param href: HRef URI. - :type href: str - :param mini_dump: Minidump URI. - :type mini_dump: 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.v2016_08_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.v2016_08_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 - :param total_processor_time: Total CPU time. - :type total_processor_time: str - :param user_processor_time: User CPU time. - :type user_processor_time: str - :param privileged_processor_time: Privileged CPU time. - :type privileged_processor_time: str - :param working_set64: Working set. - :type working_set64: long - :param peak_working_set64: Peak working set. - :type peak_working_set64: long - :param private_memory_size64: Private memory size. - :type private_memory_size64: long - :param virtual_memory_size64: Virtual memory size. - :type virtual_memory_size64: long - :param peak_virtual_memory_size64: Peak virtual memory usage. - :type peak_virtual_memory_size64: long - :param paged_system_memory_size64: Paged system memory. - :type paged_system_memory_size64: long - :param nonpaged_system_memory_size64: Non-paged system memory. - :type nonpaged_system_memory_size64: long - :param paged_memory_size64: Paged memory. - :type paged_memory_size64: long - :param peak_paged_memory_size64: Peak paged memory. - :type peak_paged_memory_size64: long - :param time_stamp: Time stamp. - :type time_stamp: 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_web_job: Is this a Web Job? - :type is_web_job: bool - :param description: Description of process. - :type description: 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'}, - 'process_info_id': {'key': 'properties.id', 'type': 'int'}, - 'process_info_name': {'key': 'properties.name', 'type': 'str'}, - 'href': {'key': 'properties.href', 'type': 'str'}, - 'mini_dump': {'key': 'properties.miniDump', 'type': 'str'}, - 'is_profile_running': {'key': 'properties.isProfileRunning', 'type': 'bool'}, - 'is_iis_profile_running': {'key': 'properties.isIisProfileRunning', 'type': 'bool'}, - 'iis_profile_timeout_in_seconds': {'key': 'properties.iisProfileTimeoutInSeconds', '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.openFileHandles', 'type': '[str]'}, - 'modules': {'key': 'properties.modules', 'type': '[ProcessModuleInfo]'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'command_line': {'key': 'properties.commandLine', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'handle_count': {'key': 'properties.handleCount', 'type': 'int'}, - 'module_count': {'key': 'properties.moduleCount', 'type': 'int'}, - 'thread_count': {'key': 'properties.threadCount', 'type': 'int'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, - 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, - 'privileged_processor_time': {'key': 'properties.privilegedProcessorTime', 'type': 'str'}, - 'working_set64': {'key': 'properties.workingSet64', 'type': 'long'}, - 'peak_working_set64': {'key': 'properties.peakWorkingSet64', 'type': 'long'}, - 'private_memory_size64': {'key': 'properties.privateMemorySize64', 'type': 'long'}, - 'virtual_memory_size64': {'key': 'properties.virtualMemorySize64', 'type': 'long'}, - 'peak_virtual_memory_size64': {'key': 'properties.peakVirtualMemorySize64', 'type': 'long'}, - 'paged_system_memory_size64': {'key': 'properties.pagedSystemMemorySize64', 'type': 'long'}, - 'nonpaged_system_memory_size64': {'key': 'properties.nonpagedSystemMemorySize64', 'type': 'long'}, - 'paged_memory_size64': {'key': 'properties.pagedMemorySize64', 'type': 'long'}, - 'peak_paged_memory_size64': {'key': 'properties.peakPagedMemorySize64', 'type': 'long'}, - 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, - 'environment_variables': {'key': 'properties.environmentVariables', 'type': '{str}'}, - 'is_scm_site': {'key': 'properties.isScmSite', 'type': 'bool'}, - 'is_web_job': {'key': 'properties.isWebJob', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, process_info_id: int=None, process_info_name: str=None, href: str=None, mini_dump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, privileged_processor_time: str=None, working_set64: int=None, peak_working_set64: int=None, private_memory_size64: int=None, virtual_memory_size64: int=None, peak_virtual_memory_size64: int=None, paged_system_memory_size64: int=None, nonpaged_system_memory_size64: int=None, paged_memory_size64: int=None, peak_paged_memory_size64: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_web_job: bool=None, description: str=None, **kwargs) -> None: - super(ProcessInfo, self).__init__(kind=kind, **kwargs) - self.process_info_id = process_info_id - self.process_info_name = process_info_name - self.href = href - self.mini_dump = mini_dump - 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_processor_time = total_processor_time - self.user_processor_time = user_processor_time - self.privileged_processor_time = privileged_processor_time - self.working_set64 = working_set64 - self.peak_working_set64 = peak_working_set64 - self.private_memory_size64 = private_memory_size64 - self.virtual_memory_size64 = virtual_memory_size64 - self.peak_virtual_memory_size64 = peak_virtual_memory_size64 - self.paged_system_memory_size64 = paged_system_memory_size64 - self.nonpaged_system_memory_size64 = nonpaged_system_memory_size64 - self.paged_memory_size64 = paged_memory_size64 - self.peak_paged_memory_size64 = peak_paged_memory_size64 - self.time_stamp = time_stamp - self.environment_variables = environment_variables - self.is_scm_site = is_scm_site - self.is_web_job = is_web_job - self.description = description - - -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.baseAddress', 'type': 'str'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'href': {'key': 'properties.href', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'module_memory_size': {'key': 'properties.moduleMemorySize', 'type': 'int'}, - 'file_version': {'key': 'properties.fileVersion', 'type': 'str'}, - 'file_description': {'key': 'properties.fileDescription', 'type': 'str'}, - 'product': {'key': 'properties.product', 'type': 'str'}, - 'product_version': {'key': 'properties.productVersion', 'type': 'str'}, - 'is_debug': {'key': 'properties.isDebug', 'type': 'bool'}, - 'language': {'key': 'properties.language', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: - 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 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 - :param process_thread_info_id: ARM Identifier for deployment. - :type process_thread_info_id: 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 - :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 priviledged_processor_time: Privileged processor time. - :type priviledged_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}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'process_thread_info_id': {'key': 'properties.id', 'type': 'int'}, - 'href': {'key': 'properties.href', 'type': 'str'}, - 'process': {'key': 'properties.process', 'type': 'str'}, - 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, - 'current_priority': {'key': 'properties.currentPriority', 'type': 'int'}, - 'priority_level': {'key': 'properties.priorityLevel', 'type': 'str'}, - 'base_priority': {'key': 'properties.basePriority', 'type': 'int'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, - 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, - 'priviledged_processor_time': {'key': 'properties.priviledgedProcessorTime', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'wait_reason': {'key': 'properties.waitReason', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, process_thread_info_id: int=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, priviledged_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: - super(ProcessThreadInfo, self).__init__(kind=kind, **kwargs) - self.process_thread_info_id = process_thread_info_id - 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.priviledged_processor_time = priviledged_processor_time - self.state = state - self.wait_reason = wait_reason - - -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.v2016_08_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': 'PublicCertificateLocation'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: - super(PublicCertificate, self).__init__(kind=kind, **kwargs) - self.blob = blob - self.public_certificate_location = public_certificate_location - self.thumbprint = None - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: - 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 RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -class ResourceMetric(Model): - """Object representing a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of metric. - :vartype name: ~azure.mgmt.web.v2016_08_01.models.ResourceMetricName - :ivar unit: Metric unit. - :vartype unit: str - :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D - :vartype time_grain: str - :ivar start_time: Metric start time. - :vartype start_time: datetime - :ivar end_time: Metric end time. - :vartype end_time: datetime - :ivar resource_id: Metric resource Id. - :vartype resource_id: str - :ivar id: Resource Id. - :vartype id: str - :ivar metric_values: Metric values. - :vartype metric_values: - list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricValue] - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricProperty] - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'id': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'ResourceMetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetric, self).__init__(**kwargs) - self.name = None - self.unit = None - self.time_grain = None - self.start_time = None - self.end_time = None - self.resource_id = None - self.id = None - self.metric_values = None - self.properties = None - - -class ResourceMetricAvailability(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) -> None: - 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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2016_08_01.models.ResourceMetricName - :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.v2016_08_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ResourceMetricProperty(Model): - """Resource metric property. - - :param key: Key for resource metric property. - :type key: str - :param value: Value of pair. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: - super(ResourceMetricProperty, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ResourceMetricValue(Model): - """Value of resource metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Value timestamp. - :vartype timestamp: str - :ivar average: Value average. - :vartype average: float - :ivar minimum: Value minimum. - :vartype minimum: float - :ivar maximum: Value maximum. - :vartype maximum: float - :ivar total: Value total. - :vartype total: float - :ivar count: Value count. - :vartype count: float - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_08_01.models.ResourceMetricProperty] - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'average': {'readonly': True}, - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'total': {'readonly': True}, - 'count': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'average': {'key': 'average', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricValue, self).__init__(**kwargs) - self.timestamp = None - self.average = None - self.minimum = None - self.maximum = None - self.total = None - self.count = None - self.properties = None - - -class RestoreRequest(ProxyOnlyResource): - """Description of a restore request. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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.v2016_08_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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'. Default value: "Default" . - :type operation_type: str or - ~azure.mgmt.web.v2016_08_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, - 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, - } - - def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: - 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 RestoreResponse(ProxyOnlyResource): - """Response for an app 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 - :ivar operation_id: When server starts the restore process, it will return - an operation ID identifying that particular restore 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: str=None, **kwargs) -> None: - super(RestoreResponse, self).__init__(kind=kind, **kwargs) - self.operation_id = 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: Resource tags. - :type tags: dict[str, str] - :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.v2016_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2016_08_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.v2016_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2016_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2016_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2016_08_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2016_08_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2016_08_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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.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.host_names_disabled = host_names_disabled - 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.snapshot_info = snapshot_info - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = https_only - self.identity = identity - - -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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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.v2016_08_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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' - :type default_provider: str or - ~azure.mgmt.web.v2016_08_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 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 allowed_audiences: Allowed audience values to consider when - validating JWTs issued by - Azure Active Directory. Note that the 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - 'issuer': {'key': 'properties.issuer', 'type': 'str'}, - 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, - 'additional_login_params': {'key': 'properties.additionalLoginParams', 'type': '[str]'}, - 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, - 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, - 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, - 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, - 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, - 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, - 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, - 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, - 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, - 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, - 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, issuer: str=None, allowed_audiences=None, additional_login_params=None, google_client_id: str=None, google_client_secret: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_oauth_scopes=None, **kwargs) -> None: - super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.runtime_version = runtime_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.issuer = issuer - self.allowed_audiences = allowed_audiences - self.additional_login_params = additional_login_params - self.google_client_id = google_client_id - self.google_client_secret = google_client_secret - self.google_oauth_scopes = google_oauth_scopes - self.facebook_app_id = facebook_app_id - self.facebook_app_secret = facebook_app_secret - self.facebook_oauth_scopes = facebook_oauth_scopes - self.twitter_consumer_key = twitter_consumer_key - self.twitter_consumer_secret = twitter_consumer_secret - self.microsoft_account_client_id = microsoft_account_client_id - self.microsoft_account_client_secret = microsoft_account_client_secret - self.microsoft_account_oauth_scopes = microsoft_account_oauth_scopes - - -class SiteCloneability(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.v2016_08_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2016_08_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.v2016_08_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2016_08_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, - } - - def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: - 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(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: str=None, description: str=None, **kwargs) -> None: - super(SiteCloneabilityCriterion, self).__init__(**kwargs) - self.name = name - self.description = description - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2016_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2016_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2016_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2016_08_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' - :type scm_type: str or ~azure.mgmt.web.v2016_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2016_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2016_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2016_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2016_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2016_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2016_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2016_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2016_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2016_08_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2016_08_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2016_08_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: - 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.linux_fx_version = linux_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.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.cors = cors - self.push = push - self.api_definition = api_definition - self.auto_swap_slot_name = auto_swap_slot_name - self.local_my_sql_enabled = local_my_sql_enabled - self.ip_security_restrictions = ip_security_restrictions - self.http20_enabled = http20_enabled - self.min_tls_version = min_tls_version - - -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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2016_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2016_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2016_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2016_08_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' - :type scm_type: str or ~azure.mgmt.web.v2016_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2016_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2016_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2016_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2016_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2016_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2016_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2016_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2016_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2016_08_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2016_08_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2016_08_01.models.SupportedTlsVersions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'properties.linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, - 'push': {'key': 'properties.push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'properties.autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: - 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.linux_fx_version = linux_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.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.cors = cors - self.push = push - self.api_definition = api_definition - self.auto_swap_slot_name = auto_swap_slot_name - self.local_my_sql_enabled = local_my_sql_enabled - self.ip_security_restrictions = ip_security_restrictions - self.http20_enabled = http20_enabled - self.min_tls_version = min_tls_version - - -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 - :ivar site_configuration_snapshot_info_id: The id of the snapshot - :vartype site_configuration_snapshot_info_id: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'time': {'readonly': True}, - 'site_configuration_snapshot_info_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'}, - 'site_configuration_snapshot_info_id': {'key': 'properties.id', 'type': 'int'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) - self.time = None - self.site_configuration_snapshot_info_id = 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 site_extension_info_id: Site extension ID. - :type site_extension_info_id: str - :param title: Site extension title. - :type title: str - :param site_extension_info_type: Site extension type. Possible values - include: 'Gallery', 'WebRoot' - :type site_extension_info_type: str or - ~azure.mgmt.web.v2016_08_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 installation_args: Installer command line parameters. - :type installation_args: str - :param published_date_time: Published timestamp. - :type published_date_time: datetime - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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'}, - 'site_extension_info_id': {'key': 'properties.id', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'site_extension_info_type': {'key': 'properties.type', 'type': 'SiteExtensionType'}, - 'summary': {'key': 'properties.summary', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'extension_url': {'key': 'properties.extensionUrl', 'type': 'str'}, - 'project_url': {'key': 'properties.projectUrl', 'type': 'str'}, - 'icon_url': {'key': 'properties.iconUrl', 'type': 'str'}, - 'license_url': {'key': 'properties.licenseUrl', 'type': 'str'}, - 'feed_url': {'key': 'properties.feedUrl', 'type': 'str'}, - 'authors': {'key': 'properties.authors', 'type': '[str]'}, - 'installation_args': {'key': 'properties.installationArgs', 'type': 'str'}, - 'published_date_time': {'key': 'properties.publishedDateTime', 'type': 'iso-8601'}, - 'download_count': {'key': 'properties.downloadCount', 'type': 'int'}, - 'local_is_latest_version': {'key': 'properties.localIsLatestVersion', 'type': 'bool'}, - 'local_path': {'key': 'properties.localPath', 'type': 'str'}, - 'installed_date_time': {'key': 'properties.installedDateTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'comment': {'key': 'properties.comment', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, site_extension_info_id: str=None, title: str=None, site_extension_info_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installation_args: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: - super(SiteExtensionInfo, self).__init__(kind=kind, **kwargs) - self.site_extension_info_id = site_extension_info_id - self.title = title - self.site_extension_info_type = site_extension_info_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.installation_args = installation_args - 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 SiteInstance(ProxyOnlyResource): - """Instance 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 site_instance_name: Name of instance. - :vartype site_instance_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'site_instance_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'}, - 'site_instance_name': {'key': 'properties.name', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(SiteInstance, self).__init__(kind=kind, **kwargs) - self.site_instance_name = None - - -class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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.v2016_08_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2016_08_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2016_08_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2016_08_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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: - 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - 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 - :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.v2016_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2016_08_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.v2016_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2016_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2016_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2016_08_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2016_08_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: 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}, - } - - _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'}, - 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, - 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, - 'usage_state': {'key': 'properties.usageState', 'type': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, **kwargs) -> None: - super(SitePatchResource, self).__init__(kind=kind, **kwargs) - 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.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.host_names_disabled = host_names_disabled - 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.snapshot_info = snapshot_info - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = https_only - - -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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: - 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 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, - 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, - 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: - super(SiteSourceControl, self).__init__(kind=kind, **kwargs) - self.repo_url = repo_url - self.branch = branch - self.is_manual_integration = is_manual_integration - self.deployment_rollback_enabled = deployment_rollback_enabled - self.is_mercurial = is_mercurial - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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.v2016_08_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.v2016_08_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 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] - """ - - _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]'}, - } - - def __init__(self, *, kind: str=None, connection_string_names=None, app_setting_names=None, **kwargs) -> None: - super(SlotConfigNamesResource, self).__init__(kind=kind, **kwargs) - self.connection_string_names = connection_string_names - self.app_setting_names = app_setting_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 slot_difference_type: Type of the difference: Information, Warning - or Error. - :vartype slot_difference_type: 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}, - 'slot_difference_type': {'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'}, - 'slot_difference_type': {'key': 'properties.type', '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: str=None, **kwargs) -> None: - super(SlotDifference, self).__init__(kind=kind, **kwargs) - self.slot_difference_type = 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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - 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: str=None, **kwargs) -> None: - super(Snapshot, self).__init__(kind=kind, **kwargs) - self.time = None - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: - super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) - self.snapshot_time = snapshot_time - self.recovery_target = recovery_target - self.overwrite = overwrite - self.recover_configuration = recover_configuration - self.ignore_conflicting_host_names = ignore_conflicting_host_names - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: - super(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = location - self.id = id - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, properties=None, **kwargs) -> None: - super(StringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -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 triggered_job_runs: List of triggered web job runs. - :type triggered_job_runs: - list[~azure.mgmt.web.v2016_08_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'}, - 'triggered_job_runs': {'key': 'properties.triggeredJobRuns', 'type': '[TriggeredJobRun]'}, - } - - def __init__(self, *, kind: str=None, triggered_job_runs=None, **kwargs) -> None: - super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) - self.triggered_job_runs = triggered_job_runs - - -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 triggered_job_run_id: Job ID. - :type triggered_job_run_id: str - :ivar triggered_job_run_name: Job name. - :vartype triggered_job_run_name: str - :param status: Job status. Possible values include: 'Success', 'Failed', - 'Error' - :type status: str or - ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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}, - 'triggered_job_run_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'}, - 'triggered_job_run_id': {'key': 'properties.id', 'type': 'str'}, - 'triggered_job_run_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TriggeredWebJobStatus'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'duration': {'key': 'properties.duration', 'type': 'str'}, - 'output_url': {'key': 'properties.outputUrl', 'type': 'str'}, - 'error_url': {'key': 'properties.errorUrl', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'job_name': {'key': 'properties.jobName', 'type': 'str'}, - 'trigger': {'key': 'properties.trigger', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, triggered_job_run_id: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: - super(TriggeredJobRun, self).__init__(kind=kind, **kwargs) - self.triggered_job_run_id = triggered_job_run_id - self.triggered_job_run_name = None - 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.v2016_08_01.models.TriggeredJobRun - :param history_url: History URL. - :type history_url: str - :param scheduler_logs_url: Scheduler Logs URL. - :type scheduler_logs_url: str - :ivar triggered_web_job_name: Job name. Used as job identifier in ARM - resource URI. - :vartype triggered_web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', - 'Triggered' - :type job_type: str or ~azure.mgmt.web.v2016_08_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}, - 'triggered_web_job_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'}, - 'latest_run': {'key': 'properties.latestRun', 'type': 'TriggeredJobRun'}, - 'history_url': {'key': 'properties.historyUrl', 'type': 'str'}, - 'scheduler_logs_url': {'key': 'properties.schedulerLogsUrl', 'type': 'str'}, - 'triggered_web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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.triggered_web_job_name = None - self.run_command = run_command - self.url = url - self.extra_info_url = extra_info_url - self.job_type = job_type - self.error = error - self.using_sdk = using_sdk - self.settings = settings - - -class User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: - super(User, self).__init__(kind=kind, **kwargs) - self.user_name = user_name - 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 - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2016_08_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2016_08_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: - 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 - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2016_08_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'}, - 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - super(VnetRoute, self).__init__(kind=kind, **kwargs) - self.vnet_route_name = vnet_route_name - self.start_address = start_address - self.end_address = end_address - self.route_type = route_type - - -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 - :ivar web_job_name: Job name. Used as job identifier in ARM resource URI. - :vartype web_job_name: 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 job_type: Job type. Possible values include: 'Continuous', - 'Triggered' - :type job_type: str or ~azure.mgmt.web.v2016_08_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}, - 'web_job_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'}, - 'web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - super(WebJob, self).__init__(kind=kind, **kwargs) - self.web_job_name = None - self.run_command = run_command - self.url = url - self.extra_info_url = extra_info_url - self.job_type = job_type - self.error = error - self.using_sdk = using_sdk - self.settings = settings diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_paged_models.py deleted file mode 100644 index d1ae9d02553..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_paged_models.py +++ /dev/null @@ -1,326 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SitePaged(Paged): - """ - A paging container for iterating over a list of :class:`Site ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Site]'} - } - - def __init__(self, *args, **kwargs): - - super(SitePaged, self).__init__(*args, **kwargs) -class BackupItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupItem]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupItemPaged, self).__init__(*args, **kwargs) -class SiteConfigResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) -class SiteConfigurationSnapshotInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) -class ContinuousWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`ContinuousWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) -class DeploymentPaged(Paged): - """ - A paging container for iterating over a list of :class:`Deployment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Deployment]'} - } - - def __init__(self, *args, **kwargs): - - super(DeploymentPaged, self).__init__(*args, **kwargs) -class IdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`Identifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Identifier]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentifierPaged, self).__init__(*args, **kwargs) -class FunctionEnvelopePaged(Paged): - """ - A paging container for iterating over a list of :class:`FunctionEnvelope ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} - } - - def __init__(self, *args, **kwargs): - - super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) -class HostNameBindingPaged(Paged): - """ - A paging container for iterating over a list of :class:`HostNameBinding ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} - } - - def __init__(self, *args, **kwargs): - - super(HostNameBindingPaged, self).__init__(*args, **kwargs) -class SiteInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteInstancePaged, self).__init__(*args, **kwargs) -class ProcessInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessInfoPaged, self).__init__(*args, **kwargs) -class ProcessModuleInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessModuleInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) -class ProcessThreadInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessThreadInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) -class ResourceMetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) -class ResourceMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricPaged, self).__init__(*args, **kwargs) -class PerfMonResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`PerfMonResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(PerfMonResponsePaged, self).__init__(*args, **kwargs) -class PublicCertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`PublicCertificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} - } - - def __init__(self, *args, **kwargs): - - super(PublicCertificatePaged, self).__init__(*args, **kwargs) -class SiteExtensionInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteExtensionInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) -class SlotDifferencePaged(Paged): - """ - A paging container for iterating over a list of :class:`SlotDifference ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SlotDifference]'} - } - - def __init__(self, *args, **kwargs): - - super(SlotDifferencePaged, self).__init__(*args, **kwargs) -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) -class TriggeredWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) -class TriggeredJobHistoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredJobHistory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) -class CsmUsageQuotaPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmUsageQuota ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) -class WebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(WebJobPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_web_site_management_client_enums.py deleted file mode 100644 index d8fd32b4088..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class LogLevel(str, Enum): - - off = "Off" - verbose = "Verbose" - information = "Information" - warning = "Warning" - error = "Error" - - -class BackupItemStatus(str, Enum): - - 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 DatabaseType(str, Enum): - - sql_azure = "SqlAzure" - my_sql = "MySql" - local_my_sql = "LocalMySql" - postgre_sql = "PostgreSql" - - -class FrequencyUnit(str, Enum): - - day = "Day" - hour = "Hour" - - -class BackupRestoreOperationType(str, Enum): - - default = "Default" - clone = "Clone" - relocation = "Relocation" - snapshot = "Snapshot" - - -class ConnectionStringType(str, Enum): - - 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(str, Enum): - - initializing = "Initializing" - starting = "Starting" - running = "Running" - pending_restart = "PendingRestart" - stopped = "Stopped" - - -class WebJobType(str, Enum): - - continuous = "Continuous" - triggered = "Triggered" - - -class PublishingProfileFormat(str, Enum): - - file_zilla3 = "FileZilla3" - web_deploy = "WebDeploy" - ftp = "Ftp" - - -class DnsVerificationTestResult(str, Enum): - - passed = "Passed" - failed = "Failed" - skipped = "Skipped" - - -class AzureResourceType(str, Enum): - - website = "Website" - traffic_manager = "TrafficManager" - - -class CustomHostNameDnsRecordType(str, Enum): - - cname = "CName" - a = "A" - - -class HostNameType(str, Enum): - - verified = "Verified" - managed = "Managed" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class MSDeployLogEntryType(str, Enum): - - message = "Message" - warning = "Warning" - error = "Error" - - -class MSDeployProvisioningState(str, Enum): - - accepted = "accepted" - running = "running" - succeeded = "succeeded" - failed = "failed" - canceled = "canceled" - - -class MySqlMigrationType(str, Enum): - - local_to_remote = "LocalToRemote" - remote_to_local = "RemoteToLocal" - - -class OperationStatus(str, Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" - - -class RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class PublicCertificateLocation(str, Enum): - - current_user_my = "CurrentUserMy" - local_machine_my = "LocalMachineMy" - unknown = "Unknown" - - -class UnauthenticatedClientAction(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - - -class BuiltInAuthenticationProvider(str, Enum): - - azure_active_directory = "AzureActiveDirectory" - facebook = "Facebook" - google = "Google" - microsoft_account = "MicrosoftAccount" - twitter = "Twitter" - - -class CloneAbilityResult(str, Enum): - - cloneable = "Cloneable" - partially_cloneable = "PartiallyCloneable" - not_cloneable = "NotCloneable" - - -class ScmType(str, Enum): - - 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" - - -class ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class SiteExtensionType(str, Enum): - - gallery = "Gallery" - web_root = "WebRoot" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class TriggeredWebJobStatus(str, Enum): - - success = "Success" - failed = "Failed" - error = "Error" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/__init__.py deleted file mode 100644 index caab7b18200..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._web_apps_operations import WebAppsOperations - -__all__ = [ - 'WebAppsOperations', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/_web_apps_operations.py deleted file mode 100644 index 738fbf1fdd2..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/operations/_web_apps_operations.py +++ /dev/null @@ -1,23095 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class WebAppsOperations(object): - """WebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all apps for a subscription. - - Get all apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SitePaged[~azure.mgmt.web.v2016_08_01.models.Site] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} - - def list_by_resource_group( - self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): - """Gets all web, mobile, and API apps in the specified resource group. - - 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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SitePaged[~azure.mgmt.web.v2016_08_01.models.Site] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - if include_slots is not None: - query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the details of a web, mobile, or API app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. - - 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.v2016_08_01.models.Site - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.Site]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def delete( - self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """Deletes a web, mobile, or API app, or one of the deployment slots. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. - - 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.v2016_08_01.models.SitePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def analyze_custom_hostname( - self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): - """Analyze a custom hostname. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.analyze_custom_hostname.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} - - def apply_slot_config_to_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Applies the configuration settings from the target slot onto the - current slot. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_config_to_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} - - def backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """Creates a backup of an app. - - 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.v2016_08_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} - - def list_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets existing backups of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2016_08_01.models.BackupItemPaged[~azure.mgmt.web.v2016_08_01.models.BackupItem] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} - - def discover_restore( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """Discovers an existing app backup that can be restored from a blob in - Azure storage. - - Discovers an existing app backup that can be restored from a 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: A RestoreRequest object that includes Azure storage - URL and blog name for discovery of backup. - :type request: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.discover_restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover'} - - def get_backup_status( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """Gets a backup of an app by its ID. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_backup_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def delete_backup( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """Deletes a backup of an app by its ID. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def list_backup_status_secrets( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - """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. - - 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.v2016_08_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_backup_status_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} - - - def _restore_initial( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RestoreResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restore( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a specific backup to another app (or deployment slot, if - specified). - - 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.v2016_08_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RestoreResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.RestoreResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.RestoreResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RestoreResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} - - def list_configurations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List the configurations of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} - - def update_application_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the application settings of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} - - def list_application_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the application settings of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} - - def update_auth_settings( - self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): - """Updates the Authentication / Authorization settings associated with web - app. - - 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.v2016_08_01.models.SiteAuthSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} - - def get_auth_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the Authentication/Authorization settings of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} - - def update_backup_configuration( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """Updates the backup configuration of an app. - - 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.v2016_08_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def delete_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Deletes the backup configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def get_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the backup configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} - - def update_connection_strings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the connection strings of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2016_08_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} - - def list_connection_strings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the connection strings of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the logging configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_diagnostic_logs_config( - self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): - """Updates the logging configuration of an app. - - 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.v2016_08_01.models.SiteLogsConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_diagnostic_logs_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_metadata( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the metadata of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} - - def list_metadata( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the metadata of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} - - - def _list_publishing_credentials_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """Gets the Git/FTP publishing credentials of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.User]] - :raises: :class:`CloudError` - """ - raw_result = self._list_publishing_credentials_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} - - def update_site_push_settings( - self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): - """Updates the Push settings associated with web app. - - 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.v2016_08_01.models.PushSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} - - def list_site_push_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the Push settings associated with web app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} - - def list_slot_configuration_names( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the names of app settings and connection strings that stick to the - slot (not swapped). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def update_slot_configuration_names( - self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): - """Updates the names of application settings and connection string that - remain with the slot during swap operation. - - 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.v2016_08_01.models.SlotConfigNamesResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def get_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the configuration of an app, such as platform version and bitness, - default documents, virtual applications, Always On, etc. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def create_or_update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. - - 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.v2016_08_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. - - 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.v2016_08_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def list_configuration_snapshot_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets a list of web app configuration snapshots identifiers. Each - element of the list contains a timestamp and the ID of the snapshot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} - - def get_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """Gets a snapshot of the configuration of an app at a previous point in - time. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """Reverts the configuration of an app to a previous snapshot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.recover_site_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the last lines of docker logs for the given site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} - - def get_web_site_container_logs_zip( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the ZIP archived docker log files for the given site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs_zip.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} - - def list_continuous_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List continuous web jobs for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2016_08_01.models.ContinuousWebJob] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} - - def get_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Gets a continuous web job by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Delete a continuous web job by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Start a continuous web job for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Stop a continuous web job for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List deployments for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2016_08_01.models.DeploymentPaged[~azure.mgmt.web.v2016_08_01.models.Deployment] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} - - def get_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """Get a deployment by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def create_deployment( - self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): - """Create a deployment for an app, or a deployment slot. - - 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.v2016_08_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def delete_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """Delete a deployment by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def list_deployment_log( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """List deployment log for specific deployment for an app, or a deployment - slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_deployment_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} - - def list_domain_ownership_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Lists ownership identifiers for domain associated with web app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2016_08_01.models.IdentifierPaged[~azure.mgmt.web.v2016_08_01.models.Identifier] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """Get domain ownership identifier for web app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. - - 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 kind: Kind of resource. - :type kind: str - :param identifier_id: String representation of the identity. - :type identifier_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """Deletes a domain ownership identifier for a web app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. - - 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 kind: Kind of resource. - :type kind: str - :param identifier_id: String representation of the identity. - :type identifier_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - - # Construct URL - url = self.update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the status of the last MSDeploy operation. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_initial( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. - - 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.v2016_08_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus]] - :raises: :class:`CloudError` - """ - raw_result = self._create_ms_deploy_operation_initial( - resource_group_name=resource_group_name, - name=name, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - def get_ms_deploy_log( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} - - def list_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List the functions for a web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} - - def get_functions_admin_token( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Fetch a short lived token that can be exchanged for a master key. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_functions_admin_token.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} - - def get_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """Get function information by its ID for web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - - def _create_function_initial( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_function( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create function for web site, or a deployment slot. - - 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.v2016_08_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope]] - :raises: :class:`CloudError` - """ - raw_result = self._create_function_initial( - resource_group_name=resource_group_name, - name=name, - function_name=function_name, - function_envelope=function_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def delete_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """Delete a function for web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def list_function_secrets( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """Get function secrets for a function in a web site, or a deployment - slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_function_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} - - def list_host_name_bindings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get hostname bindings for an app or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2016_08_01.models.HostNameBindingPaged[~azure.mgmt.web.v2016_08_01.models.HostNameBinding] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} - - def get_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """Get the named hostname binding for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding( - self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. - - 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.v2016_08_01.models.HostNameBinding - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def delete_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Retrieves a specific Service Bus Hybrid Connection used by this Web - App. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. - - 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.v2016_08_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Removes a Hybrid Connection from this site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. - - 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.v2016_08_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Gets the send key name and value for a Hybrid Connection. - - Gets the send key name and value for a Hybrid Connection. - - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_hybrid_connection_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieves all Service Bus Hybrid Connections used by this Web App. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} - - def list_relay_service_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets hybrid connections configured for an app (or deployment slot, if - specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_relay_service_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} - - def get_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """Gets a hybrid connection configuration by its name. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). - - 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.v2016_08_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def delete_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """Deletes a relay service connection by its name. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). - - 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.v2016_08_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def list_instance_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets all scale-out instances of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteInstance - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SiteInstancePaged[~azure.mgmt.web.v2016_08_01.models.SiteInstance] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} - - def get_instance_ms_deploy_status( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the status of the last MSDeploy operation. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - - def _create_instance_ms_deploy_operation_initial( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. - - 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.v2016_08_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} - - def list_instance_processes( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} - - def get_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} - - def list_instance_process_modules( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module( - self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} - - def list_instance_process_threads( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} - - def get_instance_process_thread( - self, resource_group_name, name, process_id, thread_id, instance_id, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. - - Get thread information by Thread ID for a specific process, in 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 thread_id: TID. - :type thread_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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_thread.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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'), - 'threadId': self._serialize.url("thread_id", thread_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} - - def is_cloneable( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Shows whether an app can be cloned to another resource group or - subscription. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.is_cloneable.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} - - def list_sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """This is to allow calling via powershell and ARM template. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} - - def list_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets all metric definitions of an app (or deployment slot, if - specified). - - Gets all metric definitions 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'} - - def list_metrics( - self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets performance metrics of an app (or deployment slot, if specified). - - Gets performance metrics 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 details: Specify "true" to include metric details in the - response. It is "false" by default. - :type details: bool - :param filter: Return only metrics 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetric] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'} - - - def _migrate_storage_initial( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_storage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_storage( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a web app. - - 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.v2016_08_01.models.StorageMigrationOptions - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StorageMigrationResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.StorageMigrationResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.StorageMigrationResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._migrate_storage_initial( - subscription_name=subscription_name, - resource_group_name=resource_group_name, - name=name, - migration_options=migration_options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} - - - def _migrate_my_sql_initial( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_my_sql.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_my_sql( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Migrates a local (in-app) MySql database to a remote MySql database. - - 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.v2016_08_01.models.MigrateMySqlRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Operation or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.Operation] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.Operation]] - :raises: :class:`CloudError` - """ - raw_result = self._migrate_my_sql_initial( - resource_group_name=resource_group_name, - name=name, - migration_request_envelope=migration_request_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} - - def get_migrate_my_sql_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Returns the status of MySql in app migration, if one is active, and - whether or not MySql in app is enabled. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_migrate_my_sql_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} - - def list_network_features( - self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): - """Gets all network features used by the app (or deployment slot, if - specified). - - 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. This can either be "summary" or - "detailed". - :type view: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_network_features.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} - - def start_web_site_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """Start capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} - - def stop_web_site_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} - - def generate_new_site_publishing_password( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Generates a new publishing password for an app (or deployment slot, if - specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generate_new_site_publishing_password.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} - - def list_perf_mon_counters( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets perfmon counters for web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2016_08_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2016_08_01.models.PerfMonResponse] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} - - def get_site_php_error_log_flag( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets web app's event logs. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_php_error_log_flag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} - - def list_premier_add_ons( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the premier add-ons of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_premier_add_ons.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} - - def get_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """Gets a named add-on of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """Updates a named add-on of an app. - - 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.v2016_08_01.models.PremierAddOn - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.add_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """Delete a premier add-on from an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def list_processes( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} - - def get_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def delete_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def get_process_dump( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} - - def list_process_modules( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} - - def get_process_module( - self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} - - def get_process_thread( - self, resource_group_name, name, process_id, thread_id, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. - - Get thread information by Thread ID for a specific process, in 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 thread_id: TID. - :type thread_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_thread.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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'), - 'threadId': self._serialize.url("thread_id", thread_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} - - def list_public_certificates( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get public certificates for an app or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2016_08_01.models.PublicCertificatePaged[~azure.mgmt.web.v2016_08_01.models.PublicCertificate] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} - - def get_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Get the named public certificate for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate( - self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. - - 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.v2016_08_01.models.PublicCertificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets( - self, resource_group_name, name, format=None, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the publishing profile for an app (or deployment slot, if - specified). - - 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 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.v2016_08_01.models.PublishingProfileFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} - - - def _recover_initial( - self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.recover.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def recover( - self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, polling=True, **operation_config): - """Recovers a web app to a previous snapshot. - - Recovers a web 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 web app. - :type name: str - :param recovery_entity: Snapshot data used for web app recovery. - Snapshot information can be obtained by calling GetDeletedSites or - GetSiteSnapshots API. - :type recovery_entity: - ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._recover_initial( - resource_group_name=resource_group_name, - name=name, - recovery_entity=recovery_entity, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - recover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover'} - - def reset_production_slot_config( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Resets the configuration settings of the current slot if they were - previously modified by calling the API with POST. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_production_slot_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} - - def restart( - self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """Restarts an app (or deployment slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} - - def list_site_extensions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get list of site extensions for a web site, or a deployment slot. - - Get list of site extensions 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} - - def get_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """Get site extension information by its ID for a web site, or a - deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_initial( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Install site extension on a web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo]] - :raises: :class:`CloudError` - """ - raw_result = self._install_site_extension_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def delete_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """Remove a site extension from a web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def list_slots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets an app's deployment slots. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SitePaged[~azure.mgmt.web.v2016_08_01.models.Site] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} - - def get_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the details of a web, mobile, or API app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - - def _create_or_update_slot_initial( - self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') - if skip_custom_domain_verification is not None: - query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') - if force_dns_registration is not None: - query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') - if ttl_in_seconds is not None: - query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_slot( - self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. - - 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.v2016_08_01.models.Site - :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 skip_dns_registration: If true web app hostname is not - registered with DNS on creation. This parameter is - only used for app creation. - :type skip_dns_registration: bool - :param skip_custom_domain_verification: If true, custom (non - *.azurewebsites.net) domains associated with web app are not verified. - :type skip_custom_domain_verification: bool - :param force_dns_registration: If true, web app hostname is force - registered with DNS. - :type force_dns_registration: bool - :param ttl_in_seconds: Time to live in seconds for web app's default - domain name. - :type ttl_in_seconds: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.Site]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - slot=slot, - skip_dns_registration=skip_dns_registration, - skip_custom_domain_verification=skip_custom_domain_verification, - force_dns_registration=force_dns_registration, - ttl_in_seconds=ttl_in_seconds, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def delete_slot( - self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, skip_dns_registration=None, custom_headers=None, raw=False, **operation_config): - """Deletes a web, mobile, or API app, or one of the deployment slots. - - 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 true if the App Service plan - will be empty after app deletion and you want to delete the empty App - Service plan. By default, the empty App Service plan is not deleted. - :type delete_empty_server_farm: bool - :param skip_dns_registration: If true, DNS registration is skipped. - :type skip_dns_registration: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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') - if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def update_slot( - self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): - """Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. - - 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.v2016_08_01.models.SitePatchResource - :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 skip_dns_registration: If true web app hostname is not - registered with DNS on creation. This parameter is - only used for app creation. - :type skip_dns_registration: bool - :param skip_custom_domain_verification: If true, custom (non - *.azurewebsites.net) domains associated with web app are not verified. - :type skip_custom_domain_verification: bool - :param force_dns_registration: If true, web app hostname is force - registered with DNS. - :type force_dns_registration: bool - :param ttl_in_seconds: Time to live in seconds for web app's default - domain name. - :type ttl_in_seconds: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') - if skip_custom_domain_verification is not None: - query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') - if force_dns_registration is not None: - query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') - if ttl_in_seconds is not None: - query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def analyze_custom_hostname_slot( - self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): - """Analyze a custom hostname. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.analyze_custom_hostname_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} - - def apply_slot_configuration_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Applies the configuration settings from the target slot onto the - current slot. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} - - def backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """Creates a backup of an app. - - 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.v2016_08_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} - - def list_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets existing backups of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2016_08_01.models.BackupItemPaged[~azure.mgmt.web.v2016_08_01.models.BackupItem] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} - - def discover_restore_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """Discovers an existing app backup that can be restored from a blob in - Azure storage. - - Discovers an existing app backup that can be restored from a 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: A RestoreRequest object that includes Azure storage - URL and blog name for discovery of backup. - :type request: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.discover_restore_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover'} - - def get_backup_status_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a backup of an app by its ID. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_backup_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def delete_backup_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a backup of an app by its ID. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def list_backup_status_secrets_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """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. - - 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.v2016_08_01.models.BackupRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_backup_status_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} - - - def _restore_slot_initial( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RestoreResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restore_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a specific backup to another app (or deployment slot, if - specified). - - 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.v2016_08_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RestoreResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.RestoreResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.RestoreResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_slot_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RestoreResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} - - def list_configurations_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List the configurations of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} - - def update_application_settings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the application settings of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} - - def list_application_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the application settings of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} - - def update_auth_settings_slot( - self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): - """Updates the Authentication / Authorization settings associated with web - app. - - 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.v2016_08_01.models.SiteAuthSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} - - def get_auth_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Authentication/Authorization settings of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} - - def update_backup_configuration_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """Updates the backup configuration of an app. - - 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.v2016_08_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def delete_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes the backup configuration of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def get_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the backup configuration of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} - - def update_connection_strings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the connection strings of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2016_08_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} - - def list_connection_strings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the connection strings of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the logging configuration of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_diagnostic_logs_config_slot( - self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the logging configuration of an app. - - 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.v2016_08_01.models.SiteLogsConfig - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_diagnostic_logs_config_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_metadata_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the metadata of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} - - def list_metadata_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the metadata of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} - - - def _list_publishing_credentials_slot_initial( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Gets the Git/FTP publishing credentials of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.User]] - :raises: :class:`CloudError` - """ - raw_result = self._list_publishing_credentials_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} - - def update_site_push_settings_slot( - self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): - """Updates the Push settings associated with web app. - - 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.v2016_08_01.models.PushSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} - - def list_site_push_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Push settings associated with web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} - - def get_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the configuration of an app, such as platform version and bitness, - default documents, virtual applications, Always On, etc. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def create_or_update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. - - 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.v2016_08_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. - - 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.v2016_08_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def list_configuration_snapshot_info_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a list of web app configuration snapshots identifiers. Each - element of the list contains a timestamp and the ID of the snapshot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} - - def get_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a snapshot of the configuration of an app at a previous point in - time. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """Reverts the configuration of an app to a previous snapshot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.recover_site_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the last lines of docker logs for the given site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} - - def get_web_site_container_logs_zip_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the ZIP archived docker log files for the given site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs_zip_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} - - def list_continuous_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List continuous web jobs for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2016_08_01.models.ContinuousWebJob] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} - - def get_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a continuous web job by its ID for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a continuous web job by its ID for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Start a continuous web job for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Stop a continuous web job for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List deployments for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2016_08_01.models.DeploymentPaged[~azure.mgmt.web.v2016_08_01.models.Deployment] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} - - def get_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """Get a deployment by its ID for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def create_deployment_slot( - self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): - """Create a deployment for an app, or a deployment slot. - - 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.v2016_08_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def delete_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """Delete a deployment by its ID for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def list_deployment_log_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """List deployment log for specific deployment for an app, or a deployment - slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_deployment_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} - - def list_domain_ownership_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Lists ownership identifiers for domain associated with web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2016_08_01.models.IdentifierPaged[~azure.mgmt.web.v2016_08_01.models.Identifier] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """Get domain ownership identifier for web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. - - 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 kind: Kind of resource. - :type kind: str - :param identifier_id: String representation of the identity. - :type identifier_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a domain ownership identifier for a web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. - - 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 kind: Kind of resource. - :type kind: str - :param identifier_id: String representation of the identity. - :type identifier_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - - # Construct URL - url = self.update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get the status of the last MSDeploy operation. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation_slot( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. - - 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.v2016_08_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus]] - :raises: :class:`CloudError` - """ - raw_result = self._create_ms_deploy_operation_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - def get_ms_deploy_log_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} - - def list_instance_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List the functions for a web site, or a deployment slot. - - 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. If a slot is not specified, - the API deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} - - def get_functions_admin_token_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Fetch a short lived token that can be exchanged for a master key. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_functions_admin_token_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} - - def get_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """Get function information by its ID for web site, or a deployment slot. - - 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. If a slot is not specified, - the API deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - - def _create_instance_function_slot_initial( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_function_slot( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create function for web site, or a deployment slot. - - 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. If a slot is not specified, - the API deletes a deployment for the production slot. - :type slot: str - :param function_envelope: Function details. - :type function_envelope: - ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def delete_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a function for web site, or a deployment slot. - - 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. If a slot is not specified, - the API deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def list_function_secrets_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """Get function secrets for a function in a web site, or a deployment - slot. - - 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. If a slot is not specified, - the API deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_function_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} - - def list_host_name_bindings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get hostname bindings for an app or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2016_08_01.models.HostNameBindingPaged[~azure.mgmt.web.v2016_08_01.models.HostNameBinding] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} - - def get_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """Get the named hostname binding for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding_slot( - self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. - - 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.v2016_08_01.models.HostNameBinding - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def delete_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def get_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """Retrieves a specific Service Bus Hybrid Connection used by this Web - App. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. - - 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.v2016_08_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """Removes a Hybrid Connection from this site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. - - 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.v2016_08_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the send key name and value for a Hybrid Connection. - - Gets the send key name and value for a Hybrid Connection. - - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_hybrid_connection_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_hybrid_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Retrieves all Service Bus Hybrid Connections used by this Web App. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_hybrid_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} - - def list_relay_service_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets hybrid connections configured for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_relay_service_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} - - def get_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a hybrid connection configuration by its name. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). - - 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.v2016_08_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def delete_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a relay service connection by its name. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). - - 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.v2016_08_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2016_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def list_instance_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets all scale-out instances of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteInstance - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SiteInstancePaged[~azure.mgmt.web.v2016_08_01.models.SiteInstance] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} - - def get_instance_ms_deploy_status_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the status of the last MSDeploy operation. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - - def _create_instance_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation_slot( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. - - 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.v2016_08_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_processes_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} - - def get_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_process_modules_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def list_instance_process_threads_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} - - def get_instance_process_thread_slot( - self, resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. - - Get thread information by Thread ID for a specific process, in 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 thread_id: TID. - :type thread_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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_thread_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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'), - 'threadId': self._serialize.url("thread_id", thread_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} - - def is_cloneable_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Shows whether an app can be cloned to another resource group or - subscription. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.is_cloneable_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} - - def list_sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """This is to allow calling via powershell and ARM template. - - 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. If a slot is not specified, - the API will restore a backup of the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} - - def list_metric_definitions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets all metric definitions of an app (or deployment slot, if - specified). - - Gets all metric definitions 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 metric definitions of the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metric_definitions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} - - def list_metrics_slot( - self, resource_group_name, name, slot, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets performance metrics of an app (or deployment slot, if specified). - - Gets performance metrics 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 metrics of the production slot. - :type slot: str - :param details: Specify "true" to include metric details in the - response. It is "false" by default. - :type details: bool - :param filter: Return only metrics 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetric] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metrics_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} - - def get_migrate_my_sql_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Returns the status of MySql in app migration, if one is active, and - whether or not MySql in app is enabled. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_migrate_my_sql_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} - - def list_network_features_slot( - self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): - """Gets all network features used by the app (or deployment slot, if - specified). - - 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. This can either be "summary" or - "detailed". - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_network_features_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} - - def start_web_site_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """Start capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} - - def stop_web_site_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} - - def generate_new_site_publishing_password_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Generates a new publishing password for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generate_new_site_publishing_password_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} - - def list_perf_mon_counters_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets perfmon counters for web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2016_08_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2016_08_01.models.PerfMonResponse] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} - - def get_site_php_error_log_flag_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets web app's event logs. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_php_error_log_flag_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} - - def list_premier_add_ons_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the premier add-ons of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_premier_add_ons_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} - - def get_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a named add-on of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """Updates a named add-on of an app. - - 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.v2016_08_01.models.PremierAddOn - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.add_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a premier add-on from an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def list_processes_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} - - def get_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def delete_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def get_process_dump_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} - - def list_process_modules_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} - - def get_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} - - def get_process_thread_slot( - self, resource_group_name, name, process_id, thread_id, slot, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. - - Get thread information by Thread ID for a specific process, in 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 thread_id: TID. - :type thread_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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_thread_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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'), - 'threadId': self._serialize.url("thread_id", thread_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'} - - def list_public_certificates_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get public certificates for an app or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2016_08_01.models.PublicCertificatePaged[~azure.mgmt.web.v2016_08_01.models.PublicCertificate] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} - - def get_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Get the named public certificate for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate_slot( - self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. - - 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.v2016_08_01.models.PublicCertificate - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets_slot( - self, resource_group_name, name, slot, format=None, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the publishing profile for an app (or deployment slot, if - specified). - - 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 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.v2016_08_01.models.PublishingProfileFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} - - - def _recover_slot_initial( - self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.recover_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def recover_slot( - self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Recovers a web app to a previous snapshot. - - Recovers a web 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 web app. - :type name: str - :param recovery_entity: Snapshot data used for web app recovery. - Snapshot information can be obtained by calling GetDeletedSites or - GetSiteSnapshots API. - :type recovery_entity: - ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._recover_slot_initial( - resource_group_name=resource_group_name, - name=name, - recovery_entity=recovery_entity, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - recover_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover'} - - def reset_slot_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Resets the configuration settings of the current slot if they were - previously modified by calling the API with POST. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} - - def restart_slot( - self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """Restarts an app (or deployment slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.restart_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} - - def list_site_extensions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get list of site extensions for a web site, or a deployment slot. - - Get list of site extensions 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} - - def get_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """Get site extension information by its ID for a web site, or a - deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_slot_initial( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Install site extension on a web site, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo]] - :raises: :class:`CloudError` - """ - raw_result = self._install_site_extension_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def delete_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """Remove a site extension from a web site, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def list_slot_differences_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Get the difference in configuration settings between two web app slots. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SlotDifferencePaged[~azure.mgmt.web.v2016_08_01.models.SlotDifference] - :raises: :class:`CloudError` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} - - - def _swap_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """Swaps two deployment slots of an app. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._swap_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} - - def list_snapshots_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Returns all Snapshots to the user. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SnapshotPaged[~azure.mgmt.web.v2016_08_01.models.Snapshot] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} - - def get_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the source control configuration of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - - def _create_or_update_source_control_slot_initial( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the source control configuration of an app. - - 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.v2016_08_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_source_control_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def delete_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes the source control configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - """Updates the source control configuration of an app. - - 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.v2016_08_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def start_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Starts an app (or deployment slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} - - def stop_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Stops an app (or deployment slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} - - def sync_repository_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Sync web app repository. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_repository_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} - - def sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Syncs function trigger metadata to the scale controller. - - Syncs function trigger metadata to the scale controller. - - :param resource_group_name: Name 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} - - def list_triggered_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List triggered web jobs for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredWebJob] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} - - def get_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a triggered web job by its ID for an app, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a triggered web job by its ID for an app, or a deployment slot. - - 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 a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """List a triggered web job's history for an app, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistory] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a triggered web job's history by its ID for an app, , or a - deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def run_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Run a triggered web job for an app, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.run_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} - - def list_usages_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets the quota usage information of an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2016_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2016_08_01.models.CsmUsageQuota] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} - - def list_vnet_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the virtual networks the app (or deployment slot) is connected to. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2016_08_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_vnet_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} - - def get_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a virtual network the app (or deployment slot) is connected to by - name. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Adds a Virtual Network connection to an app or slot (PUT) or updates - the connection properties (PATCH). - - 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.v2016_08_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a connection from an app (or deployment slot to a named virtual - network. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Adds a Virtual Network connection to an app or slot (PUT) or updates - the connection properties (PATCH). - - 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.v2016_08_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets an app's Virtual Network gateway. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Adds a gateway to a connected Virtual Network (PUT) or updates it - (PATCH). - - 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.v2016_08_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Adds a gateway to a connected Virtual Network (PUT) or updates it - (PATCH). - - 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.v2016_08_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List webjobs for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2016_08_01.models.WebJobPaged[~azure.mgmt.web.v2016_08_01.models.WebJob] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} - - def get_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Get webjob information for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} - - def list_slot_differences_from_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Get the difference in configuration settings between two web app slots. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SlotDifferencePaged[~azure.mgmt.web.v2016_08_01.models.SlotDifference] - :raises: :class:`CloudError` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_from_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} - - - def _swap_slot_with_production_initial( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_with_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_with_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """Swaps two deployment slots of an app. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._swap_slot_with_production_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} - - def list_snapshots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Returns all Snapshots to the user. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2016_08_01.models.SnapshotPaged[~azure.mgmt.web.v2016_08_01.models.Snapshot] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} - - def get_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the source control configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - - def _create_or_update_source_control_initial( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the source control configuration of an app. - - 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.v2016_08_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_source_control_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def delete_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Deletes the source control configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - """Updates the source control configuration of an app. - - 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.v2016_08_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def start( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Starts an app (or deployment slot, if specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} - - def stop( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Stops an app (or deployment slot, if specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} - - def sync_repository( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Sync web app repository. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_repository.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} - - def sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Syncs function trigger metadata to the scale controller. - - Syncs function trigger metadata to the scale controller. - - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of the app. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} - - def list_triggered_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List triggered web jobs for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredWebJob] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} - - def get_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Gets a triggered web job by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Delete a triggered web job by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """List a triggered web job's history for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistory] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history( - self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): - """Gets a triggered web job's history by its ID for an app, , or a - deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} - - def run_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Run a triggered web job for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.run_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets the quota usage information of an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2016_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2016_08_01.models.CsmUsageQuota] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} - - def list_vnet_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the virtual networks the app (or deployment slot) is connected to. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2016_08_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_vnet_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} - - def get_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """Gets a virtual network the app (or deployment slot) is connected to by - name. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Adds a Virtual Network connection to an app or slot (PUT) or updates - the connection properties (PATCH). - - 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.v2016_08_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """Deletes a connection from an app (or deployment slot to a named virtual - network. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Adds a Virtual Network connection to an app or slot (PUT) or updates - the connection properties (PATCH). - - 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.v2016_08_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """Gets an app's Virtual Network gateway. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Adds a gateway to a connected Virtual Network (PUT) or updates it - (PATCH). - - 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.v2016_08_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Adds a gateway to a connected Virtual Network (PUT) or updates it - (PATCH). - - 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.v2016_08_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List webjobs for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2016_08_01.models.WebJobPaged[~azure.mgmt.web.v2016_08_01.models.WebJob] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} - - def get_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Get webjob information for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_08_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_08_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_web_site_management_client.py deleted file mode 100644 index e602176dcbf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/_web_site_management_client.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import AppServiceEnvironmentsOperations -from .operations import AppServicePlansOperations -from . import models - - -class WebSiteManagementClient(SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar app_service_environments: AppServiceEnvironments operations - :vartype app_service_environments: azure.mgmt.web.v2016_09_01.operations.AppServiceEnvironmentsOperations - :ivar app_service_plans: AppServicePlans operations - :vartype app_service_plans: azure.mgmt.web.v2016_09_01.operations.AppServicePlansOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2016-09-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - 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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/__init__.py deleted file mode 100644 index b5cf3731c73..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/__init__.py +++ /dev/null @@ -1,289 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AddressResponse - from ._models_py3 import ApiDefinitionInfo - from ._models_py3 import AppServiceEnvironmentPatchResource - from ._models_py3 import AppServiceEnvironmentResource - from ._models_py3 import AppServicePlan - from ._models_py3 import AppServicePlanPatchResource - from ._models_py3 import AutoHealActions - from ._models_py3 import AutoHealCustomAction - from ._models_py3 import AutoHealRules - from ._models_py3 import AutoHealTriggers - from ._models_py3 import Capability - from ._models_py3 import CloningInfo - from ._models_py3 import ConnStringInfo - from ._models_py3 import CorsSettings - from ._models_py3 import CsmUsageQuota - from ._models_py3 import ErrorEntity - from ._models_py3 import Experiments - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentDiagnostics - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostNameSslState - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import HybridConnectionLimits - from ._models_py3 import Identifier - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import LocalizableString - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import MetricAvailabilily - from ._models_py3 import MetricDefinition - from ._models_py3 import NameValuePair - from ._models_py3 import NetworkAccessControlEntry - from ._models_py3 import Operation - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceMetric - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceMetricName - from ._models_py3 import ResourceMetricProperty - from ._models_py3 import ResourceMetricValue - from ._models_py3 import Site - from ._models_py3 import SiteConfig - from ._models_py3 import SiteLimits - from ._models_py3 import SiteMachineKey - from ._models_py3 import SkuCapacity - from ._models_py3 import SkuDescription - from ._models_py3 import SkuInfo - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import SnapshotRecoveryRequest - from ._models_py3 import SnapshotRecoveryTarget - from ._models_py3 import StampCapacity - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import Usage - from ._models_py3 import User - 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 VnetRoute - from ._models_py3 import WebAppCollection - from ._models_py3 import WorkerPool - from ._models_py3 import WorkerPoolResource -except (SyntaxError, ImportError): - from ._models import AddressResponse - from ._models import ApiDefinitionInfo - from ._models import AppServiceEnvironmentPatchResource - from ._models import AppServiceEnvironmentResource - from ._models import AppServicePlan - from ._models import AppServicePlanPatchResource - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import Capability - from ._models import CloningInfo - from ._models import ConnStringInfo - from ._models import CorsSettings - from ._models import CsmUsageQuota - from ._models import ErrorEntity - from ._models import Experiments - from ._models import HandlerMapping - from ._models import HostingEnvironmentDiagnostics - from ._models import HostingEnvironmentProfile - from ._models import HostNameSslState - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import HybridConnectionLimits - from ._models import Identifier - from ._models import IpSecurityRestriction - from ._models import LocalizableString - from ._models import ManagedServiceIdentity - from ._models import MetricAvailabilily - from ._models import MetricDefinition - from ._models import NameValuePair - from ._models import NetworkAccessControlEntry - from ._models import Operation - from ._models import ProxyOnlyResource - from ._models import PushSettings - from ._models import RampUpRule - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceMetric - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceMetricName - from ._models import ResourceMetricProperty - from ._models import ResourceMetricValue - from ._models import Site - from ._models import SiteConfig - from ._models import SiteLimits - from ._models import SiteMachineKey - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SkuInfo - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import SnapshotRecoveryRequest - from ._models import SnapshotRecoveryTarget - from ._models import StampCapacity - from ._models import StatusCodesBasedTrigger - from ._models import Usage - from ._models import User - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VirtualIPMapping - from ._models import VirtualNetworkProfile - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetRoute - from ._models import WebAppCollection - from ._models import WorkerPool - from ._models import WorkerPoolResource -from ._paged_models import AppServiceEnvironmentResourcePaged -from ._paged_models import AppServicePlanPaged -from ._paged_models import CsmUsageQuotaPaged -from ._paged_models import HybridConnectionPaged -from ._paged_models import ResourceMetricDefinitionPaged -from ._paged_models import ResourceMetricPaged -from ._paged_models import SitePaged -from ._paged_models import SkuInfoPaged -from ._paged_models import StampCapacityPaged -from ._paged_models import StrPaged -from ._paged_models import UsagePaged -from ._paged_models import WorkerPoolResourcePaged -from ._web_site_management_client_enums import ( - ProvisioningState, - HostingEnvironmentStatus, - InternalLoadBalancingMode, - ComputeModeOptions, - WorkerSizeOptions, - AccessControlEntryAction, - RouteType, - ManagedServiceIdentityType, - AutoHealActionType, - ConnectionStringType, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - StatusOptions, - OperationStatus, -) - -__all__ = [ - 'AddressResponse', - 'ApiDefinitionInfo', - 'AppServiceEnvironmentPatchResource', - 'AppServiceEnvironmentResource', - 'AppServicePlan', - 'AppServicePlanPatchResource', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'Capability', - 'CloningInfo', - 'ConnStringInfo', - 'CorsSettings', - 'CsmUsageQuota', - 'ErrorEntity', - 'Experiments', - 'HandlerMapping', - 'HostingEnvironmentDiagnostics', - 'HostingEnvironmentProfile', - 'HostNameSslState', - 'HybridConnection', - 'HybridConnectionKey', - 'HybridConnectionLimits', - 'Identifier', - 'IpSecurityRestriction', - 'LocalizableString', - 'ManagedServiceIdentity', - 'MetricAvailabilily', - 'MetricDefinition', - 'NameValuePair', - 'NetworkAccessControlEntry', - 'Operation', - 'ProxyOnlyResource', - 'PushSettings', - 'RampUpRule', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceMetric', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceMetricName', - 'ResourceMetricProperty', - 'ResourceMetricValue', - 'Site', - 'SiteConfig', - 'SiteLimits', - 'SiteMachineKey', - 'SkuCapacity', - 'SkuDescription', - 'SkuInfo', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'SnapshotRecoveryRequest', - 'SnapshotRecoveryTarget', - 'StampCapacity', - 'StatusCodesBasedTrigger', - 'Usage', - 'User', - 'VirtualApplication', - 'VirtualDirectory', - 'VirtualIPMapping', - 'VirtualNetworkProfile', - 'VnetGateway', - 'VnetInfo', - 'VnetRoute', - 'WebAppCollection', - 'WorkerPool', - 'WorkerPoolResource', - 'AppServiceEnvironmentResourcePaged', - 'StampCapacityPaged', - 'ResourceMetricPaged', - 'WorkerPoolResourcePaged', - 'ResourceMetricDefinitionPaged', - 'SkuInfoPaged', - 'UsagePaged', - 'AppServicePlanPaged', - 'SitePaged', - 'CsmUsageQuotaPaged', - 'StrPaged', - 'HybridConnectionPaged', - 'ProvisioningState', - 'HostingEnvironmentStatus', - 'InternalLoadBalancingMode', - 'ComputeModeOptions', - 'WorkerSizeOptions', - 'AccessControlEntryAction', - 'RouteType', - 'ManagedServiceIdentityType', - 'AutoHealActionType', - 'ConnectionStringType', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'StatusOptions', - 'OperationStatus', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models.py deleted file mode 100644 index 0b12570bcbc..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models.py +++ /dev/null @@ -1,3614 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AddressResponse(Model): - """Describes main public IP address and any extra virtual IPs. - - :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.v2016_09_01.models.VirtualIPMapping] - """ - - _attribute_map = { - 'service_ip_address': {'key': 'serviceIpAddress', 'type': 'str'}, - 'internal_ip_address': {'key': 'internalIpAddress', 'type': 'str'}, - 'outbound_ip_addresses': {'key': 'outboundIpAddresses', 'type': '[str]'}, - 'vip_mappings': {'key': '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 ApiDefinitionInfo(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 ProxyOnlyResource(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 AppServiceEnvironmentPatchResource(ProxyOnlyResource): - """ARM resource for a 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 id: Resource Id. - :vartype 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_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2016_09_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.v2016_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2016_09_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2016_09_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2016_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2016_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2016_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2016_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2016_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) - self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) - self.cluster_settings = kwargs.get('cluster_settings', None) - self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) - - -class Resource(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: 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.get('location', None) - self.type = None - self.tags = kwargs.get('tags', 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: Resource tags. - :type tags: dict[str, str] - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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.v2016_09_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.v2016_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2016_09_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2016_09_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2016_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2016_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2016_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2016_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2016_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentResource, self).__init__(**kwargs) - self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) - self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) - self.cluster_settings = kwargs.get('cluster_settings', None) - self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2016_09_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2016_09_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2016_09_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2016_09_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, self).__init__(**kwargs) - self.app_service_plan_name = kwargs.get('app_service_plan_name', None) - self.worker_tier_name = kwargs.get('worker_tier_name', None) - self.status = None - self.subscription = None - self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None - self.is_spot = kwargs.get('is_spot', None) - self.spot_expiration_time = kwargs.get('spot_expiration_time', None) - self.resource_group = None - self.reserved = kwargs.get('reserved', 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.sku = kwargs.get('sku', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_plan_patch_resource_name: Required. Name for the App - Service plan. - :type app_service_plan_patch_resource_name: 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.v2016_09_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2016_09_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2016_09_01.models.ProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_plan_patch_resource_name': {'required': 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'}, - 'app_service_plan_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - } - - def __init__(self, **kwargs): - super(AppServicePlanPatchResource, self).__init__(**kwargs) - self.app_service_plan_patch_resource_name = kwargs.get('app_service_plan_patch_resource_name', None) - self.worker_tier_name = kwargs.get('worker_tier_name', None) - self.status = None - self.subscription = None - self.admin_site_name = kwargs.get('admin_site_name', 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.number_of_sites = None - self.is_spot = kwargs.get('is_spot', None) - self.spot_expiration_time = kwargs.get('spot_expiration_time', None) - self.resource_group = None - self.reserved = kwargs.get('reserved', 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 - - -class AutoHealActions(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.v2016_09_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2016_09_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': 'AutoHealActionType'}, - '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(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(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.v2016_09_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2016_09_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2016_09_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.v2016_09_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2016_09_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) - - -class Capability(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 CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - 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.get('source_web_app_id', 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) - self.ignore_quotas = kwargs.get('ignore_quotas', None) - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2016_09_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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 CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = kwargs.get('allowed_origins', None) - - -class CsmUsageQuota(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 - :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.v2016_09_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 ErrorEntity(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.v2016_09_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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2016_09_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 HandlerMapping(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 HostingEnvironmentDiagnostics(Model): - """Diagnostics for an App Service Environment. - - :param name: Name/identifier of the diagnostics. - :type name: str - :param diagnosics_output: Diagnostics output. - :type diagnosics_output: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'diagnosics_output': {'key': 'diagnosicsOutput', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.diagnosics_output = kwargs.get('diagnosics_output', None) - - -class HostingEnvironmentProfile(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 HostNameSslState(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.v2016_09_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 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.v2016_09_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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 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 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identifier, self).__init__(**kwargs) - self.identifier_id = kwargs.get('identifier_id', None) - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', '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) - - -class LocalizableString(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 ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2016_09_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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.tenant_id = None - self.principal_id = None - - -class MetricAvailabilily(Model): - """Metric availability and retention. - - :param time_grain: Time grain. - :type time_grain: str - :param retention: Retention period for the current time grain. - :type retention: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailabilily, self).__init__(**kwargs) - self.time_grain = kwargs.get('time_grain', None) - self.retention = kwargs.get('retention', None) - - -class MetricDefinition(ProxyOnlyResource): - """Metadata for a metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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 metric_definition_name: Name of the metric. - :vartype metric_definition_name: 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.v2016_09_01.models.MetricAvailabilily] - :ivar display_name: Friendly name shown in the UI. - :vartype display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'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'}, - 'metric_definition_name': {'key': 'properties.name', 'type': 'str'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, - 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.display_name = None - - -class NameValuePair(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 NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2016_09_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = kwargs.get('action', None) - self.description = kwargs.get('description', None) - self.order = kwargs.get('order', None) - self.remote_subnet = kwargs.get('remote_subnet', None) - - -class Operation(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.v2016_09_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2016_09_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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 RequestsBasedTrigger(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 ResourceMetric(Model): - """Object representing a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of metric. - :vartype name: ~azure.mgmt.web.v2016_09_01.models.ResourceMetricName - :ivar unit: Metric unit. - :vartype unit: str - :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D - :vartype time_grain: str - :ivar start_time: Metric start time. - :vartype start_time: datetime - :ivar end_time: Metric end time. - :vartype end_time: datetime - :ivar resource_id: Metric resource Id. - :vartype resource_id: str - :ivar id: Resource Id. - :vartype id: str - :ivar metric_values: Metric values. - :vartype metric_values: - list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricValue] - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricProperty] - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'id': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'ResourceMetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs): - super(ResourceMetric, self).__init__(**kwargs) - self.name = None - self.unit = None - self.time_grain = None - self.start_time = None - self.end_time = None - self.resource_id = None - self.id = None - self.metric_values = None - self.properties = None - - -class ResourceMetricAvailability(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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricName - :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.v2016_09_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricDefinition, self).__init__(**kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ResourceMetricProperty(Model): - """Resource metric property. - - :param key: Key for resource metric property. - :type key: str - :param value: Value of pair. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricProperty, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ResourceMetricValue(Model): - """Value of resource metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Value timestamp. - :vartype timestamp: str - :ivar average: Value average. - :vartype average: float - :ivar minimum: Value minimum. - :vartype minimum: float - :ivar maximum: Value maximum. - :vartype maximum: float - :ivar total: Value total. - :vartype total: float - :ivar count: Value count. - :vartype count: float - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricProperty] - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'average': {'readonly': True}, - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'total': {'readonly': True}, - 'count': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'average': {'key': 'average', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricValue, self).__init__(**kwargs) - self.timestamp = None - self.average = None - self.minimum = None - self.maximum = None - self.total = None - self.count = None - self.properties = 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: Resource tags. - :type tags: dict[str, str] - :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.v2016_09_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2016_09_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.v2016_09_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2016_09_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2016_09_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2016_09_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2016_09_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2016_09_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2016_09_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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.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.host_names_disabled = kwargs.get('host_names_disabled', 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.snapshot_info = kwargs.get('snapshot_info', None) - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = kwargs.get('https_only', None) - self.identity = kwargs.get('identity', None) - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2016_09_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2016_09_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2016_09_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2016_09_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' - :type scm_type: str or ~azure.mgmt.web.v2016_09_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2016_09_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2016_09_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2016_09_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2016_09_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2016_09_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2016_09_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2016_09_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2016_09_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2016_09_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2016_09_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2016_09_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - 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.linux_fx_version = kwargs.get('linux_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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) - self.http20_enabled = kwargs.get('http20_enabled', True) - self.min_tls_version = kwargs.get('min_tls_version', None) - - -class SiteLimits(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 SiteMachineKey(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 SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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.v2016_09_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.v2016_09_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(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.v2016_09_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2016_09_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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', None) - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2016_09_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SnapshotRecoveryRequest, self).__init__(**kwargs) - self.snapshot_time = kwargs.get('snapshot_time', None) - self.recovery_target = kwargs.get('recovery_target', 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) - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.id = kwargs.get('id', None) - - -class StampCapacity(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.v2016_09_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' - :type worker_size: str or - ~azure.mgmt.web.v2016_09_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 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: true if capacity - is applicable for all apps; otherwise, false. - :type is_applicable_for_all_compute_modes: bool - :param site_mode: Shared or Dedicated. - :type site_mode: str - """ - - _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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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'}, - } - - 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) - - -class StatusCodesBasedTrigger(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 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', 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 usage_name: Name of the quota. - :vartype usage_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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2016_09_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}, - 'usage_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'}, - 'usage_name': {'key': 'properties.name', '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': 'ComputeModeOptions'}, - 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.display_name = None - self.usage_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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.user_name = kwargs.get('user_name', None) - 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) - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2016_09_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(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(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 - """ - - _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'}, - } - - 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) - - -class VirtualNetworkProfile(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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.get('id', None) - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2016_09_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - 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) - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2016_09_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'}, - 'vnet_route_name': {'key': 'properties.name', '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.vnet_route_name = kwargs.get('vnet_route_name', None) - 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 WebAppCollection(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.v2016_09_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.get('value', None) - self.next_link = None - - -class WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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.v2016_09_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 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.v2016_09_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] - :param sku: - :type sku: ~azure.mgmt.web.v2016_09_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(WorkerPoolResource, self).__init__(**kwargs) - 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 - self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models_py3.py deleted file mode 100644 index a3bcc9501f2..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_models_py3.py +++ /dev/null @@ -1,3614 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AddressResponse(Model): - """Describes main public IP address and any extra virtual IPs. - - :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.v2016_09_01.models.VirtualIPMapping] - """ - - _attribute_map = { - 'service_ip_address': {'key': 'serviceIpAddress', 'type': 'str'}, - 'internal_ip_address': {'key': 'internalIpAddress', 'type': 'str'}, - 'outbound_ip_addresses': {'key': 'outboundIpAddresses', 'type': '[str]'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - } - - def __init__(self, *, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: - super(AddressResponse, self).__init__(**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 ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class ProxyOnlyResource(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: str=None, **kwargs) -> None: - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.type = 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2016_09_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.v2016_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2016_09_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2016_09_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2016_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2016_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2016_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2016_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2016_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, - } - - def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: - super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) - self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - - -class Resource(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: 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: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.location = location - self.type = None - self.tags = tags - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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.v2016_09_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.v2016_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2016_09_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2016_09_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2016_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2016_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2016_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2016_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2016_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, - } - - def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: - super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_environment_resource_name = app_service_environment_resource_name - self.app_service_environment_resource_location = app_service_environment_resource_location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: 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.v2016_09_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2016_09_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2016_09_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2016_09_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_plan_name': {'required': 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}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_plan_name = app_service_plan_name - self.worker_tier_name = worker_tier_name - self.status = None - self.subscription = None - self.admin_site_name = admin_site_name - 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.number_of_sites = None - self.is_spot = is_spot - self.spot_expiration_time = spot_expiration_time - self.resource_group = None - self.reserved = reserved - self.target_worker_count = target_worker_count - self.target_worker_size_id = target_worker_size_id - self.provisioning_state = None - self.sku = sku - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_plan_patch_resource_name: Required. Name for the App - Service plan. - :type app_service_plan_patch_resource_name: 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.v2016_09_01.models.StatusOptions - :ivar subscription: App Service plan subscription. - :vartype subscription: str - :param admin_site_name: App Service plan administration site. - :type admin_site_name: 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.v2016_09_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :type per_site_scaling: bool - :ivar number_of_sites: Number of apps assigned to this App Service plan. - :vartype number_of_sites: int - :param is_spot: If 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 - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: 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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2016_09_01.models.ProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_plan_patch_resource_name': {'required': 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'}, - 'app_service_plan_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - 'subscription': {'key': 'properties.subscription', 'type': 'str'}, - 'admin_site_name': {'key': 'properties.adminSiteName', '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'}, - 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, - 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, - 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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': 'ProvisioningState'}, - } - - def __init__(self, *, app_service_plan_patch_resource_name: str, kind: str=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: - super(AppServicePlanPatchResource, self).__init__(kind=kind, **kwargs) - self.app_service_plan_patch_resource_name = app_service_plan_patch_resource_name - self.worker_tier_name = worker_tier_name - self.status = None - self.subscription = None - self.admin_site_name = admin_site_name - 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.number_of_sites = None - self.is_spot = is_spot - self.spot_expiration_time = spot_expiration_time - self.resource_group = None - self.reserved = reserved - self.target_worker_count = target_worker_count - self.target_worker_size_id = target_worker_size_id - self.provisioning_state = None - - -class AutoHealActions(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.v2016_09_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2016_09_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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.v2016_09_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2016_09_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2016_09_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.v2016_09_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2016_09_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - super(Capability, self).__init__(**kwargs) - self.name = name - self.value = value - self.reason = reason - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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 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: 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 - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool - """ - - _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'}, - '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'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, - } - - def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: - 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.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 - self.ignore_quotas = ignore_quotas - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2016_09_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class CorsSettings(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] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, *, allowed_origins=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - - -class CsmUsageQuota(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 - :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.v2016_09_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - 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 ErrorEntity(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.v2016_09_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: - 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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2016_09_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentDiagnostics(Model): - """Diagnostics for an App Service Environment. - - :param name: Name/identifier of the diagnostics. - :type name: str - :param diagnosics_output: Diagnostics output. - :type diagnosics_output: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'diagnosics_output': {'key': 'diagnosicsOutput', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, diagnosics_output: str=None, **kwargs) -> None: - super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) - self.name = name - self.diagnosics_output = diagnosics_output - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostNameSslState(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.v2016_09_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 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.v2016_09_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.identifier_id = identifier_id - - -class IpSecurityRestriction(Model): - """IP security restriction on an app. - - All required parameters must be populated in order to send to Azure. - - :param ip_address: Required. IP address the security restriction is valid - for. - :type ip_address: str - :param subnet_mask: Subnet mask for the range of IP addresses the - restriction is valid for. - :type subnet_mask: str - """ - - _validation = { - 'ip_address': {'required': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: - super(IpSecurityRestriction, self).__init__(**kwargs) - self.ip_address = ip_address - self.subnet_mask = subnet_mask - - -class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: - super(LocalizableString, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class ManagedServiceIdentity(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' - :type type: str or - ~azure.mgmt.web.v2016_09_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 - """ - - _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'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - - -class MetricAvailabilily(Model): - """Metric availability and retention. - - :param time_grain: Time grain. - :type time_grain: str - :param retention: Retention period for the current time grain. - :type retention: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - } - - def __init__(self, *, time_grain: str=None, retention: str=None, **kwargs) -> None: - super(MetricAvailabilily, self).__init__(**kwargs) - self.time_grain = time_grain - self.retention = retention - - -class MetricDefinition(ProxyOnlyResource): - """Metadata for a metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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 metric_definition_name: Name of the metric. - :vartype metric_definition_name: 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.v2016_09_01.models.MetricAvailabilily] - :ivar display_name: Friendly name shown in the UI. - :vartype display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'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'}, - 'metric_definition_name': {'key': 'properties.name', 'type': 'str'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, - 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(MetricDefinition, self).__init__(kind=kind, **kwargs) - self.metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.display_name = None - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2016_09_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = action - self.description = description - self.order = order - self.remote_subnet = remote_subnet - - -class Operation(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.v2016_09_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2016_09_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: - 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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -class ResourceMetric(Model): - """Object representing a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of metric. - :vartype name: ~azure.mgmt.web.v2016_09_01.models.ResourceMetricName - :ivar unit: Metric unit. - :vartype unit: str - :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D - :vartype time_grain: str - :ivar start_time: Metric start time. - :vartype start_time: datetime - :ivar end_time: Metric end time. - :vartype end_time: datetime - :ivar resource_id: Metric resource Id. - :vartype resource_id: str - :ivar id: Resource Id. - :vartype id: str - :ivar metric_values: Metric values. - :vartype metric_values: - list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricValue] - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricProperty] - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'id': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'ResourceMetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetric, self).__init__(**kwargs) - self.name = None - self.unit = None - self.time_grain = None - self.start_time = None - self.end_time = None - self.resource_id = None - self.id = None - self.metric_values = None - self.properties = None - - -class ResourceMetricAvailability(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) -> None: - 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 resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricName - :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.v2016_09_01.models.ResourceMetricAvailability] - :ivar resource_uri: Resource URI. - :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str - :ivar properties: Resource metric definition properties. - :vartype properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'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'}, - 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, - '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'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': '{str}'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) - self.resource_metric_definition_name = None - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.resource_metric_definition_id = None - self.properties = None - - -class ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ResourceMetricProperty(Model): - """Resource metric property. - - :param key: Key for resource metric property. - :type key: str - :param value: Value of pair. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: - super(ResourceMetricProperty, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ResourceMetricValue(Model): - """Value of resource metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Value timestamp. - :vartype timestamp: str - :ivar average: Value average. - :vartype average: float - :ivar minimum: Value minimum. - :vartype minimum: float - :ivar maximum: Value maximum. - :vartype maximum: float - :ivar total: Value total. - :vartype total: float - :ivar count: Value count. - :vartype count: float - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2016_09_01.models.ResourceMetricProperty] - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'average': {'readonly': True}, - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'total': {'readonly': True}, - 'count': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'average': {'key': 'average', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricValue, self).__init__(**kwargs) - self.timestamp = None - self.average = None - self.minimum = None - self.maximum = None - self.total = None - self.count = None - self.properties = 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: Resource tags. - :type tags: dict[str, str] - :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.v2016_09_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2016_09_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.v2016_09_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2016_09_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2016_09_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2016_09_01.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: - ~azure.mgmt.web.v2016_09_01.models.SnapshotRecoveryRequest - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. - :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, 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.v2016_09_01.models.SlotSwapStatus - :param https_only: HttpsOnly: configures a web site to accept only https - requests. Issues redirect for - http requests - :type https_only: bool - :param identity: - :type identity: ~azure.mgmt.web.v2016_09_01.models.ManagedServiceIdentity - """ - - _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}, - } - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', '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'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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.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.host_names_disabled = host_names_disabled - 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.snapshot_info = snapshot_info - self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None - self.https_only = https_only - self.identity = identity - - -class SiteConfig(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. Default value: - "v4.6" . - :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 linux_fx_version: Linux App Framework and version - :type linux_fx_version: str - :param request_tracing_enabled: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2016_09_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2016_09_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2016_09_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2016_09_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' - :type scm_type: str or ~azure.mgmt.web.v2016_09_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2016_09_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2016_09_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2016_09_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2016_09_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2016_09_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2016_09_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2016_09_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2016_09_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2016_09_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: False . - :type local_my_sql_enabled: bool - :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2016_09_01.models.IpSecurityRestriction] - :param http20_enabled: Http20Enabled: configures a web site to allow - clients to connect over http2.0. Default value: True . - :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.v2016_09_01.models.SupportedTlsVersions - """ - - _validation = { - 'machine_key': {'readonly': True}, - } - - _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'}, - 'linux_fx_version': {'key': 'linuxFxVersion', '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, - 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, - 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, - 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: - 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.linux_fx_version = linux_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.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.cors = cors - self.push = push - self.api_definition = api_definition - self.auto_swap_slot_name = auto_swap_slot_name - self.local_my_sql_enabled = local_my_sql_enabled - self.ip_security_restrictions = ip_security_restrictions - self.http20_enabled = http20_enabled - self.min_tls_version = min_tls_version - - -class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - super(SiteMachineKey, self).__init__(**kwargs) - self.validation = validation - self.validation_key = validation_key - self.decryption = decryption - self.decryption_key = decryption_key - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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.v2016_09_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.v2016_09_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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(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.v2016_09_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2016_09_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: str=None, sku=None, capacity=None, **kwargs) -> None: - super(SkuInfo, self).__init__(**kwargs) - self.resource_type = resource_type - self.sku = sku - self.capacity = capacity - - -class SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - self.count = count - self.time_interval = time_interval - - -class SnapshotRecoveryRequest(ProxyOnlyResource): - """Details about app recovery operation. - - 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 - :ivar type: Resource type. - :vartype type: str - :param snapshot_time: Point in time in which the app recovery should be - attempted, formatted as a DateTime string. - :type snapshot_time: str - :param recovery_target: Specifies the web app that snapshot contents will - be written to. - :type recovery_target: - ~azure.mgmt.web.v2016_09_01.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'overwrite': {'required': 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_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, - 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, - 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, - 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, - } - - def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: - super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) - self.snapshot_time = snapshot_time - self.recovery_target = recovery_target - self.overwrite = overwrite - self.recover_configuration = recover_configuration - self.ignore_conflicting_host_names = ignore_conflicting_host_names - - -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. - - :param location: Geographical location of the target web app, e.g. - SouthEastAsia, SouthCentralUS - :type location: str - :param id: ARM resource ID of the target 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: str=None, id: str=None, **kwargs) -> None: - super(SnapshotRecoveryTarget, self).__init__(**kwargs) - self.location = location - self.id = id - - -class StampCapacity(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.v2016_09_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' - :type worker_size: str or - ~azure.mgmt.web.v2016_09_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 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: true if capacity - is applicable for all apps; otherwise, false. - :type is_applicable_for_all_compute_modes: bool - :param site_mode: Shared or Dedicated. - :type site_mode: str - """ - - _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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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'}, - } - - def __init__(self, *, name: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, **kwargs) -> None: - 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 - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - self.count = count - self.time_interval = time_interval - - -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 usage_name: Name of the quota. - :vartype usage_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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2016_09_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}, - 'usage_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'}, - 'usage_name': {'key': 'properties.name', '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': 'ComputeModeOptions'}, - 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(Usage, self).__init__(kind=kind, **kwargs) - self.display_name = None - self.usage_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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param user_name: Username - :type user_name: str - :param publishing_user_name: Required. 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', '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'}, - } - - def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: - super(User, self).__init__(kind=kind, **kwargs) - self.user_name = user_name - 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 - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2016_09_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -class VirtualIPMapping(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 - """ - - _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'}, - } - - def __init__(self, *, virtual_ip: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, **kwargs) -> None: - 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 - - -class VirtualNetworkProfile(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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=None, subnet: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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: bytearray - :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list[~azure.mgmt.web.v2016_09_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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': 'bytearray'}, - 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: - 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 - - -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 vnet_route_name: The name of this route. This is only returned by - the server and does not need to be set by the client. - :type vnet_route_name: 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.v2016_09_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'}, - 'vnet_route_name': {'key': 'properties.name', '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: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - super(VnetRoute, self).__init__(kind=kind, **kwargs) - self.vnet_route_name = vnet_route_name - self.start_address = start_address - self.end_address = end_address - self.route_type = route_type - - -class WebAppCollection(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.v2016_09_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, **kwargs) -> None: - super(WebAppCollection, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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.v2016_09_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 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.v2016_09_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] - :param sku: - :type sku: ~azure.mgmt.web.v2016_09_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: - super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) - 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 - self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_paged_models.py deleted file mode 100644 index 483d81a457f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_paged_models.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AppServiceEnvironmentResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) -class StampCapacityPaged(Paged): - """ - A paging container for iterating over a list of :class:`StampCapacity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StampCapacity]'} - } - - def __init__(self, *args, **kwargs): - - super(StampCapacityPaged, self).__init__(*args, **kwargs) -class ResourceMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricPaged, self).__init__(*args, **kwargs) -class WorkerPoolResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkerPoolResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) -class ResourceMetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) -class SkuInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SkuInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SkuInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SkuInfoPaged, self).__init__(*args, **kwargs) -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) -class AppServicePlanPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServicePlan ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServicePlanPaged, self).__init__(*args, **kwargs) -class SitePaged(Paged): - """ - A paging container for iterating over a list of :class:`Site ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Site]'} - } - - def __init__(self, *args, **kwargs): - - super(SitePaged, self).__init__(*args, **kwargs) -class CsmUsageQuotaPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmUsageQuota ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) -class StrPaged(Paged): - """ - A paging container for iterating over a list of str object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } - - def __init__(self, *args, **kwargs): - - super(StrPaged, self).__init__(*args, **kwargs) -class HybridConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`HybridConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HybridConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(HybridConnectionPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_web_site_management_client_enums.py deleted file mode 100644 index 9ea4b6e131e..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class HostingEnvironmentStatus(str, Enum): - - preparing = "Preparing" - ready = "Ready" - scaling = "Scaling" - deleting = "Deleting" - - -class InternalLoadBalancingMode(str, Enum): - - none = "None" - web = "Web" - publishing = "Publishing" - - -class ComputeModeOptions(str, Enum): - - shared = "Shared" - dedicated = "Dedicated" - dynamic = "Dynamic" - - -class WorkerSizeOptions(str, Enum): - - default = "Default" - small = "Small" - medium = "Medium" - large = "Large" - d1 = "D1" - d2 = "D2" - d3 = "D3" - - -class AccessControlEntryAction(str, Enum): - - permit = "Permit" - deny = "Deny" - - -class RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 ScmType(str, Enum): - - 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" - - -class ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class OperationStatus(str, Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/__init__.py deleted file mode 100644 index 7366e58aee4..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._app_service_environments_operations import AppServiceEnvironmentsOperations -from ._app_service_plans_operations import AppServicePlansOperations - -__all__ = [ - 'AppServiceEnvironmentsOperations', - 'AppServicePlansOperations', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_environments_operations.py deleted file mode 100644 index 437b21d791e..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_environments_operations.py +++ /dev/null @@ -1,3146 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceEnvironmentsOperations(object): - """AppServiceEnvironmentsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all App Service Environments for a subscription. - - Get all App Service Environments for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all App Service Environments in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the properties of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an App Service Environment. - - 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.v2016_09_01.models.AppServiceEnvironmentResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceEnvironmentResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - hosting_environment_envelope=hosting_environment_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _delete_initial( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if force_delete is not None: - query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete an App Service Environment. - - 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 true to force the deletion - even if the App Service Environment contains resources. The default is - false. - :type force_delete: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - force_delete=force_delete, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update an App Service Environment. - - 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.v2016_09_01.models.AppServiceEnvironmentPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def list_capacities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the used, available, and total worker capacity an App Service - Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StampCapacity - :rtype: - ~azure.mgmt.web.v2016_09_01.models.StampCapacityPaged[~azure.mgmt.web.v2016_09_01.models.StampCapacity] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_capacities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} - - def list_vips( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get IP addresses assigned to an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AddressResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.AddressResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_vips.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AddressResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} - - def list_diagnostics( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get diagnostic information for an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2016_09_01.models.HostingEnvironmentDiagnostics] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_diagnostics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} - - def get_diagnostics_item( - self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): - """Get a diagnostics item for an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostingEnvironmentDiagnostics or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2016_09_01.models.HostingEnvironmentDiagnostics or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_diagnostics_item.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} - - def list_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get global metric definitions of an App Service Environment. - - Get global metric definitions 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MetricDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.MetricDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MetricDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'} - - def list_metrics( - self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get global metrics of an App Service Environment. - - Get global 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 details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'} - - def list_multi_role_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get all multi-role pools. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} - - def get_multi_role_pool( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get properties of a multi-role pool. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - - def _create_or_update_multi_role_pool_initial( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a multi-role pool. - - 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.v2016_09_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a multi-role pool. - - 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.v2016_09_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def list_multi_role_pool_instance_metric_definitions( - self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): - """Get metric definitions for a specific instance of a multi-role pool of - an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} - - def list_multi_role_pool_instance_metrics( - self, resource_group_name, name, instance, details=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for a specific instance of a multi-role pool of an App - Service Environment. - - Get metrics 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 - :param details: Specify true to include instance details. - The default is false. - :type details: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_instance_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'} - - def list_multi_role_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get metric definitions for a multi-role pool of an App Service - Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} - - def list_multi_role_metrics( - self, resource_group_name, name, start_time=None, end_time=None, time_grain=None, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for a multi-role pool of an App Service Environment. - - Get 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 - :param start_time: Beginning time of the metrics query. - :type start_time: str - :param end_time: End time of the metrics query. - :type end_time: str - :param time_grain: Time granularity of the metrics query. - :type time_grain: str - :param details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if start_time is not None: - query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'str') - if end_time is not None: - query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'str') - if time_grain is not None: - query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str') - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'} - - def list_multi_role_pool_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get available SKUs for scaling a multi-role pool. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2016_09_01.models.SkuInfoPaged[~azure.mgmt.web.v2016_09_01.models.SkuInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} - - def list_multi_role_usages( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get usage metrics for a multi-role pool of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2016_09_01.models.UsagePaged[~azure.mgmt.web.v2016_09_01.models.Usage] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} - - def list_operations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List all currently running operations on the App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2016_09_01.models.Operation] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_operations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Operation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} - - def reboot( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Reboot all machines in an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reboot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} - - - def _resume_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.resume.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def resume( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """Resume an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.WebAppCollection]] - :raises: :class:`CloudError` - """ - raw_result = self._resume_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} - - def list_app_service_plans( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans in an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2016_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_app_service_plans.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} - - def list_web_apps( - self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): - """Get all apps in an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2016_09_01.models.SitePaged[~azure.mgmt.web.v2016_09_01.models.Site] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} - - - def _suspend_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.suspend.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def suspend( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """Suspend an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.WebAppCollection]] - :raises: :class:`CloudError` - """ - raw_result = self._suspend_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Get global usage metrics of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2016_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2016_09_01.models.CsmUsageQuota] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} - - def list_worker_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get all worker pools of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} - - def get_worker_pool( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """Get properties of a worker pool. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - - def _create_or_update_worker_pool_initial( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a worker pool. - - 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.v2016_09_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a worker pool. - - 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.v2016_09_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def list_worker_pool_instance_metric_definitions( - self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): - """Get metric definitions for a specific instance of a worker pool of an - App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} - - def list_worker_pool_instance_metrics( - self, resource_group_name, name, worker_pool_name, instance, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for a specific instance of a worker pool of an App Service - Environment. - - Get metrics 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 - :param details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_instance_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'} - - def list_web_worker_metric_definitions( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """Get metric definitions for a worker pool of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} - - def list_web_worker_metrics( - self, resource_group_name, name, worker_pool_name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for a worker pool of a AppServiceEnvironment (App Service - Environment). - - Get metrics for a worker pool of a AppServiceEnvironment (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 worker pool - :type worker_pool_name: str - :param details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'} - - def list_worker_pool_skus( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """Get available SKUs for scaling a worker pool. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2016_09_01.models.SkuInfoPaged[~azure.mgmt.web.v2016_09_01.models.SkuInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} - - def list_web_worker_usages( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """Get usage metrics for a worker pool of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2016_09_01.models.UsagePaged[~azure.mgmt.web.v2016_09_01.models.Usage] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_plans_operations.py deleted file mode 100644 index 3eb56a1d2c3..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/operations/_app_service_plans_operations.py +++ /dev/null @@ -1,2133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServicePlansOperations(object): - """AppServicePlansOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-09-01" - - self.config = config - - def list( - self, detailed=None, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans for a subscription. - - Get all App Service plans for a subscription. - - :param detailed: Specify true to return all App Service - plan properties. The default is false, which returns a - subset of the properties. - Retrieval of all properties may increase the API latency. - :type detailed: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2016_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2016_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlan') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an App Service Plan. - - 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.v2016_09_01.models.AppServicePlan - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AppServicePlan or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2016_09_01.models.AppServicePlan]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - app_service_plan=app_service_plan, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Delete an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - """Creates or updates an App Service Plan. - - 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.v2016_09_01.models.AppServicePlanPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def list_capabilities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List all capabilities of an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2016_09_01.models.Capability] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_capabilities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Capability]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Retrieve a Hybrid Connection in use in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Delete a Hybrid Connection in use in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Get the send key name and value of a Hybrid Connection. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_hybrid_connection_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_web_apps_by_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Get all apps that use a Hybrid Connection in an App Service Plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of str - :rtype: ~azure.mgmt.web.v2016_09_01.models.StrPaged[str] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps_by_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} - - def get_hybrid_connection_plan_limit( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the maximum number of Hybrid Connections allowed in an App Service - plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionLimits or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.HybridConnectionLimits or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_hybrid_connection_plan_limit.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionLimits', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieve all Hybrid Connections in use in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HybridConnection - :rtype: - ~azure.mgmt.web.v2016_09_01.models.HybridConnectionPaged[~azure.mgmt.web.v2016_09_01.models.HybridConnection] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} - - def list_metric_defintions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get metrics that can be queried for an App Service plan, and their - definitions. - - Get metrics that can be queried for an App Service plan, and their - definitions. - - :param 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinition] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metric_defintions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metric_defintions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'} - - def list_metrics( - self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for an App Service plan. - - Get metrics for 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 details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2016_09_01.models.ResourceMetricPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetric] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'} - - def restart_web_apps( - self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): - """Restart all apps in an App Service plan. - - 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 true to perform a soft - restart, applies the configuration settings and restarts the apps if - necessary. The default is false, which always restarts - and reprovisions the apps - :type soft_restart: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.restart_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if soft_restart is not None: - query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} - - def list_web_apps( - self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): - """Get all apps associated with an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2016_09_01.models.SitePaged[~azure.mgmt.web.v2016_09_01.models.Site] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} - - def get_server_farm_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets all selectable SKUs for a given App Service Plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_server_farm_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets server farm usage information. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2016_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2016_09_01.models.CsmUsageQuota] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} - - def list_vnets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get all Virtual Networks associated with an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2016_09_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_vnets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} - - def get_vnet_from_server_farm( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """Get a Virtual Network associated with an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_from_server_farm.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """Get a Virtual Network gateway. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Update a Virtual Network gateway. - - 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.v2016_09_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_routes_for_vnet( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """Get all routes that are associated with a Virtual Network in an App - Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2016_09_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_routes_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} - - def get_route_for_vnet( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """Get a Virtual Network route in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2016_09_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_route_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def create_or_update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """Create or update a Virtual Network route in an App Service plan. - - 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.v2016_09_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def delete_vnet_route( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """Delete a Virtual Network route in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """Create or update a Virtual Network route in an App Service plan. - - 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.v2016_09_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2016_09_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def reboot_worker( - self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): - """Reboot a worker machine in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reboot_worker.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2016_09_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_web_site_management_client.py deleted file mode 100644 index 4180ebdb5d7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/_web_site_management_client.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import WebSiteManagementClientOperationsMixin -from .operations import AppServiceCertificateOrdersOperations -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 ProviderOperations -from .operations import RecommendationsOperations -from .operations import WebAppsOperations -from .operations import AppServiceEnvironmentsOperations -from .operations import AppServicePlansOperations -from .operations import ResourceHealthMetadataOperations -from . import models - - -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar app_service_certificate_orders: AppServiceCertificateOrders operations - :vartype app_service_certificate_orders: azure.mgmt.web.v2018_02_01.operations.AppServiceCertificateOrdersOperations - :ivar certificate_registration_provider: CertificateRegistrationProvider operations - :vartype certificate_registration_provider: azure.mgmt.web.v2018_02_01.operations.CertificateRegistrationProviderOperations - :ivar domains: Domains operations - :vartype domains: azure.mgmt.web.v2018_02_01.operations.DomainsOperations - :ivar top_level_domains: TopLevelDomains operations - :vartype top_level_domains: azure.mgmt.web.v2018_02_01.operations.TopLevelDomainsOperations - :ivar domain_registration_provider: DomainRegistrationProvider operations - :vartype domain_registration_provider: azure.mgmt.web.v2018_02_01.operations.DomainRegistrationProviderOperations - :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.web.v2018_02_01.operations.CertificatesOperations - :ivar deleted_web_apps: DeletedWebApps operations - :vartype deleted_web_apps: azure.mgmt.web.v2018_02_01.operations.DeletedWebAppsOperations - :ivar diagnostics: Diagnostics operations - :vartype diagnostics: azure.mgmt.web.v2018_02_01.operations.DiagnosticsOperations - :ivar provider: Provider operations - :vartype provider: azure.mgmt.web.v2018_02_01.operations.ProviderOperations - :ivar recommendations: Recommendations operations - :vartype recommendations: azure.mgmt.web.v2018_02_01.operations.RecommendationsOperations - :ivar web_apps: WebApps operations - :vartype web_apps: azure.mgmt.web.v2018_02_01.operations.WebAppsOperations - :ivar app_service_environments: AppServiceEnvironments operations - :vartype app_service_environments: azure.mgmt.web.v2018_02_01.operations.AppServiceEnvironmentsOperations - :ivar app_service_plans: AppServicePlans operations - :vartype app_service_plans: azure.mgmt.web.v2018_02_01.operations.AppServicePlansOperations - :ivar resource_health_metadata: ResourceHealthMetadata operations - :vartype resource_health_metadata: azure.mgmt.web.v2018_02_01.operations.ResourceHealthMetadataOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-02-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( - 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.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.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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/__init__.py deleted file mode 100644 index f46b704fcf8..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/__init__.py +++ /dev/null @@ -1,946 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AbnormalTimePeriod - from ._models_py3 import Address - from ._models_py3 import AddressResponse - from ._models_py3 import AnalysisData - from ._models_py3 import AnalysisDefinition - from ._models_py3 import ApiDefinitionInfo - from ._models_py3 import ApplicationLogsConfig - from ._models_py3 import ApplicationStack - from ._models_py3 import AppServiceCertificate - from ._models_py3 import AppServiceCertificateOrder - from ._models_py3 import AppServiceCertificateOrderPatchResource - from ._models_py3 import AppServiceCertificatePatchResource - from ._models_py3 import AppServiceCertificateResource - from ._models_py3 import AppServiceEnvironment - from ._models_py3 import AppServiceEnvironmentPatchResource - from ._models_py3 import AppServiceEnvironmentResource - from ._models_py3 import AppServicePlan - from ._models_py3 import AppServicePlanPatchResource - from ._models_py3 import AutoHealActions - from ._models_py3 import AutoHealCustomAction - from ._models_py3 import AutoHealRules - from ._models_py3 import AutoHealTriggers - from ._models_py3 import AzureBlobStorageApplicationLogsConfig - from ._models_py3 import AzureBlobStorageHttpLogsConfig - from ._models_py3 import AzureStorageInfoValue - from ._models_py3 import AzureStoragePropertyDictionaryResource - from ._models_py3 import AzureTableStorageApplicationLogsConfig - from ._models_py3 import BackupItem - from ._models_py3 import BackupRequest - from ._models_py3 import BackupSchedule - from ._models_py3 import BillingMeter - from ._models_py3 import Capability - from ._models_py3 import Certificate - from ._models_py3 import CertificateDetails - from ._models_py3 import CertificateEmail - from ._models_py3 import CertificateOrderAction - from ._models_py3 import CertificatePatchResource - from ._models_py3 import CloningInfo - from ._models_py3 import ConnectionStringDictionary - from ._models_py3 import ConnStringInfo - from ._models_py3 import ConnStringValueTypePair - from ._models_py3 import Contact - from ._models_py3 import ContinuousWebJob - from ._models_py3 import CorsSettings - from ._models_py3 import CsmMoveResourceEnvelope - from ._models_py3 import CsmOperationDescription - from ._models_py3 import CsmOperationDescriptionProperties - from ._models_py3 import CsmOperationDisplay - from ._models_py3 import CsmPublishingProfileOptions - from ._models_py3 import CsmSlotEntity - from ._models_py3 import CsmUsageQuota - from ._models_py3 import CustomHostnameAnalysisResult - from ._models_py3 import DatabaseBackupSetting - from ._models_py3 import DataSource - from ._models_py3 import DataTableResponseColumn - from ._models_py3 import DataTableResponseObject - from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException - from ._models_py3 import DefaultErrorResponseError - from ._models_py3 import DefaultErrorResponseErrorDetailsItem - from ._models_py3 import DeletedAppRestoreRequest - from ._models_py3 import DeletedSite - from ._models_py3 import Deployment - 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 DiagnosticAnalysis - from ._models_py3 import DiagnosticCategory - from ._models_py3 import DiagnosticData - 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 DomainAvailablilityCheckResult - from ._models_py3 import DomainControlCenterSsoRequest - from ._models_py3 import DomainOwnershipIdentifier - 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 FileSystemApplicationLogsConfig - from ._models_py3 import FileSystemHttpLogsConfig - from ._models_py3 import FunctionEnvelope - from ._models_py3 import FunctionSecrets - from ._models_py3 import GeoDistribution - from ._models_py3 import GeoRegion - from ._models_py3 import GlobalCsmSkuDescription - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentDeploymentInfo - from ._models_py3 import HostingEnvironmentDiagnostics - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostKeys - from ._models_py3 import HostName - from ._models_py3 import HostNameBinding - from ._models_py3 import HostNameSslState - from ._models_py3 import HttpLogsConfig - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import HybridConnectionLimits - from ._models_py3 import Identifier - from ._models_py3 import InboundEnvironmentEndpoint - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import KeyInfo - from ._models_py3 import LocalizableString - from ._models_py3 import LogSpecification - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models_py3 import MetricAvailabilily - from ._models_py3 import MetricAvailability - from ._models_py3 import MetricDefinition - from ._models_py3 import MetricSpecification - from ._models_py3 import MigrateMySqlRequest - from ._models_py3 import MigrateMySqlStatus - from ._models_py3 import MSDeploy - from ._models_py3 import MSDeployLog - from ._models_py3 import MSDeployLogEntry - from ._models_py3 import MSDeployStatus - from ._models_py3 import NameIdentifier - from ._models_py3 import NameValuePair - from ._models_py3 import NetworkAccessControlEntry - from ._models_py3 import NetworkFeatures - from ._models_py3 import NetworkTrace - from ._models_py3 import Operation - from ._models_py3 import OutboundEnvironmentEndpoint - 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 PremierAddOnPatchResource - from ._models_py3 import PrivateAccess - from ._models_py3 import PrivateAccessSubnet - from ._models_py3 import PrivateAccessVirtualNetwork - from ._models_py3 import ProcessInfo - from ._models_py3 import ProcessModuleInfo - from ._models_py3 import ProcessThreadInfo - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PublicCertificate - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import Recommendation - from ._models_py3 import RecommendationRule - from ._models_py3 import ReissueCertificateOrderRequest - from ._models_py3 import RelayServiceConnectionEntity - from ._models_py3 import Rendering - from ._models_py3 import RenewCertificateOrderRequest - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceHealthMetadata - from ._models_py3 import ResourceMetric - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceMetricName - from ._models_py3 import ResourceMetricProperty - from ._models_py3 import ResourceMetricValue - from ._models_py3 import ResourceNameAvailability - from ._models_py3 import ResourceNameAvailabilityRequest - from ._models_py3 import ResponseMetaData - from ._models_py3 import RestoreRequest - from ._models_py3 import ServiceSpecification - from ._models_py3 import Site - from ._models_py3 import SiteAuthSettings - from ._models_py3 import SiteCloneability - from ._models_py3 import SiteCloneabilityCriterion - from ._models_py3 import SiteConfig - from ._models_py3 import SiteConfigResource - from ._models_py3 import SiteConfigurationSnapshotInfo - from ._models_py3 import SiteExtensionInfo - from ._models_py3 import SiteInstance - 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 SkuInfos - from ._models_py3 import SlotConfigNamesResource - from ._models_py3 import SlotDifference - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import Snapshot - from ._models_py3 import SnapshotRecoverySource - from ._models_py3 import SnapshotRestoreRequest - from ._models_py3 import Solution - from ._models_py3 import SourceControl - from ._models_py3 import StackMajorVersion - from ._models_py3 import StackMinorVersion - from ._models_py3 import StampCapacity - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import StorageMigrationOptions - from ._models_py3 import StorageMigrationResponse - from ._models_py3 import StringDictionary - from ._models_py3 import SwiftVirtualNetwork - from ._models_py3 import TldLegalAgreement - from ._models_py3 import TopLevelDomain - from ._models_py3 import TopLevelDomainAgreementOption - from ._models_py3 import TriggeredJobHistory - from ._models_py3 import TriggeredJobRun - from ._models_py3 import TriggeredWebJob - from ._models_py3 import Usage - from ._models_py3 import User - from ._models_py3 import ValidateContainerSettingsRequest - 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 WebJob - from ._models_py3 import WorkerPool - from ._models_py3 import WorkerPoolResource -except (SyntaxError, ImportError): - from ._models import AbnormalTimePeriod - from ._models import Address - from ._models import AddressResponse - from ._models import AnalysisData - from ._models import AnalysisDefinition - from ._models import ApiDefinitionInfo - from ._models import ApplicationLogsConfig - from ._models import ApplicationStack - from ._models import AppServiceCertificate - from ._models import AppServiceCertificateOrder - from ._models import AppServiceCertificateOrderPatchResource - from ._models import AppServiceCertificatePatchResource - from ._models import AppServiceCertificateResource - from ._models import AppServiceEnvironment - from ._models import AppServiceEnvironmentPatchResource - from ._models import AppServiceEnvironmentResource - from ._models import AppServicePlan - from ._models import AppServicePlanPatchResource - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import AzureBlobStorageApplicationLogsConfig - from ._models import AzureBlobStorageHttpLogsConfig - from ._models import AzureStorageInfoValue - from ._models import AzureStoragePropertyDictionaryResource - from ._models import AzureTableStorageApplicationLogsConfig - from ._models import BackupItem - from ._models import BackupRequest - from ._models import BackupSchedule - from ._models import BillingMeter - from ._models import Capability - from ._models import Certificate - from ._models import CertificateDetails - from ._models import CertificateEmail - from ._models import CertificateOrderAction - from ._models import CertificatePatchResource - from ._models import CloningInfo - from ._models import ConnectionStringDictionary - from ._models import ConnStringInfo - from ._models import ConnStringValueTypePair - from ._models import Contact - from ._models import ContinuousWebJob - from ._models import CorsSettings - from ._models import CsmMoveResourceEnvelope - from ._models import CsmOperationDescription - from ._models import CsmOperationDescriptionProperties - from ._models import CsmOperationDisplay - from ._models import CsmPublishingProfileOptions - from ._models import CsmSlotEntity - from ._models import CsmUsageQuota - from ._models import CustomHostnameAnalysisResult - from ._models import DatabaseBackupSetting - from ._models import DataSource - from ._models import DataTableResponseColumn - from ._models import DataTableResponseObject - from ._models import DefaultErrorResponse, DefaultErrorResponseException - from ._models import DefaultErrorResponseError - from ._models import DefaultErrorResponseErrorDetailsItem - from ._models import DeletedAppRestoreRequest - from ._models import DeletedSite - from ._models import Deployment - from ._models import DeploymentLocations - from ._models import DetectorAbnormalTimePeriod - from ._models import DetectorDefinition - from ._models import DetectorInfo - from ._models import DetectorResponse - from ._models import DiagnosticAnalysis - from ._models import DiagnosticCategory - from ._models import DiagnosticData - from ._models import DiagnosticDetectorResponse - from ._models import DiagnosticMetricSample - from ._models import DiagnosticMetricSet - from ._models import Dimension - from ._models import Domain - from ._models import DomainAvailablilityCheckResult - from ._models import DomainControlCenterSsoRequest - from ._models import DomainOwnershipIdentifier - from ._models import DomainPatchResource - from ._models import DomainPurchaseConsent - from ._models import DomainRecommendationSearchParameters - from ._models import EnabledConfig - from ._models import EndpointDependency - from ._models import EndpointDetail - from ._models import ErrorEntity - from ._models import Experiments - from ._models import FileSystemApplicationLogsConfig - from ._models import FileSystemHttpLogsConfig - from ._models import FunctionEnvelope - from ._models import FunctionSecrets - from ._models import GeoDistribution - from ._models import GeoRegion - from ._models import GlobalCsmSkuDescription - from ._models import HandlerMapping - from ._models import HostingEnvironmentDeploymentInfo - from ._models import HostingEnvironmentDiagnostics - from ._models import HostingEnvironmentProfile - from ._models import HostKeys - from ._models import HostName - from ._models import HostNameBinding - from ._models import HostNameSslState - from ._models import HttpLogsConfig - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import HybridConnectionLimits - from ._models import Identifier - from ._models import InboundEnvironmentEndpoint - from ._models import IpSecurityRestriction - from ._models import KeyInfo - from ._models import LocalizableString - from ._models import LogSpecification - from ._models import ManagedServiceIdentity - from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models import MetricAvailabilily - from ._models import MetricAvailability - from ._models import MetricDefinition - from ._models import MetricSpecification - from ._models import MigrateMySqlRequest - from ._models import MigrateMySqlStatus - from ._models import MSDeploy - from ._models import MSDeployLog - from ._models import MSDeployLogEntry - from ._models import MSDeployStatus - from ._models import NameIdentifier - from ._models import NameValuePair - from ._models import NetworkAccessControlEntry - from ._models import NetworkFeatures - from ._models import NetworkTrace - from ._models import Operation - from ._models import OutboundEnvironmentEndpoint - from ._models import PerfMonResponse - from ._models import PerfMonSample - from ._models import PerfMonSet - from ._models import PremierAddOn - from ._models import PremierAddOnOffer - from ._models import PremierAddOnPatchResource - from ._models import PrivateAccess - from ._models import PrivateAccessSubnet - from ._models import PrivateAccessVirtualNetwork - from ._models import ProcessInfo - from ._models import ProcessModuleInfo - from ._models import ProcessThreadInfo - from ._models import ProxyOnlyResource - from ._models import PublicCertificate - from ._models import PushSettings - from ._models import RampUpRule - from ._models import Recommendation - from ._models import RecommendationRule - from ._models import ReissueCertificateOrderRequest - from ._models import RelayServiceConnectionEntity - from ._models import Rendering - from ._models import RenewCertificateOrderRequest - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceHealthMetadata - from ._models import ResourceMetric - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceMetricName - from ._models import ResourceMetricProperty - from ._models import ResourceMetricValue - from ._models import ResourceNameAvailability - from ._models import ResourceNameAvailabilityRequest - from ._models import ResponseMetaData - from ._models import RestoreRequest - from ._models import ServiceSpecification - from ._models import Site - from ._models import SiteAuthSettings - from ._models import SiteCloneability - from ._models import SiteCloneabilityCriterion - from ._models import SiteConfig - from ._models import SiteConfigResource - from ._models import SiteConfigurationSnapshotInfo - from ._models import SiteExtensionInfo - from ._models import SiteInstance - from ._models import SiteLimits - from ._models import SiteLogsConfig - from ._models import SiteMachineKey - from ._models import SitePatchResource - from ._models import SitePhpErrorLogFlag - from ._models import SiteSeal - from ._models import SiteSealRequest - from ._models import SiteSourceControl - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SkuInfo - from ._models import SkuInfos - from ._models import SlotConfigNamesResource - from ._models import SlotDifference - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import Snapshot - from ._models import SnapshotRecoverySource - from ._models import SnapshotRestoreRequest - from ._models import Solution - from ._models import SourceControl - from ._models import StackMajorVersion - from ._models import StackMinorVersion - from ._models import StampCapacity - from ._models import StatusCodesBasedTrigger - from ._models import StorageMigrationOptions - from ._models import StorageMigrationResponse - from ._models import StringDictionary - from ._models import SwiftVirtualNetwork - from ._models import TldLegalAgreement - from ._models import TopLevelDomain - from ._models import TopLevelDomainAgreementOption - from ._models import TriggeredJobHistory - from ._models import TriggeredJobRun - from ._models import TriggeredWebJob - from ._models import Usage - from ._models import User - from ._models import ValidateContainerSettingsRequest - from ._models import ValidateRequest - from ._models import ValidateResponse - from ._models import ValidateResponseError - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VirtualIPMapping - from ._models import VirtualNetworkProfile - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetParameters - from ._models import VnetRoute - from ._models import VnetValidationFailureDetails - from ._models import VnetValidationTestFailure - from ._models import WebAppCollection - from ._models import WebJob - from ._models import WorkerPool - from ._models import WorkerPoolResource -from ._paged_models import AnalysisDefinitionPaged -from ._paged_models import ApplicationStackPaged -from ._paged_models import AppServiceCertificateOrderPaged -from ._paged_models import AppServiceCertificateResourcePaged -from ._paged_models import AppServiceEnvironmentResourcePaged -from ._paged_models import AppServicePlanPaged -from ._paged_models import BackupItemPaged -from ._paged_models import BillingMeterPaged -from ._paged_models import CertificatePaged -from ._paged_models import ContinuousWebJobPaged -from ._paged_models import CsmOperationDescriptionPaged -from ._paged_models import CsmUsageQuotaPaged -from ._paged_models import DeletedSitePaged -from ._paged_models import DeploymentPaged -from ._paged_models import DetectorDefinitionPaged -from ._paged_models import DetectorResponsePaged -from ._paged_models import DiagnosticCategoryPaged -from ._paged_models import DomainOwnershipIdentifierPaged -from ._paged_models import DomainPaged -from ._paged_models import FunctionEnvelopePaged -from ._paged_models import GeoRegionPaged -from ._paged_models import HostNameBindingPaged -from ._paged_models import HybridConnectionPaged -from ._paged_models import IdentifierPaged -from ._paged_models import InboundEnvironmentEndpointPaged -from ._paged_models import NameIdentifierPaged -from ._paged_models import OutboundEnvironmentEndpointPaged -from ._paged_models import PerfMonResponsePaged -from ._paged_models import PremierAddOnOfferPaged -from ._paged_models import ProcessInfoPaged -from ._paged_models import ProcessModuleInfoPaged -from ._paged_models import ProcessThreadInfoPaged -from ._paged_models import PublicCertificatePaged -from ._paged_models import RecommendationPaged -from ._paged_models import ResourceHealthMetadataPaged -from ._paged_models import ResourceMetricDefinitionPaged -from ._paged_models import ResourceMetricPaged -from ._paged_models import SiteConfigResourcePaged -from ._paged_models import SiteConfigurationSnapshotInfoPaged -from ._paged_models import SiteExtensionInfoPaged -from ._paged_models import SiteInstancePaged -from ._paged_models import SitePaged -from ._paged_models import SkuInfoPaged -from ._paged_models import SlotDifferencePaged -from ._paged_models import SnapshotPaged -from ._paged_models import SourceControlPaged -from ._paged_models import StampCapacityPaged -from ._paged_models import StrPaged -from ._paged_models import TldLegalAgreementPaged -from ._paged_models import TopLevelDomainPaged -from ._paged_models import TriggeredJobHistoryPaged -from ._paged_models import TriggeredWebJobPaged -from ._paged_models import UsagePaged -from ._paged_models import WebJobPaged -from ._paged_models import WorkerPoolResourcePaged -from ._web_site_management_client_enums import ( - KeyVaultSecretStatus, - CertificateProductType, - ProvisioningState, - CertificateOrderStatus, - CertificateOrderActionType, - RouteType, - ManagedServiceIdentityType, - IpFilterTag, - AutoHealActionType, - ConnectionStringType, - AzureStorageType, - AzureStorageState, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - FtpsState, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - RedundancyMode, - StatusOptions, - DomainStatus, - AzureResourceType, - CustomHostNameDnsRecordType, - HostNameType, - DnsType, - DomainType, - HostingEnvironmentStatus, - InternalLoadBalancingMode, - ComputeModeOptions, - WorkerSizeOptions, - AccessControlEntryAction, - OperationStatus, - IssueType, - SolutionType, - RenderingType, - ResourceScopeType, - NotificationLevel, - Channels, - AppServicePlanRestrictions, - InAvailabilityReasonType, - CheckNameResourceTypes, - ValidateResourceTypes, - LogLevel, - BackupItemStatus, - DatabaseType, - FrequencyUnit, - ContinuousWebJobStatus, - WebJobType, - PublishingProfileFormat, - DnsVerificationTestResult, - MSDeployLogEntryType, - MSDeployProvisioningState, - MySqlMigrationType, - PublicCertificateLocation, - BackupRestoreOperationType, - UnauthenticatedClientAction, - BuiltInAuthenticationProvider, - CloneAbilityResult, - SiteExtensionType, - TriggeredWebJobStatus, - SkuName, -) - -__all__ = [ - 'AbnormalTimePeriod', - 'Address', - 'AddressResponse', - 'AnalysisData', - 'AnalysisDefinition', - 'ApiDefinitionInfo', - 'ApplicationLogsConfig', - 'ApplicationStack', - 'AppServiceCertificate', - 'AppServiceCertificateOrder', - 'AppServiceCertificateOrderPatchResource', - 'AppServiceCertificatePatchResource', - 'AppServiceCertificateResource', - 'AppServiceEnvironment', - 'AppServiceEnvironmentPatchResource', - 'AppServiceEnvironmentResource', - 'AppServicePlan', - 'AppServicePlanPatchResource', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'AzureBlobStorageApplicationLogsConfig', - 'AzureBlobStorageHttpLogsConfig', - 'AzureStorageInfoValue', - 'AzureStoragePropertyDictionaryResource', - 'AzureTableStorageApplicationLogsConfig', - 'BackupItem', - 'BackupRequest', - 'BackupSchedule', - 'BillingMeter', - 'Capability', - 'Certificate', - 'CertificateDetails', - 'CertificateEmail', - 'CertificateOrderAction', - 'CertificatePatchResource', - 'CloningInfo', - 'ConnectionStringDictionary', - 'ConnStringInfo', - 'ConnStringValueTypePair', - 'Contact', - 'ContinuousWebJob', - 'CorsSettings', - 'CsmMoveResourceEnvelope', - 'CsmOperationDescription', - 'CsmOperationDescriptionProperties', - 'CsmOperationDisplay', - 'CsmPublishingProfileOptions', - 'CsmSlotEntity', - 'CsmUsageQuota', - 'CustomHostnameAnalysisResult', - 'DatabaseBackupSetting', - 'DataSource', - 'DataTableResponseColumn', - 'DataTableResponseObject', - 'DefaultErrorResponse', 'DefaultErrorResponseException', - 'DefaultErrorResponseError', - 'DefaultErrorResponseErrorDetailsItem', - 'DeletedAppRestoreRequest', - 'DeletedSite', - 'Deployment', - 'DeploymentLocations', - 'DetectorAbnormalTimePeriod', - 'DetectorDefinition', - 'DetectorInfo', - 'DetectorResponse', - 'DiagnosticAnalysis', - 'DiagnosticCategory', - 'DiagnosticData', - 'DiagnosticDetectorResponse', - 'DiagnosticMetricSample', - 'DiagnosticMetricSet', - 'Dimension', - 'Domain', - 'DomainAvailablilityCheckResult', - 'DomainControlCenterSsoRequest', - 'DomainOwnershipIdentifier', - 'DomainPatchResource', - 'DomainPurchaseConsent', - 'DomainRecommendationSearchParameters', - 'EnabledConfig', - 'EndpointDependency', - 'EndpointDetail', - 'ErrorEntity', - 'Experiments', - 'FileSystemApplicationLogsConfig', - 'FileSystemHttpLogsConfig', - 'FunctionEnvelope', - 'FunctionSecrets', - 'GeoDistribution', - 'GeoRegion', - 'GlobalCsmSkuDescription', - 'HandlerMapping', - 'HostingEnvironmentDeploymentInfo', - 'HostingEnvironmentDiagnostics', - 'HostingEnvironmentProfile', - 'HostKeys', - 'HostName', - 'HostNameBinding', - 'HostNameSslState', - 'HttpLogsConfig', - 'HybridConnection', - 'HybridConnectionKey', - 'HybridConnectionLimits', - 'Identifier', - 'InboundEnvironmentEndpoint', - 'IpSecurityRestriction', - 'KeyInfo', - 'LocalizableString', - 'LogSpecification', - 'ManagedServiceIdentity', - 'ManagedServiceIdentityUserAssignedIdentitiesValue', - 'MetricAvailabilily', - 'MetricAvailability', - 'MetricDefinition', - 'MetricSpecification', - 'MigrateMySqlRequest', - 'MigrateMySqlStatus', - 'MSDeploy', - 'MSDeployLog', - 'MSDeployLogEntry', - 'MSDeployStatus', - 'NameIdentifier', - 'NameValuePair', - 'NetworkAccessControlEntry', - 'NetworkFeatures', - 'NetworkTrace', - 'Operation', - 'OutboundEnvironmentEndpoint', - 'PerfMonResponse', - 'PerfMonSample', - 'PerfMonSet', - 'PremierAddOn', - 'PremierAddOnOffer', - 'PremierAddOnPatchResource', - 'PrivateAccess', - 'PrivateAccessSubnet', - 'PrivateAccessVirtualNetwork', - 'ProcessInfo', - 'ProcessModuleInfo', - 'ProcessThreadInfo', - 'ProxyOnlyResource', - 'PublicCertificate', - 'PushSettings', - 'RampUpRule', - 'Recommendation', - 'RecommendationRule', - 'ReissueCertificateOrderRequest', - 'RelayServiceConnectionEntity', - 'Rendering', - 'RenewCertificateOrderRequest', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceHealthMetadata', - 'ResourceMetric', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceMetricName', - 'ResourceMetricProperty', - 'ResourceMetricValue', - 'ResourceNameAvailability', - 'ResourceNameAvailabilityRequest', - 'ResponseMetaData', - 'RestoreRequest', - 'ServiceSpecification', - 'Site', - 'SiteAuthSettings', - 'SiteCloneability', - 'SiteCloneabilityCriterion', - 'SiteConfig', - 'SiteConfigResource', - 'SiteConfigurationSnapshotInfo', - 'SiteExtensionInfo', - 'SiteInstance', - 'SiteLimits', - 'SiteLogsConfig', - 'SiteMachineKey', - 'SitePatchResource', - 'SitePhpErrorLogFlag', - 'SiteSeal', - 'SiteSealRequest', - 'SiteSourceControl', - 'SkuCapacity', - 'SkuDescription', - 'SkuInfo', - 'SkuInfos', - 'SlotConfigNamesResource', - 'SlotDifference', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'Snapshot', - 'SnapshotRecoverySource', - 'SnapshotRestoreRequest', - 'Solution', - 'SourceControl', - 'StackMajorVersion', - 'StackMinorVersion', - 'StampCapacity', - 'StatusCodesBasedTrigger', - 'StorageMigrationOptions', - 'StorageMigrationResponse', - 'StringDictionary', - 'SwiftVirtualNetwork', - 'TldLegalAgreement', - 'TopLevelDomain', - 'TopLevelDomainAgreementOption', - 'TriggeredJobHistory', - 'TriggeredJobRun', - 'TriggeredWebJob', - 'Usage', - 'User', - 'ValidateContainerSettingsRequest', - 'ValidateRequest', - 'ValidateResponse', - 'ValidateResponseError', - 'VirtualApplication', - 'VirtualDirectory', - 'VirtualIPMapping', - 'VirtualNetworkProfile', - 'VnetGateway', - 'VnetInfo', - 'VnetParameters', - 'VnetRoute', - 'VnetValidationFailureDetails', - 'VnetValidationTestFailure', - 'WebAppCollection', - 'WebJob', - 'WorkerPool', - 'WorkerPoolResource', - 'AppServiceCertificateOrderPaged', - 'AppServiceCertificateResourcePaged', - 'CsmOperationDescriptionPaged', - 'DomainPaged', - 'NameIdentifierPaged', - 'DomainOwnershipIdentifierPaged', - 'TopLevelDomainPaged', - 'TldLegalAgreementPaged', - 'CertificatePaged', - 'DeletedSitePaged', - 'DetectorResponsePaged', - 'DiagnosticCategoryPaged', - 'AnalysisDefinitionPaged', - 'DetectorDefinitionPaged', - 'ApplicationStackPaged', - 'RecommendationPaged', - 'SourceControlPaged', - 'BillingMeterPaged', - 'GeoRegionPaged', - 'IdentifierPaged', - 'PremierAddOnOfferPaged', - 'SitePaged', - 'BackupItemPaged', - 'SiteConfigResourcePaged', - 'SiteConfigurationSnapshotInfoPaged', - 'ContinuousWebJobPaged', - 'DeploymentPaged', - 'FunctionEnvelopePaged', - 'HostNameBindingPaged', - 'SiteInstancePaged', - 'ProcessInfoPaged', - 'ProcessModuleInfoPaged', - 'ProcessThreadInfoPaged', - 'ResourceMetricDefinitionPaged', - 'ResourceMetricPaged', - 'PerfMonResponsePaged', - 'PublicCertificatePaged', - 'SiteExtensionInfoPaged', - 'SlotDifferencePaged', - 'SnapshotPaged', - 'TriggeredWebJobPaged', - 'TriggeredJobHistoryPaged', - 'CsmUsageQuotaPaged', - 'WebJobPaged', - 'AppServiceEnvironmentResourcePaged', - 'StampCapacityPaged', - 'InboundEnvironmentEndpointPaged', - 'WorkerPoolResourcePaged', - 'SkuInfoPaged', - 'UsagePaged', - 'OutboundEnvironmentEndpointPaged', - 'AppServicePlanPaged', - 'StrPaged', - 'HybridConnectionPaged', - 'ResourceHealthMetadataPaged', - 'KeyVaultSecretStatus', - 'CertificateProductType', - 'ProvisioningState', - 'CertificateOrderStatus', - 'CertificateOrderActionType', - 'RouteType', - 'ManagedServiceIdentityType', - 'IpFilterTag', - 'AutoHealActionType', - 'ConnectionStringType', - 'AzureStorageType', - 'AzureStorageState', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'FtpsState', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'RedundancyMode', - 'StatusOptions', - 'DomainStatus', - 'AzureResourceType', - 'CustomHostNameDnsRecordType', - 'HostNameType', - 'DnsType', - 'DomainType', - 'HostingEnvironmentStatus', - 'InternalLoadBalancingMode', - 'ComputeModeOptions', - 'WorkerSizeOptions', - 'AccessControlEntryAction', - 'OperationStatus', - 'IssueType', - 'SolutionType', - 'RenderingType', - 'ResourceScopeType', - 'NotificationLevel', - 'Channels', - 'AppServicePlanRestrictions', - 'InAvailabilityReasonType', - 'CheckNameResourceTypes', - 'ValidateResourceTypes', - 'LogLevel', - 'BackupItemStatus', - 'DatabaseType', - 'FrequencyUnit', - 'ContinuousWebJobStatus', - 'WebJobType', - 'PublishingProfileFormat', - 'DnsVerificationTestResult', - 'MSDeployLogEntryType', - 'MSDeployProvisioningState', - 'MySqlMigrationType', - 'PublicCertificateLocation', - 'BackupRestoreOperationType', - 'UnauthenticatedClientAction', - 'BuiltInAuthenticationProvider', - 'CloneAbilityResult', - 'SiteExtensionType', - 'TriggeredWebJobStatus', - 'SkuName', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models.py deleted file mode 100644 index 1e45858b69f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models.py +++ /dev/null @@ -1,12295 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2018_02_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2018_02_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(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.get('address1', None) - self.address2 = kwargs.get('address2', None) - self.city = kwargs.get('city', None) - self.country = kwargs.get('country', None) - self.postal_code = kwargs.get('postal_code', None) - self.state = kwargs.get('state', None) - - -class AddressResponse(Model): - """Describes main public IP address and any extra virtual IPs. - - :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.v2018_02_01.models.VirtualIPMapping] - """ - - _attribute_map = { - 'service_ip_address': {'key': 'serviceIpAddress', 'type': 'str'}, - 'internal_ip_address': {'key': 'internalIpAddress', 'type': 'str'}, - 'outbound_ip_addresses': {'key': 'outboundIpAddresses', 'type': '[str]'}, - 'vip_mappings': {'key': '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 AnalysisData(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.v2018_02_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2018_02_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2018_02_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 ProxyOnlyResource(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 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(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 ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2018_02_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2018_02_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2018_02_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(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.v2018_02_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2018_02_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]'}, - } - - 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) - - -class AppServiceCertificate(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.v2018_02_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': 'KeyVaultSecretStatus'}, - } - - 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 Resource(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: 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.get('location', None) - 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: Resource tags. - :type tags: dict[str, str] - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2018_02_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2018_02_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2018_02_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.v2018_02_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2018_02_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2018_02_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2018_02_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2018_02_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.v2018_02_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2018_02_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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.v2018_02_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': 'KeyVaultSecretStatus'}, - } - - 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: 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.v2018_02_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': 'KeyVaultSecretStatus'}, - } - - 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(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2018_02_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, - 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2018_02_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) - self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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: Resource tags. - :type tags: dict[str, str] - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2018_02_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentResource, self).__init__(**kwargs) - self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) - self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) - - -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: Resource tags. - :type tags: dict[str, 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.v2018_02_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.v2018_02_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2018_02_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2018_02_01.models.SkuDescription - """ - - _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}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, 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.sku = kwargs.get('sku', 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.v2018_02_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.v2018_02_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2018_02_01.models.ProvisioningState - """ - - _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': 'StatusOptions'}, - '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': 'ProvisioningState'}, - } - - 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 - - -class AutoHealActions(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.v2018_02_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2018_02_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': 'AutoHealActionType'}, - '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(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(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.v2018_02_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2018_02_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2018_02_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) - - -class AzureBlobStorageApplicationLogsConfig(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.v2018_02_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': 'LogLevel'}, - '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(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 AzureStorageInfoValue(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.v2018_02_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' - :vartype state: str or - ~azure.mgmt.web.v2018_02_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - 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.v2018_02_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(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.v2018_02_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': 'LogLevel'}, - '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.get('sas_url', None) - - -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 backup_item_name: Name of this backup. - :vartype backup_item_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.v2018_02_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 - :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.v2018_02_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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.backup_item_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 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. - - 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 - :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: Required. 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.v2018_02_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2018_02_01.models.DatabaseBackupSetting] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account_url': {'required': 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(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). Default value: 7 . - :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.v2018_02_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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 - """ - - _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'}, - } - - 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) - - -class Capability(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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2018_02_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.v2018_02_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', '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) - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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 - """ - - _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.v2018_02_01.models.CertificateOrderActionType - :ivar created_at: Time at which the certificate action was performed. - :vartype created_at: 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': 'CertificateOrderActionType'}, - '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 CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2018_02_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.v2018_02_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', '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) - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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.get('source_web_app_id', None) - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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.v2018_02_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(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.v2018_02_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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(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.v2018_02_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, **kwargs): - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) - - -class Contact(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.v2018_02_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.get('email', None) - self.fax = kwargs.get('fax', None) - self.job_title = kwargs.get('job_title', None) - self.name_first = kwargs.get('name_first', None) - self.name_last = kwargs.get('name_last', None) - self.name_middle = kwargs.get('name_middle', None) - self.organization = kwargs.get('organization', None) - self.phone = kwargs.get('phone', 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.v2018_02_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.v2018_02_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': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - '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 CorsSettings(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(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 CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2018_02_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2018_02_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(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2018_02_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(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 CsmPublishingProfileOptions(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.v2018_02_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(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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.get('target_slot', None) - self.preserve_vnet = kwargs.get('preserve_vnet', None) - - -class CsmUsageQuota(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 - :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.v2018_02_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 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: true if hostname is - already verified; otherwise, 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.v2018_02_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.v2018_02_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_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_cname_records = kwargs.get('alternate_cname_records', None) - self.alternate_txt_records = kwargs.get('alternate_txt_records', None) - - -class DatabaseBackupSetting(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.v2018_02_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.get('database_type', None) - 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 DataSource(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.v2018_02_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(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(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.v2018_02_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(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.v2018_02_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 DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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.v2018_02_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(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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_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.deleted_site_kind = None - self.geo_region_name = 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 - :param end_time: End time. - :type end_time: 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 DeploymentLocations(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.v2018_02_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironment] - :param hosting_environment_deployment_infos: Available App Service - Environments with basic information. - :type hosting_environment_deployment_infos: - list[~azure.mgmt.web.v2018_02_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(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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.v2018_02_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.v2018_02_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2018_02_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': 'IssueType'}, - '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(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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.v2018_02_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2018_02_01.models.DiagnosticData] - """ - - _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]'}, - } - - def __init__(self, **kwargs): - super(DetectorResponse, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.dataset = kwargs.get('dataset', 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 - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2018_02_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2018_02_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.v2018_02_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 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 DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2018_02_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2018_02_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 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 - :param end_time: End time of the period - :type end_time: 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.v2018_02_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2018_02_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2018_02_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2018_02_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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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(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 - :param end_time: End time of the period - :type end_time: 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.v2018_02_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(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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2018_02_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.v2018_02_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.v2018_02_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2018_02_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2018_02_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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 DomainAvailablilityCheckResult(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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.v2018_02_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - def __init__(self, **kwargs): - super(DomainAvailablilityCheckResult, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.available = kwargs.get('available', None) - self.domain_type = kwargs.get('domain_type', None) - - -class DomainControlCenterSsoRequest(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 DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2018_02_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.v2018_02_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.v2018_02_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2018_02_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2018_02_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(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 - 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 - """ - - _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(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(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(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.v2018_02_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(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_accessable: Whether it is possible to create a TCP connection - from the App Service Environment to this IpAddress at this Port. - :type is_accessable: bool - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'latency': {'key': 'latency', 'type': 'float'}, - 'is_accessable': {'key': 'isAccessable', '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_accessable = kwargs.get('is_accessable', None) - - -class ErrorEntity(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.v2018_02_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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2018_02_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 FileSystemApplicationLogsConfig(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2018_02_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, **kwargs): - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = kwargs.get('level', "Off") - - -class FileSystemHttpLogsConfig(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 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: 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 FunctionSecrets(ProxyOnlyResource): - """Function secrets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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: Secret key. - :type key: str - :param trigger_url: Trigger URL. - :type trigger_url: 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'}, - 'key': {'key': 'properties.key', 'type': 'str'}, - 'trigger_url': {'key': 'properties.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 GeoDistribution(Model): - """A global distribution definition. - - :param location: Location. - :type location: str - :param number_of_workers: NumberOfWorkers. - :type number_of_workers: int - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GeoDistribution, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.number_of_workers = kwargs.get('number_of_workers', 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'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'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoRegion, self).__init__(**kwargs) - self.description = None - self.display_name = None - - -class GlobalCsmSkuDescription(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.v2018_02_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.v2018_02_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 HandlerMapping(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(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(Model): - """Diagnostics for an App Service Environment. - - :param name: Name/identifier of the diagnostics. - :type name: str - :param diagnosics_output: Diagnostics output. - :type diagnosics_output: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'diagnosics_output': {'key': 'diagnosicsOutput', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.diagnosics_output = kwargs.get('diagnosics_output', None) - - -class HostingEnvironmentProfile(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(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(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.v2018_02_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.v2018_02_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.v2018_02_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - 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.v2018_02_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.v2018_02_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2018_02_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2018_02_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - '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 HostNameSslState(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.v2018_02_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 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.v2018_02_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2018_02_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2018_02_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 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 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identifier, self).__init__(**kwargs) - self.identifier_id = kwargs.get('identifier_id', None) - - -class InboundEnvironmentEndpoint(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 IpSecurityRestriction(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' - :type tag: str or ~azure.mgmt.web.v2018_02_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 - """ - - _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': 'IpFilterTag'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', '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) - - -class KeyInfo(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 LocalizableString(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 LogSpecification(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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', '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) - - -class ManagedServiceIdentity(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.v2018_02_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.v2018_02_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _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': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailabilily(Model): - """Metric availability and retention. - - :param time_grain: Time grain. - :type time_grain: str - :param retention: Retention period for the current time grain. - :type retention: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailabilily, self).__init__(**kwargs) - self.time_grain = kwargs.get('time_grain', None) - self.retention = kwargs.get('retention', None) - - -class MetricAvailability(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 MetricDefinition(ProxyOnlyResource): - """Metadata for a metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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.v2018_02_01.models.MetricAvailabilily] - :ivar display_name: Friendly name shown in the UI. - :vartype display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'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'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, - 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.display_name = None - - -class MetricSpecification(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.v2018_02_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2018_02_01.models.MetricAvailability] - """ - - _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]'}, - } - - 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) - - -class MigrateMySqlRequest(ProxyOnlyResource): - """MySQL migration request. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2018_02_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - 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.v2018_02_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': 'OperationStatus'}, - '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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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.v2018_02_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(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2018_02_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': 'MSDeployLogEntryType'}, - '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.v2018_02_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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(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 NameValuePair(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 NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2018_02_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = kwargs.get('action', None) - self.description = kwargs.get('description', None) - self.order = kwargs.get('order', None) - self.remote_subnet = kwargs.get('remote_subnet', 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.v2018_02_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2018_02_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(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 Operation(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.v2018_02_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2018_02_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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(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.v2018_02_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 PerfMonResponse(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.v2018_02_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(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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(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 - :param end_time: End time of the period. - :type end_time: 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.v2018_02_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: 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: true if promotion code is - required; otherwise, 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.v2018_02_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': 'AppServicePlanRestrictions'}, - '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 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.v2018_02_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(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(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.v2018_02_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 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.v2018_02_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.v2018_02_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 - :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 - :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 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 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 - :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 priviledged_processor_time: Privileged processor time. - :type priviledged_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'}, - 'priviledged_processor_time': {'key': 'properties.priviledged_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.priviledged_processor_time = kwargs.get('priviledged_processor_time', None) - self.state = kwargs.get('state', None) - self.wait_reason = kwargs.get('wait_reason', 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.v2018_02_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': 'PublicCertificateLocation'}, - '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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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 - :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.v2018_02_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.v2018_02_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.v2018_02_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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 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.v2018_02_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.v2018_02_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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 Rendering(Model): - """Instructions for rendering the data. - - :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', - 'TimeSeries', 'TimeSeriesPerInstance' - :type type: str or ~azure.mgmt.web.v2018_02_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': 'RenderingType'}, - '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(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 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 ResourceMetric(Model): - """Object representing a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of metric. - :vartype name: ~azure.mgmt.web.v2018_02_01.models.ResourceMetricName - :ivar unit: Metric unit. - :vartype unit: str - :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D - :vartype time_grain: str - :ivar start_time: Metric start time. - :vartype start_time: datetime - :ivar end_time: Metric end time. - :vartype end_time: datetime - :ivar resource_id: Metric resource Id. - :vartype resource_id: str - :ivar id: Resource Id. - :vartype id: str - :ivar metric_values: Metric values. - :vartype metric_values: - list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricValue] - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricProperty] - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'id': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'ResourceMetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs): - super(ResourceMetric, self).__init__(**kwargs) - self.name = None - self.unit = None - self.time_grain = None - self.start_time = None - self.end_time = None - self.resource_id = None - self.id = None - self.metric_values = None - self.properties = None - - -class ResourceMetricAvailability(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.v2018_02_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 ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ResourceMetricProperty(Model): - """Resource metric property. - - :param key: Key for resource metric property. - :type key: str - :param value: Value of pair. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricProperty, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ResourceMetricValue(Model): - """Value of resource metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Value timestamp. - :vartype timestamp: str - :ivar average: Value average. - :vartype average: float - :ivar minimum: Value minimum. - :vartype minimum: float - :ivar maximum: Value maximum. - :vartype maximum: float - :ivar total: Value total. - :vartype total: float - :ivar count: Value count. - :vartype count: float - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricProperty] - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'average': {'readonly': True}, - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'total': {'readonly': True}, - 'count': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'average': {'key': 'average', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs): - super(ResourceMetricValue, self).__init__(**kwargs) - self.timestamp = None - self.average = None - self.minimum = None - self.maximum = None - self.total = None - self.count = None - self.properties = None - - -class ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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.v2018_02_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(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.v2018_02_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.get('name', None) - self.type = kwargs.get('type', None) - self.is_fqdn = kwargs.get('is_fqdn', None) - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2018_02_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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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.v2018_02_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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.v2018_02_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - '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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2018_02_01.models.MetricSpecification] - :param log_specifications: - :type log_specifications: - list[~azure.mgmt.web.v2018_02_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: Resource tags. - :type tags: dict[str, str] - :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.v2018_02_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2018_02_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.v2018_02_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2018_02_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2018_02_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2018_02_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: true if the app is a default - container; otherwise, 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.v2018_02_01.models.SlotSwapStatus - :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.v2018_02_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 geo_distributions: GeoDistributions for this site - :type geo_distributions: - list[~azure.mgmt.web.v2018_02_01.models.GeoDistribution] - :param identity: - :type identity: ~azure.mgmt.web.v2018_02_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) - self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.geo_distributions = kwargs.get('geo_distributions', None) - self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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.v2018_02_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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' - :type default_provider: str or - ~azure.mgmt.web.v2018_02_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_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 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_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]'}, - 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, - 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, - 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, - 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, - 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, - 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, - 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, - 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, - 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, - 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, - 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', '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.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_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.google_client_id = kwargs.get('google_client_id', None) - self.google_client_secret = kwargs.get('google_client_secret', None) - self.google_oauth_scopes = kwargs.get('google_oauth_scopes', None) - self.facebook_app_id = kwargs.get('facebook_app_id', None) - self.facebook_app_secret = kwargs.get('facebook_app_secret', None) - self.facebook_oauth_scopes = kwargs.get('facebook_oauth_scopes', None) - self.twitter_consumer_key = kwargs.get('twitter_consumer_key', None) - self.twitter_consumer_secret = kwargs.get('twitter_consumer_secret', 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_oauth_scopes = kwargs.get('microsoft_account_oauth_scopes', None) - - -class SiteCloneability(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.v2018_02_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2018_02_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.v2018_02_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2018_02_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - '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(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(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. Default value: - "v4.6" . - :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 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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2018_02_01.models.NameValuePair] - :param azure_storage_accounts: User-provided Azure storage accounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2018_02_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2018_02_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2018_02_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' - :type scm_type: str or ~azure.mgmt.web.v2018_02_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2018_02_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2018_02_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2018_02_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2018_02_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2018_02_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2018_02_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2018_02_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2018_02_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2018_02_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2018_02_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2018_02_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. Default value: True . - :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.v2018_02_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.v2018_02_01.models.FtpsState - :param reserved_instance_count: Number of reserved instances. - This setting only applies to the Consumption Plan - :type reserved_instance_count: int - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'reserved_instance_count': {'maximum': 10, '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'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, - 'reserved_instance_count': {'key': 'reservedInstanceCount', '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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.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.ftps_state = kwargs.get('ftps_state', None) - self.reserved_instance_count = kwargs.get('reserved_instance_count', 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. Default value: - "v4.6" . - :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 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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2018_02_01.models.NameValuePair] - :param azure_storage_accounts: User-provided Azure storage accounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2018_02_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2018_02_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2018_02_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' - :type scm_type: str or ~azure.mgmt.web.v2018_02_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2018_02_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2018_02_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2018_02_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2018_02_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2018_02_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2018_02_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2018_02_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2018_02_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2018_02_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2018_02_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2018_02_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. Default value: True . - :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.v2018_02_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.v2018_02_01.models.FtpsState - :param reserved_instance_count: Number of reserved instances. - This setting only applies to the Consumption Plan - :type reserved_instance_count: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - 'reserved_instance_count': {'maximum': 10, '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'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, - 'push': {'key': 'properties.push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, - 'reserved_instance_count': {'key': 'properties.reservedInstanceCount', '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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.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.ftps_state = kwargs.get('ftps_state', None) - self.reserved_instance_count = kwargs.get('reserved_instance_count', 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 - :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 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.v2018_02_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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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': 'SiteExtensionType'}, - '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 SiteInstance(ProxyOnlyResource): - """Instance 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 site_instance_name: Name of instance. - :vartype site_instance_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'site_instance_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'}, - 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SiteInstance, self).__init__(**kwargs) - self.site_instance_name = None - - -class SiteLimits(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.v2018_02_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2018_02_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2018_02_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2018_02_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(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 - :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.v2018_02_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2018_02_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.v2018_02_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2018_02_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2018_02_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2018_02_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: true if the app is a default - container; otherwise, 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.v2018_02_01.models.SlotSwapStatus - :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.v2018_02_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 geo_distributions: GeoDistributions for this site - :type geo_distributions: - list[~azure.mgmt.web.v2018_02_01.models.GeoDistribution] - :param identity: - :type identity: ~azure.mgmt.web.v2018_02_01.models.ManagedServiceIdentity - """ - - _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'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(SitePatchResource, self).__init__(**kwargs) - 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) - self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.geo_distributions = kwargs.get('geo_distributions', None) - self.identity = kwargs.get('identity', 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(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.get('html', None) - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, - 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, - 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, - } - - 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.deployment_rollback_enabled = kwargs.get('deployment_rollback_enabled', None) - self.is_mercurial = kwargs.get('is_mercurial', None) - - -class SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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.v2018_02_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.v2018_02_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(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.v2018_02_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2018_02_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 SkuInfos(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.v2018_02_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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.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 SnapshotRecoverySource(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. - - 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 - :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.v2018_02_01.models.SnapshotRecoverySource - :param overwrite: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': 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(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.v2018_02_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2018_02_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': 'SolutionType'}, - '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 - """ - - _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 StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2018_02_01.models.StackMinorVersion] - :param application_insights: true if this supports - Application Insights; otherwise, false. - :type application_insights: 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'}, - } - - 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) - - -class StackMinorVersion(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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(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.v2018_02_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'Default' - :type worker_size: str or - ~azure.mgmt.web.v2018_02_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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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 StatusCodesBasedTrigger(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 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'}, - '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.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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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 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(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.get('agreement_key', None) - self.title = kwargs.get('title', None) - self.content = kwargs.get('content', None) - self.url = kwargs.get('url', 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 true, then the top level domain supports - domain privacy; otherwise, 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(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - 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 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.v2018_02_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 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.v2018_02_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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': 'TriggeredWebJobStatus'}, - '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.v2018_02_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.v2018_02_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': 'WebJobType'}, - '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 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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2018_02_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': 'ComputeModeOptions'}, - '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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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 ValidateContainerSettingsRequest(Model): - """Container settings validation request context. - - :param base_url: Base URL of the container registry - :type base_url: str - :param username: Username for to access the container registry - :type username: str - :param password: Password for to access the container registry - :type password: str - :param repository: Repository name (image name) - :type repository: str - :param tag: Image tag - :type tag: str - :param platform: Platform (windows or linux) - :type platform: str - """ - - _attribute_map = { - 'base_url': {'key': 'baseUrl', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - 'platform': {'key': 'platform', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ValidateContainerSettingsRequest, self).__init__(**kwargs) - self.base_url = kwargs.get('base_url', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.repository = kwargs.get('repository', None) - self.tag = kwargs.get('tag', None) - self.platform = kwargs.get('platform', None) - - -class ValidateRequest(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' - :type type: str or - ~azure.mgmt.web.v2018_02_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: true if App Service plan is running as a - windows container - :type is_xenon: bool - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ValidateRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.location = kwargs.get('location', None) - 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) - - -class ValidateResponse(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.v2018_02_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(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(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2018_02_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(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(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 - """ - - _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'}, - } - - 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) - - -class VirtualNetworkProfile(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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.get('id', None) - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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.v2018_02_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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'}, - } - - 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) - - -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.v2018_02_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 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.v2018_02_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'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, **kwargs): - super(VnetValidationFailureDetails, self).__init__(**kwargs) - self.failed = kwargs.get('failed', None) - self.failed_tests = kwargs.get('failed_tests', 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(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.v2018_02_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.get('value', None) - 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.v2018_02_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': 'WebJobType'}, - '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 WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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.v2018_02_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 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.v2018_02_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] - :param sku: - :type sku: ~azure.mgmt.web.v2018_02_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(WorkerPoolResource, self).__init__(**kwargs) - 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 - self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models_py3.py deleted file mode 100644 index fd7a60480c3..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_models_py3.py +++ /dev/null @@ -1,12295 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2018_02_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2018_02_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: - super(AbnormalTimePeriod, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.events = events - self.solutions = solutions - - -class Address(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: str=None, **kwargs) -> None: - 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 AddressResponse(Model): - """Describes main public IP address and any extra virtual IPs. - - :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.v2018_02_01.models.VirtualIPMapping] - """ - - _attribute_map = { - 'service_ip_address': {'key': 'serviceIpAddress', 'type': 'str'}, - 'internal_ip_address': {'key': 'internalIpAddress', 'type': 'str'}, - 'outbound_ip_addresses': {'key': 'outboundIpAddresses', 'type': '[str]'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - } - - def __init__(self, *, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: - super(AddressResponse, self).__init__(**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 AnalysisData(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.v2018_02_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2018_02_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2018_02_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: - 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 ProxyOnlyResource(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: str=None, **kwargs) -> None: - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.type = 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, *, kind: str=None, **kwargs) -> None: - super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) - self.description = None - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2018_02_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2018_02_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2018_02_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: - 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(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.v2018_02_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2018_02_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]'}, - } - - def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: - super(ApplicationStack, self).__init__(**kwargs) - self.name = name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - - -class AppServiceCertificate(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.v2018_02_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2018_02_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2018_02_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2018_02_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.v2018_02_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2018_02_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, location: str, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2018_02_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2018_02_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2018_02_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.v2018_02_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2018_02_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 - - -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.v2018_02_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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: 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.v2018_02_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2018_02_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, - 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2018_02_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) - self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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.v2018_02_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.v2018_02_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2018_02_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2018_02_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2018_02_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2018_02_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2018_02_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2018_02_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2018_02_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_environment_resource_name = app_service_environment_resource_name - self.app_service_environment_resource_location = app_service_environment_resource_location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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: Resource tags. - :type tags: dict[str, 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.v2018_02_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.v2018_02_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2018_02_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2018_02_01.models.SkuDescription - """ - - _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}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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.sku = sku - - -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.v2018_02_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.v2018_02_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2018_02_01.models.ProvisioningState - """ - - _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': 'StatusOptions'}, - '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': 'ProvisioningState'}, - } - - def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: - 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 - - -class AutoHealActions(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.v2018_02_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2018_02_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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.v2018_02_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2018_02_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2018_02_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -class AzureBlobStorageApplicationLogsConfig(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.v2018_02_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, - } - - def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: - super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - self.sas_url = sas_url - self.retention_in_days = retention_in_days - - -class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) - self.sas_url = sas_url - self.retention_in_days = retention_in_days - self.enabled = enabled - - -class AzureStorageInfoValue(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.v2018_02_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' - :vartype state: str or - ~azure.mgmt.web.v2018_02_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: - 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.v2018_02_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: str=None, properties=None, **kwargs) -> None: - super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class AzureTableStorageApplicationLogsConfig(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.v2018_02_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - } - - def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: - 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 backup_item_name: Name of this backup. - :vartype backup_item_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.v2018_02_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 - :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.v2018_02_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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: str=None, **kwargs) -> None: - super(BackupItem, self).__init__(kind=kind, **kwargs) - self.backup_id = None - self.storage_account_url = None - self.blob_name = None - self.backup_item_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 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. - - 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 - :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: Required. 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.v2018_02_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2018_02_01.models.DatabaseBackupSetting] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account_url': {'required': 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, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: - 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(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). Default value: 7 . - :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.v2018_02_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: - 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 - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: - 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 - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - 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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2018_02_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.v2018_02_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - } - - def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: - 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 - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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) -> None: - 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 - """ - - _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: - 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.v2018_02_01.models.CertificateOrderActionType - :ivar created_at: Time at which the certificate action was performed. - :vartype created_at: 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': 'CertificateOrderActionType'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) - self.action_type = None - self.created_at = None - - -class CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2018_02_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.v2018_02_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - } - - def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: - 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 - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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.v2018_02_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: str=None, properties=None, **kwargs) -> None: - super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class ConnStringInfo(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.v2018_02_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class ConnStringValueTypePair(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.v2018_02_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, value: str, type, **kwargs) -> None: - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = value - self.type = type - - -class Contact(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.v2018_02_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: - 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 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.v2018_02_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.v2018_02_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': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.support_credentials = support_credentials - - -class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: - super(CsmMoveResourceEnvelope, self).__init__(**kwargs) - self.target_resource_group = target_resource_group - self.resources = resources - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2018_02_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2018_02_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(CsmOperationDescription, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class CsmOperationDescriptionProperties(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2018_02_01.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(CsmOperationDescriptionProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(CsmOperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class CsmPublishingProfileOptions(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.v2018_02_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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: - super(CsmPublishingProfileOptions, self).__init__(**kwargs) - self.format = format - self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints - - -class CsmSlotEntity(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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) -> None: - super(CsmSlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.preserve_vnet = preserve_vnet - - -class CsmUsageQuota(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 - :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.v2018_02_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - 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 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: true if hostname is - already verified; otherwise, 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.v2018_02_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.v2018_02_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, - 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: - 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_cname_records = alternate_cname_records - self.alternate_txt_records = alternate_txt_records - - -class DatabaseBackupSetting(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.v2018_02_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: - 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 DataSource(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.v2018_02_01.models.NameValuePair] - """ - - _attribute_map = { - 'instructions': {'key': 'instructions', 'type': '[str]'}, - 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, - } - - def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: - super(DataSource, self).__init__(**kwargs) - self.instructions = instructions - self.data_source_uri = data_source_uri - - -class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: - super(DataTableResponseColumn, self).__init__(**kwargs) - self.column_name = column_name - self.data_type = data_type - self.column_type = column_type - - -class DataTableResponseObject(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.v2018_02_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: str=None, columns=None, rows=None, **kwargs) -> None: - super(DataTableResponseObject, self).__init__(**kwargs) - self.table_name = table_name - self.columns = columns - self.rows = rows - - -class DefaultErrorResponse(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.v2018_02_01.models.DefaultErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, - } - - def __init__(self, **kwargs) -> None: - super(DefaultErrorResponse, self).__init__(**kwargs) - self.error = None - - -class DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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.v2018_02_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=None, **kwargs) -> None: - super(DefaultErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = details - self.innererror = None - - -class DefaultErrorResponseErrorDetailsItem(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) -> None: - 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: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: - 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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, - 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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.deleted_site_kind = None - self.geo_region_name = 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 - :param end_time: End time. - :type end_time: 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: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: - 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 DeploymentLocations(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.v2018_02_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironment] - :param hosting_environment_deployment_infos: Available App Service - Environments with basic information. - :type hosting_environment_deployment_infos: - list[~azure.mgmt.web.v2018_02_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: - super(DeploymentLocations, self).__init__(**kwargs) - self.locations = locations - self.hosting_environments = hosting_environments - self.hosting_environment_deployment_infos = hosting_environment_deployment_infos - - -class DetectorAbnormalTimePeriod(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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.v2018_02_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.v2018_02_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2018_02_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': 'IssueType'}, - 'solutions': {'key': 'solutions', 'type': '[Solution]'}, - } - - def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(DetectorDefinition, self).__init__(kind=kind, **kwargs) - self.display_name = None - self.description = None - self.rank = None - self.is_enabled = None - - -class DetectorInfo(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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.v2018_02_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2018_02_01.models.DiagnosticData] - """ - - _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]'}, - } - - def __init__(self, *, kind: str=None, metadata=None, dataset=None, **kwargs) -> None: - super(DetectorResponse, self).__init__(kind=kind, **kwargs) - self.metadata = metadata - self.dataset = dataset - - -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 - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2018_02_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2018_02_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.v2018_02_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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) - self.description = None - - -class DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2018_02_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2018_02_01.models.Rendering - """ - - _attribute_map = { - 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, - 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, - } - - def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: - super(DiagnosticData, self).__init__(**kwargs) - self.table = table - self.rendering_properties = rendering_properties - - -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 - :param end_time: End time of the period - :type end_time: 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.v2018_02_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2018_02_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2018_02_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2018_02_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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: - 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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: - 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(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 - :param end_time: End time of the period - :type end_time: 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.v2018_02_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2018_02_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.v2018_02_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.v2018_02_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2018_02_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2018_02_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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 DomainAvailablilityCheckResult(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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.v2018_02_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: - super(DomainAvailablilityCheckResult, self).__init__(**kwargs) - self.name = name - self.available = available - self.domain_type = domain_type - - -class DomainControlCenterSsoRequest(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) -> None: - 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: str=None, ownership_id: str=None, **kwargs) -> None: - super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) - self.ownership_id = ownership_id - - -class DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2018_02_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2018_02_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.v2018_02_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.v2018_02_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2018_02_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2018_02_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2018_02_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.v2018_02_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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(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 - 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 - """ - - _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: - super(DomainPurchaseConsent, self).__init__(**kwargs) - self.agreement_keys = agreement_keys - self.agreed_by = agreed_by - self.agreed_at = agreed_at - - -class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: - super(DomainRecommendationSearchParameters, self).__init__(**kwargs) - self.keywords = keywords - self.max_domain_recommendations = max_domain_recommendations - - -class EnabledConfig(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: bool=None, **kwargs) -> None: - super(EnabledConfig, self).__init__(**kwargs) - self.enabled = enabled - - -class EndpointDependency(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.v2018_02_01.models.EndpointDetail] - """ - - _attribute_map = { - 'domain_name': {'key': 'domainName', 'type': 'str'}, - 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, - } - - def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: - super(EndpointDependency, self).__init__(**kwargs) - self.domain_name = domain_name - self.endpoint_details = endpoint_details - - -class EndpointDetail(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_accessable: Whether it is possible to create a TCP connection - from the App Service Environment to this IpAddress at this Port. - :type is_accessable: bool - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'latency': {'key': 'latency', 'type': 'float'}, - 'is_accessable': {'key': 'isAccessable', 'type': 'bool'}, - } - - def __init__(self, *, ip_address: str=None, port: int=None, latency: float=None, is_accessable: bool=None, **kwargs) -> None: - super(EndpointDetail, self).__init__(**kwargs) - self.ip_address = ip_address - self.port = port - self.latency = latency - self.is_accessable = is_accessable - - -class ErrorEntity(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.v2018_02_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: - 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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2018_02_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -class FileSystemApplicationLogsConfig(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2018_02_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, *, level="Off", **kwargs) -> None: - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - - -class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - super(FileSystemHttpLogsConfig, self).__init__(**kwargs) - self.retention_in_mb = retention_in_mb - self.retention_in_days = retention_in_days - self.enabled = enabled - - -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: 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: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: - 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 FunctionSecrets(ProxyOnlyResource): - """Function secrets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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: Secret key. - :type key: str - :param trigger_url: Trigger URL. - :type trigger_url: 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'}, - 'key': {'key': 'properties.key', 'type': 'str'}, - 'trigger_url': {'key': 'properties.trigger_url', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, key: str=None, trigger_url: str=None, **kwargs) -> None: - super(FunctionSecrets, self).__init__(kind=kind, **kwargs) - self.key = key - self.trigger_url = trigger_url - - -class GeoDistribution(Model): - """A global distribution definition. - - :param location: Location. - :type location: str - :param number_of_workers: NumberOfWorkers. - :type number_of_workers: int - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, - } - - def __init__(self, *, location: str=None, number_of_workers: int=None, **kwargs) -> None: - super(GeoDistribution, self).__init__(**kwargs) - self.location = location - self.number_of_workers = number_of_workers - - -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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'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'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(GeoRegion, self).__init__(kind=kind, **kwargs) - self.description = None - self.display_name = None - - -class GlobalCsmSkuDescription(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.v2018_02_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.v2018_02_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: - super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) - self.name = name - self.location = location - - -class HostingEnvironmentDiagnostics(Model): - """Diagnostics for an App Service Environment. - - :param name: Name/identifier of the diagnostics. - :type name: str - :param diagnosics_output: Diagnostics output. - :type diagnosics_output: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'diagnosics_output': {'key': 'diagnosicsOutput', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, diagnosics_output: str=None, **kwargs) -> None: - super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) - self.name = name - self.diagnosics_output = diagnosics_output - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: - super(HostKeys, self).__init__(**kwargs) - self.master_key = master_key - self.function_keys = function_keys - self.system_keys = system_keys - - -class HostName(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.v2018_02_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.v2018_02_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.v2018_02_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: - 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.v2018_02_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.v2018_02_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2018_02_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2018_02_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: - 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 HostNameSslState(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.v2018_02_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 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.v2018_02_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2018_02_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2018_02_01.models.AzureBlobStorageHttpLogsConfig - """ - - _attribute_map = { - 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, - 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, - } - - def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: - super(HttpLogsConfig, self).__init__(**kwargs) - self.file_system = file_system - self.azure_blob_storage = azure_blob_storage - - -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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.identifier_id = identifier_id - - -class InboundEnvironmentEndpoint(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: str=None, endpoints=None, ports=None, **kwargs) -> None: - super(InboundEnvironmentEndpoint, self).__init__(**kwargs) - self.description = description - self.endpoints = endpoints - self.ports = ports - - -class IpSecurityRestriction(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' - :type tag: str or ~azure.mgmt.web.v2018_02_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 - """ - - _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': 'IpFilterTag'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, **kwargs) -> None: - 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 - - -class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: - super(KeyInfo, self).__init__(**kwargs) - self.name = name - self.value = value - - -class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: - super(LocalizableString, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class LogSpecification(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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: - super(LogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - - -class ManagedServiceIdentity(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.v2018_02_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.v2018_02_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _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': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - self.user_assigned_identities = user_assigned_identities - - -class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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) -> None: - super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailabilily(Model): - """Metric availability and retention. - - :param time_grain: Time grain. - :type time_grain: str - :param retention: Retention period for the current time grain. - :type retention: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - } - - def __init__(self, *, time_grain: str=None, retention: str=None, **kwargs) -> None: - super(MetricAvailabilily, self).__init__(**kwargs) - self.time_grain = time_grain - self.retention = retention - - -class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricDefinition(ProxyOnlyResource): - """Metadata for a metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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.v2018_02_01.models.MetricAvailabilily] - :ivar display_name: Friendly name shown in the UI. - :vartype display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'unit': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'metric_availabilities': {'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'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, - 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(MetricDefinition, self).__init__(kind=kind, **kwargs) - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.display_name = None - - -class MetricSpecification(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.v2018_02_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2018_02_01.models.MetricAvailability] - """ - - _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]'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, **kwargs) -> None: - 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 - - -class MigrateMySqlRequest(ProxyOnlyResource): - """MySQL migration request. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2018_02_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: - 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.v2018_02_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': 'OperationStatus'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: - 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.v2018_02_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: str=None, **kwargs) -> None: - super(MSDeployLog, self).__init__(kind=kind, **kwargs) - self.entries = None - - -class MSDeployLogEntry(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2018_02_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': 'MSDeployLogEntryType'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - 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.v2018_02_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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: str=None, **kwargs) -> None: - 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(Model): - """Identifies an object. - - :param name: Name of the object. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(NameIdentifier, self).__init__(**kwargs) - self.name = name - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2018_02_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = action - self.description = description - self.order = order - self.remote_subnet = remote_subnet - - -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.v2018_02_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2018_02_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: str=None, **kwargs) -> None: - 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(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: str=None, status: str=None, message: str=None, **kwargs) -> None: - super(NetworkTrace, self).__init__(**kwargs) - self.path = path - self.status = status - self.message = message - - -class Operation(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.v2018_02_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2018_02_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: - 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(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.v2018_02_01.models.EndpointDependency] - """ - - _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, - } - - def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: - super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) - self.category = category - self.endpoints = endpoints - - -class PerfMonResponse(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.v2018_02_01.models.PerfMonSet - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'PerfMonSet'}, - } - - def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: - super(PerfMonResponse, self).__init__(**kwargs) - self.code = code - self.message = message - self.data = data - - -class PerfMonSample(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: - super(PerfMonSample, self).__init__(**kwargs) - self.time = time - self.instance_name = instance_name - self.value = value - - -class PerfMonSet(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 - :param end_time: End time of the period. - :type end_time: 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.v2018_02_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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: 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: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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: true if promotion code is - required; otherwise, 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.v2018_02_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': 'AppServicePlanRestrictions'}, - '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: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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 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: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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.v2018_02_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: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: - super(PrivateAccess, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.virtual_networks = virtual_networks - - -class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: - super(PrivateAccessSubnet, self).__init__(**kwargs) - self.name = name - self.key = key - - -class PrivateAccessVirtualNetwork(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.v2018_02_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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: - super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) - self.name = name - self.key = key - self.resource_id = resource_id - self.subnets = subnets - - -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.v2018_02_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.v2018_02_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 - :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 - :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: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: - 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 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: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: - 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 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 - :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 priviledged_processor_time: Privileged processor time. - :type priviledged_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'}, - 'priviledged_processor_time': {'key': 'properties.priviledged_processor_time', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'wait_reason': {'key': 'properties.wait_reason', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, priviledged_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: - 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.priviledged_processor_time = priviledged_processor_time - self.state = state - self.wait_reason = wait_reason - - -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.v2018_02_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': 'PublicCertificateLocation'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: - super(PublicCertificate, self).__init__(kind=kind, **kwargs) - self.blob = blob - self.public_certificate_location = public_certificate_location - self.thumbprint = None - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 - :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.v2018_02_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.v2018_02_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.v2018_02_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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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 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.v2018_02_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.v2018_02_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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: - 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 Rendering(Model): - """Instructions for rendering the data. - - :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', - 'TimeSeries', 'TimeSeriesPerInstance' - :type type: str or ~azure.mgmt.web.v2018_02_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': 'RenderingType'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: - 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: - super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) - self.category = category - self.signal_availability = signal_availability - - -class ResourceMetric(Model): - """Object representing a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of metric. - :vartype name: ~azure.mgmt.web.v2018_02_01.models.ResourceMetricName - :ivar unit: Metric unit. - :vartype unit: str - :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D - :vartype time_grain: str - :ivar start_time: Metric start time. - :vartype start_time: datetime - :ivar end_time: Metric end time. - :vartype end_time: datetime - :ivar resource_id: Metric resource Id. - :vartype resource_id: str - :ivar id: Resource Id. - :vartype id: str - :ivar metric_values: Metric values. - :vartype metric_values: - list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricValue] - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricProperty] - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'id': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'ResourceMetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'metric_values': {'key': 'metricValues', 'type': '[ResourceMetricValue]'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetric, self).__init__(**kwargs) - self.name = None - self.unit = None - self.time_grain = None - self.start_time = None - self.end_time = None - self.resource_id = None - self.id = None - self.metric_values = None - self.properties = None - - -class ResourceMetricAvailability(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) -> None: - 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.v2018_02_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: str=None, **kwargs) -> None: - 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 ResourceMetricName(Model): - """Name of a metric for any resource . - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: metric name value. - :vartype value: str - :ivar localized_value: Localized metric name value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None - - -class ResourceMetricProperty(Model): - """Resource metric property. - - :param key: Key for resource metric property. - :type key: str - :param value: Value of pair. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: - super(ResourceMetricProperty, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ResourceMetricValue(Model): - """Value of resource metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Value timestamp. - :vartype timestamp: str - :ivar average: Value average. - :vartype average: float - :ivar minimum: Value minimum. - :vartype minimum: float - :ivar maximum: Value maximum. - :vartype maximum: float - :ivar total: Value total. - :vartype total: float - :ivar count: Value count. - :vartype count: float - :ivar properties: Resource metric properties collection. - :vartype properties: - list[~azure.mgmt.web.v2018_02_01.models.ResourceMetricProperty] - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'average': {'readonly': True}, - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'total': {'readonly': True}, - 'count': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'average': {'key': 'average', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'properties': {'key': 'properties', 'type': '[ResourceMetricProperty]'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceMetricValue, self).__init__(**kwargs) - self.timestamp = None - self.average = None - self.minimum = None - self.maximum = None - self.total = None - self.count = None - self.properties = None - - -class ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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.v2018_02_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: bool=None, reason=None, message: str=None, **kwargs) -> None: - super(ResourceNameAvailability, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class ResourceNameAvailabilityRequest(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.v2018_02_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, is_fqdn: bool=None, **kwargs) -> None: - super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.is_fqdn = is_fqdn - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2018_02_01.models.DataSource - """ - - _attribute_map = { - 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, - } - - def __init__(self, *, data_source=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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.v2018_02_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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.v2018_02_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, - 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, - } - - def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: - 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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2018_02_01.models.MetricSpecification] - :param log_specifications: - :type log_specifications: - list[~azure.mgmt.web.v2018_02_01.models.LogSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :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.v2018_02_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2018_02_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.v2018_02_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2018_02_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2018_02_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2018_02_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: true if the app is a default - container; otherwise, 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.v2018_02_01.models.SlotSwapStatus - :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.v2018_02_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 geo_distributions: GeoDistributions for this site - :type geo_distributions: - list[~azure.mgmt.web.v2018_02_01.models.GeoDistribution] - :param identity: - :type identity: ~azure.mgmt.web.v2018_02_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, geo_distributions=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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_exclusion_paths = client_cert_exclusion_paths - self.host_names_disabled = host_names_disabled - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.geo_distributions = geo_distributions - self.identity = identity - - -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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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.v2018_02_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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' - :type default_provider: str or - ~azure.mgmt.web.v2018_02_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_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 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_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]'}, - 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, - 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, - 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, - 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, - 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, - 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, - 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, - 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, - 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, - 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, - 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, google_client_id: str=None, google_client_secret: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_oauth_scopes=None, **kwargs) -> None: - super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.runtime_version = runtime_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_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.google_client_id = google_client_id - self.google_client_secret = google_client_secret - self.google_oauth_scopes = google_oauth_scopes - self.facebook_app_id = facebook_app_id - self.facebook_app_secret = facebook_app_secret - self.facebook_oauth_scopes = facebook_oauth_scopes - self.twitter_consumer_key = twitter_consumer_key - self.twitter_consumer_secret = twitter_consumer_secret - self.microsoft_account_client_id = microsoft_account_client_id - self.microsoft_account_client_secret = microsoft_account_client_secret - self.microsoft_account_oauth_scopes = microsoft_account_oauth_scopes - - -class SiteCloneability(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.v2018_02_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2018_02_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.v2018_02_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2018_02_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, - } - - def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: - 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(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: str=None, description: str=None, **kwargs) -> None: - super(SiteCloneabilityCriterion, self).__init__(**kwargs) - self.name = name - self.description = description - - -class SiteConfig(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. Default value: - "v4.6" . - :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 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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2018_02_01.models.NameValuePair] - :param azure_storage_accounts: User-provided Azure storage accounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2018_02_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2018_02_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2018_02_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' - :type scm_type: str or ~azure.mgmt.web.v2018_02_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2018_02_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2018_02_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2018_02_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2018_02_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2018_02_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2018_02_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2018_02_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2018_02_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2018_02_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2018_02_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2018_02_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. Default value: True . - :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.v2018_02_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.v2018_02_01.models.FtpsState - :param reserved_instance_count: Number of reserved instances. - This setting only applies to the Consumption Plan - :type reserved_instance_count: int - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'reserved_instance_count': {'maximum': 10, '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'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, - 'reserved_instance_count': {'key': 'reservedInstanceCount', 'type': 'int'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: - 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.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.cors = cors - self.push = push - self.api_definition = api_definition - 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.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.ftps_state = ftps_state - self.reserved_instance_count = reserved_instance_count - - -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. Default value: - "v4.6" . - :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 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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2018_02_01.models.NameValuePair] - :param azure_storage_accounts: User-provided Azure storage accounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2018_02_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2018_02_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2018_02_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' - :type scm_type: str or ~azure.mgmt.web.v2018_02_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2018_02_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2018_02_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2018_02_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2018_02_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2018_02_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2018_02_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2018_02_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2018_02_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2018_02_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2018_02_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2018_02_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. Default value: True . - :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.v2018_02_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.v2018_02_01.models.FtpsState - :param reserved_instance_count: Number of reserved instances. - This setting only applies to the Consumption Plan - :type reserved_instance_count: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - 'reserved_instance_count': {'maximum': 10, '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'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, - 'push': {'key': 'properties.push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, - 'reserved_instance_count': {'key': 'properties.reservedInstanceCount', 'type': 'int'}, - } - - def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: - 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.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.cors = cors - self.push = push - self.api_definition = api_definition - 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.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.ftps_state = ftps_state - self.reserved_instance_count = reserved_instance_count - - -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 - :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: str=None, **kwargs) -> None: - super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) - self.time = None - self.snapshot_id = 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.v2018_02_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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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': 'SiteExtensionType'}, - '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: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: - 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 SiteInstance(ProxyOnlyResource): - """Instance 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 site_instance_name: Name of instance. - :vartype site_instance_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'site_instance_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'}, - 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(SiteInstance, self).__init__(kind=kind, **kwargs) - self.site_instance_name = None - - -class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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.v2018_02_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2018_02_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2018_02_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2018_02_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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: - 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - 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 - :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.v2018_02_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2018_02_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.v2018_02_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2018_02_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2018_02_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2018_02_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: true if the app is a default - container; otherwise, 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.v2018_02_01.models.SlotSwapStatus - :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.v2018_02_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 geo_distributions: GeoDistributions for this site - :type geo_distributions: - list[~azure.mgmt.web.v2018_02_01.models.GeoDistribution] - :param identity: - :type identity: ~azure.mgmt.web.v2018_02_01.models.ManagedServiceIdentity - """ - - _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'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, geo_distributions=None, identity=None, **kwargs) -> None: - super(SitePatchResource, self).__init__(kind=kind, **kwargs) - 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_exclusion_paths = client_cert_exclusion_paths - self.host_names_disabled = host_names_disabled - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.geo_distributions = geo_distributions - self.identity = identity - - -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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: - 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(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) -> None: - super(SiteSeal, self).__init__(**kwargs) - self.html = html - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: - 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, - 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, - 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: - super(SiteSourceControl, self).__init__(kind=kind, **kwargs) - self.repo_url = repo_url - self.branch = branch - self.is_manual_integration = is_manual_integration - self.deployment_rollback_enabled = deployment_rollback_enabled - self.is_mercurial = is_mercurial - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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.v2018_02_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.v2018_02_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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(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.v2018_02_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2018_02_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: str=None, sku=None, capacity=None, **kwargs) -> None: - super(SkuInfo, self).__init__(**kwargs) - self.resource_type = resource_type - self.sku = sku - self.capacity = capacity - - -class SkuInfos(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.v2018_02_01.models.GlobalCsmSkuDescription] - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, - } - - def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: - 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: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - 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: str=None, **kwargs) -> None: - super(Snapshot, self).__init__(kind=kind, **kwargs) - self.time = None - - -class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: - 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. - - 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 - :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.v2018_02_01.models.SnapshotRecoverySource - :param overwrite: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': 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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: - 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(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.v2018_02_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2018_02_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2018_02_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': 'SolutionType'}, - 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, - 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, - } - - def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: - 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 - """ - - _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: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: - 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 StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2018_02_01.models.StackMinorVersion] - :param application_insights: true if this supports - Application Insights; otherwise, false. - :type application_insights: 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'}, - } - - def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, **kwargs) -> None: - 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 - - -class StackMinorVersion(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: - 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(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.v2018_02_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'Default' - :type worker_size: str or - ~azure.mgmt.web.v2018_02_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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: - 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 StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, properties=None, **kwargs) -> None: - super(StringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -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: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: - super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) - self.subnet_resource_id = subnet_resource_id - self.swift_supported = swift_supported - - -class TldLegalAgreement(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: str=None, **kwargs) -> None: - super(TldLegalAgreement, self).__init__(**kwargs) - self.agreement_key = agreement_key - self.title = title - self.content = content - self.url = url - - -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 true, then the top level domain supports - domain privacy; otherwise, 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: str=None, privacy: bool=None, **kwargs) -> None: - super(TopLevelDomain, self).__init__(kind=kind, **kwargs) - self.privacy = privacy - - -class TopLevelDomainAgreementOption(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - """ - - _attribute_map = { - 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, - 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, - } - - def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: - super(TopLevelDomainAgreementOption, self).__init__(**kwargs) - self.include_privacy = include_privacy - self.for_transfer = for_transfer - - -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.v2018_02_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: str=None, runs=None, **kwargs) -> None: - super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) - self.runs = runs - - -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.v2018_02_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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': 'TriggeredWebJobStatus'}, - '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: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: - 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.v2018_02_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.v2018_02_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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2018_02_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': 'ComputeModeOptions'}, - 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: - 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 ValidateContainerSettingsRequest(Model): - """Container settings validation request context. - - :param base_url: Base URL of the container registry - :type base_url: str - :param username: Username for to access the container registry - :type username: str - :param password: Password for to access the container registry - :type password: str - :param repository: Repository name (image name) - :type repository: str - :param tag: Image tag - :type tag: str - :param platform: Platform (windows or linux) - :type platform: str - """ - - _attribute_map = { - 'base_url': {'key': 'baseUrl', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - 'platform': {'key': 'platform', 'type': 'str'}, - } - - def __init__(self, *, base_url: str=None, username: str=None, password: str=None, repository: str=None, tag: str=None, platform: str=None, **kwargs) -> None: - super(ValidateContainerSettingsRequest, self).__init__(**kwargs) - self.base_url = base_url - self.username = username - self.password = password - self.repository = repository - self.tag = tag - self.platform = platform - - -class ValidateRequest(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' - :type type: str or - ~azure.mgmt.web.v2018_02_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: true if App Service plan is running as a - windows container - :type is_xenon: bool - """ - - _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'}, - } - - def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, **kwargs) -> None: - 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 - - -class ValidateResponse(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.v2018_02_01.models.ValidateResponseError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ValidateResponseError'}, - } - - def __init__(self, *, status: str=None, error=None, **kwargs) -> None: - super(ValidateResponse, self).__init__(**kwargs) - self.status = status - self.error = error - - -class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: - super(ValidateResponseError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2018_02_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -class VirtualIPMapping(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 - """ - - _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'}, - } - - def __init__(self, *, virtual_ip: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, **kwargs) -> None: - 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 - - -class VirtualNetworkProfile(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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=None, subnet: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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.v2018_02_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: - 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 - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: - 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 - - -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.v2018_02_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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - 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 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.v2018_02_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'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, *, kind: str=None, failed: bool=None, failed_tests=None, **kwargs) -> None: - super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) - self.failed = failed - self.failed_tests = failed_tests - - -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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: - super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) - self.test_name = test_name - self.details = details - - -class WebAppCollection(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.v2018_02_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, **kwargs) -> None: - super(WebAppCollection, 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.v2018_02_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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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.v2018_02_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 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.v2018_02_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] - :param sku: - :type sku: ~azure.mgmt.web.v2018_02_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: - super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) - 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 - self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_paged_models.py deleted file mode 100644 index 908d8095c47..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_paged_models.py +++ /dev/null @@ -1,729 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AppServiceCertificateOrderPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) -class AppServiceCertificateResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) -class CsmOperationDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmOperationDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) -class DomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`Domain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Domain]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainPaged, self).__init__(*args, **kwargs) -class NameIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`NameIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(NameIdentifierPaged, self).__init__(*args, **kwargs) -class DomainOwnershipIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) -class TopLevelDomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`TopLevelDomain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} - } - - def __init__(self, *args, **kwargs): - - super(TopLevelDomainPaged, self).__init__(*args, **kwargs) -class TldLegalAgreementPaged(Paged): - """ - A paging container for iterating over a list of :class:`TldLegalAgreement ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} - } - - def __init__(self, *args, **kwargs): - - super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) -class CertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`Certificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Certificate]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificatePaged, self).__init__(*args, **kwargs) -class DeletedSitePaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSite ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSite]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSitePaged, self).__init__(*args, **kwargs) -class DetectorResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorResponsePaged, self).__init__(*args, **kwargs) -class DiagnosticCategoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiagnosticCategory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} - } - - def __init__(self, *args, **kwargs): - - super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) -class AnalysisDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`AnalysisDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) -class DetectorDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) -class ApplicationStackPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationStack ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationStack]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationStackPaged, self).__init__(*args, **kwargs) -class RecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Recommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Recommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendationPaged, self).__init__(*args, **kwargs) -class SourceControlPaged(Paged): - """ - A paging container for iterating over a list of :class:`SourceControl ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SourceControl]'} - } - - def __init__(self, *args, **kwargs): - - super(SourceControlPaged, self).__init__(*args, **kwargs) -class BillingMeterPaged(Paged): - """ - A paging container for iterating over a list of :class:`BillingMeter ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BillingMeter]'} - } - - def __init__(self, *args, **kwargs): - - super(BillingMeterPaged, self).__init__(*args, **kwargs) -class GeoRegionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoRegion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoRegion]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoRegionPaged, self).__init__(*args, **kwargs) -class IdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`Identifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Identifier]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentifierPaged, self).__init__(*args, **kwargs) -class PremierAddOnOfferPaged(Paged): - """ - A paging container for iterating over a list of :class:`PremierAddOnOffer ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} - } - - def __init__(self, *args, **kwargs): - - super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) -class SitePaged(Paged): - """ - A paging container for iterating over a list of :class:`Site ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Site]'} - } - - def __init__(self, *args, **kwargs): - - super(SitePaged, self).__init__(*args, **kwargs) -class BackupItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupItem]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupItemPaged, self).__init__(*args, **kwargs) -class SiteConfigResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) -class SiteConfigurationSnapshotInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) -class ContinuousWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`ContinuousWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) -class DeploymentPaged(Paged): - """ - A paging container for iterating over a list of :class:`Deployment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Deployment]'} - } - - def __init__(self, *args, **kwargs): - - super(DeploymentPaged, self).__init__(*args, **kwargs) -class FunctionEnvelopePaged(Paged): - """ - A paging container for iterating over a list of :class:`FunctionEnvelope ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} - } - - def __init__(self, *args, **kwargs): - - super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) -class HostNameBindingPaged(Paged): - """ - A paging container for iterating over a list of :class:`HostNameBinding ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} - } - - def __init__(self, *args, **kwargs): - - super(HostNameBindingPaged, self).__init__(*args, **kwargs) -class SiteInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteInstancePaged, self).__init__(*args, **kwargs) -class ProcessInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessInfoPaged, self).__init__(*args, **kwargs) -class ProcessModuleInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessModuleInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) -class ProcessThreadInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessThreadInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) -class ResourceMetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) -class ResourceMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricPaged, self).__init__(*args, **kwargs) -class PerfMonResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`PerfMonResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(PerfMonResponsePaged, self).__init__(*args, **kwargs) -class PublicCertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`PublicCertificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} - } - - def __init__(self, *args, **kwargs): - - super(PublicCertificatePaged, self).__init__(*args, **kwargs) -class SiteExtensionInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteExtensionInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) -class SlotDifferencePaged(Paged): - """ - A paging container for iterating over a list of :class:`SlotDifference ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SlotDifference]'} - } - - def __init__(self, *args, **kwargs): - - super(SlotDifferencePaged, self).__init__(*args, **kwargs) -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) -class TriggeredWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) -class TriggeredJobHistoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredJobHistory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) -class CsmUsageQuotaPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmUsageQuota ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) -class WebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(WebJobPaged, self).__init__(*args, **kwargs) -class AppServiceEnvironmentResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) -class StampCapacityPaged(Paged): - """ - A paging container for iterating over a list of :class:`StampCapacity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StampCapacity]'} - } - - def __init__(self, *args, **kwargs): - - super(StampCapacityPaged, self).__init__(*args, **kwargs) -class InboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class WorkerPoolResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkerPoolResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) -class SkuInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SkuInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SkuInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SkuInfoPaged, self).__init__(*args, **kwargs) -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) -class OutboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class AppServicePlanPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServicePlan ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServicePlanPaged, self).__init__(*args, **kwargs) -class StrPaged(Paged): - """ - A paging container for iterating over a list of str object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } - - def __init__(self, *args, **kwargs): - - super(StrPaged, self).__init__(*args, **kwargs) -class HybridConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`HybridConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HybridConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(HybridConnectionPaged, self).__init__(*args, **kwargs) -class ResourceHealthMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_web_site_management_client_enums.py deleted file mode 100644 index a4db9855c59..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,559 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class KeyVaultSecretStatus(str, Enum): - - 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 CertificateProductType(str, Enum): - - standard_domain_validated_ssl = "StandardDomainValidatedSsl" - standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class CertificateOrderStatus(str, Enum): - - pendingissuance = "Pendingissuance" - issued = "Issued" - revoked = "Revoked" - canceled = "Canceled" - denied = "Denied" - pendingrevocation = "Pendingrevocation" - pending_rekey = "PendingRekey" - unused = "Unused" - expired = "Expired" - not_submitted = "NotSubmitted" - - -class CertificateOrderActionType(str, Enum): - - 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 RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned, UserAssigned" - none = "None" - - -class IpFilterTag(str, Enum): - - default = "Default" - xff_proxy = "XffProxy" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 AzureStorageType(str, Enum): - - azure_files = "AzureFiles" - azure_blob = "AzureBlob" - - -class AzureStorageState(str, Enum): - - ok = "Ok" - invalid_credentials = "InvalidCredentials" - invalid_share = "InvalidShare" - - -class ScmType(str, Enum): - - 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" - - -class ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class FtpsState(str, Enum): - - all_allowed = "AllAllowed" - ftps_only = "FtpsOnly" - disabled = "Disabled" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class RedundancyMode(str, Enum): - - none = "None" - manual = "Manual" - failover = "Failover" - active_active = "ActiveActive" - geo_redundant = "GeoRedundant" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class DomainStatus(str, Enum): - - 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 AzureResourceType(str, Enum): - - website = "Website" - traffic_manager = "TrafficManager" - - -class CustomHostNameDnsRecordType(str, Enum): - - cname = "CName" - a = "A" - - -class HostNameType(str, Enum): - - verified = "Verified" - managed = "Managed" - - -class DnsType(str, Enum): - - azure_dns = "AzureDns" - default_domain_registrar_dns = "DefaultDomainRegistrarDns" - - -class DomainType(str, Enum): - - regular = "Regular" - soft_deleted = "SoftDeleted" - - -class HostingEnvironmentStatus(str, Enum): - - preparing = "Preparing" - ready = "Ready" - scaling = "Scaling" - deleting = "Deleting" - - -class InternalLoadBalancingMode(str, Enum): - - none = "None" - web = "Web" - publishing = "Publishing" - - -class ComputeModeOptions(str, Enum): - - shared = "Shared" - dedicated = "Dedicated" - dynamic = "Dynamic" - - -class WorkerSizeOptions(str, Enum): - - small = "Small" - medium = "Medium" - large = "Large" - d1 = "D1" - d2 = "D2" - d3 = "D3" - default = "Default" - - -class AccessControlEntryAction(str, Enum): - - permit = "Permit" - deny = "Deny" - - -class OperationStatus(str, Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" - - -class IssueType(str, Enum): - - 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 SolutionType(str, Enum): - - quick_solution = "QuickSolution" - deep_investigation = "DeepInvestigation" - best_practices = "BestPractices" - - -class RenderingType(str, Enum): - - no_graph = "NoGraph" - table = "Table" - time_series = "TimeSeries" - time_series_per_instance = "TimeSeriesPerInstance" - - -class ResourceScopeType(str, Enum): - - server_farm = "ServerFarm" - subscription = "Subscription" - web_site = "WebSite" - - -class NotificationLevel(str, Enum): - - critical = "Critical" - warning = "Warning" - information = "Information" - non_urgent_suggestion = "NonUrgentSuggestion" - - -class Channels(str, Enum): - - notification = "Notification" - api = "Api" - email = "Email" - webhook = "Webhook" - all = "All" - - -class AppServicePlanRestrictions(str, Enum): - - none = "None" - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - - -class InAvailabilityReasonType(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" - - -class CheckNameResourceTypes(str, Enum): - - site = "Site" - slot = "Slot" - hosting_environment = "HostingEnvironment" - publishing_user = "PublishingUser" - microsoft_websites = "Microsoft.Web/sites" - microsoft_websitesslots = "Microsoft.Web/sites/slots" - microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" - microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" - - -class ValidateResourceTypes(str, Enum): - - server_farm = "ServerFarm" - site = "Site" - - -class LogLevel(str, Enum): - - off = "Off" - verbose = "Verbose" - information = "Information" - warning = "Warning" - error = "Error" - - -class BackupItemStatus(str, Enum): - - 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 DatabaseType(str, Enum): - - sql_azure = "SqlAzure" - my_sql = "MySql" - local_my_sql = "LocalMySql" - postgre_sql = "PostgreSql" - - -class FrequencyUnit(str, Enum): - - day = "Day" - hour = "Hour" - - -class ContinuousWebJobStatus(str, Enum): - - initializing = "Initializing" - starting = "Starting" - running = "Running" - pending_restart = "PendingRestart" - stopped = "Stopped" - - -class WebJobType(str, Enum): - - continuous = "Continuous" - triggered = "Triggered" - - -class PublishingProfileFormat(str, Enum): - - file_zilla3 = "FileZilla3" - web_deploy = "WebDeploy" - ftp = "Ftp" - - -class DnsVerificationTestResult(str, Enum): - - passed = "Passed" - failed = "Failed" - skipped = "Skipped" - - -class MSDeployLogEntryType(str, Enum): - - message = "Message" - warning = "Warning" - error = "Error" - - -class MSDeployProvisioningState(str, Enum): - - accepted = "accepted" - running = "running" - succeeded = "succeeded" - failed = "failed" - canceled = "canceled" - - -class MySqlMigrationType(str, Enum): - - local_to_remote = "LocalToRemote" - remote_to_local = "RemoteToLocal" - - -class PublicCertificateLocation(str, Enum): - - current_user_my = "CurrentUserMy" - local_machine_my = "LocalMachineMy" - unknown = "Unknown" - - -class BackupRestoreOperationType(str, Enum): - - default = "Default" - clone = "Clone" - relocation = "Relocation" - snapshot = "Snapshot" - cloud_fs = "CloudFS" - - -class UnauthenticatedClientAction(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - - -class BuiltInAuthenticationProvider(str, Enum): - - azure_active_directory = "AzureActiveDirectory" - facebook = "Facebook" - google = "Google" - microsoft_account = "MicrosoftAccount" - twitter = "Twitter" - - -class CloneAbilityResult(str, Enum): - - cloneable = "Cloneable" - partially_cloneable = "PartiallyCloneable" - not_cloneable = "NotCloneable" - - -class SiteExtensionType(str, Enum): - - gallery = "Gallery" - web_root = "WebRoot" - - -class TriggeredWebJobStatus(str, Enum): - - success = "Success" - failed = "Failed" - error = "Error" - - -class SkuName(str, Enum): - - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - dynamic = "Dynamic" - isolated = "Isolated" - premium_v2 = "PremiumV2" - elastic_premium = "ElasticPremium" - elastic_isolated = "ElasticIsolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/__init__.py deleted file mode 100644 index b77b412497f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations -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 ._provider_operations import ProviderOperations -from ._recommendations_operations import RecommendationsOperations -from ._web_apps_operations import WebAppsOperations -from ._app_service_environments_operations import AppServiceEnvironmentsOperations -from ._app_service_plans_operations import AppServicePlansOperations -from ._resource_health_metadata_operations import ResourceHealthMetadataOperations -from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin - -__all__ = [ - 'AppServiceCertificateOrdersOperations', - 'CertificateRegistrationProviderOperations', - 'DomainsOperations', - 'TopLevelDomainsOperations', - 'DomainRegistrationProviderOperations', - 'CertificatesOperations', - 'DeletedWebAppsOperations', - 'DiagnosticsOperations', - 'ProviderOperations', - 'RecommendationsOperations', - 'WebAppsOperations', - 'AppServiceEnvironmentsOperations', - 'AppServicePlansOperations', - 'ResourceHealthMetadataOperations', - 'WebSiteManagementClientOperationsMixin', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_certificate_orders_operations.py deleted file mode 100644 index 8e37127a7cb..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_certificate_orders_operations.py +++ /dev/null @@ -1,1427 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceCertificateOrdersOperations(object): - """AppServiceCertificateOrdersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all certificate orders in a subscription. - - List all certificate orders in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def validate_purchase_information( - self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): - """Validate information for a certificate order. - - Validate information for a certificate order. - - :param app_service_certificate_order: Information for a certificate - order. - :type app_service_certificate_order: - ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.validate_purchase_information.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get certificate orders in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def get( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """Get a certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - - def _create_or_update_initial( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a certificate purchase order. - - 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.v2018_02_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateOrder or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def delete( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """Delete an existing certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate purchase order. - - 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.v2018_02_01.models.AppServiceCertificateOrderPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def list_certificates( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """List all certificates associated with a certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateResource - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_certificates.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} - - def get_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """Get the certificate associated with a certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - - def _create_or_update_certificate_initial( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a certificate and associates with key vault secret. - - 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.v2018_02_01.models.AppServiceCertificateResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def delete_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """Delete the certificate associated with a certificate order. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - """Creates or updates a certificate and associates with key vault secret. - - 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.v2018_02_01.models.AppServiceCertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def reissue( - self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """Reissue an existing certificate order. - - 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.v2018_02_01.models.ReissueCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reissue.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} - - def renew( - self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """Renew an existing certificate order. - - 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.v2018_02_01.models.RenewCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} - - def resend_email( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """Resend certificate email. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.resend_email.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} - - def resend_request_emails( - self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): - """Verify domain ownership for this certificate order. - - 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: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - name_identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.resend_request_emails.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} - - def retrieve_site_seal( - self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): - """Verify domain ownership for this certificate order. - - 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 light_theme: If 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSeal or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSeal or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) - - # Construct URL - url = self.retrieve_site_seal.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSeal', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} - - def verify_domain_ownership( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """Verify domain ownership for this certificate order. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.verify_domain_ownership.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} - - def retrieve_certificate_actions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieve the list of certificate actions. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2018_02_01.models.CertificateOrderAction] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_actions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateOrderAction]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} - - def retrieve_certificate_email_history( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieve email history. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.CertificateEmail] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_email_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateEmail]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_environments_operations.py deleted file mode 100644 index 016b079e600..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_environments_operations.py +++ /dev/null @@ -1,3376 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceEnvironmentsOperations(object): - """AppServiceEnvironmentsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all App Service Environments for a subscription. - - Get all App Service Environments for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all App Service Environments in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the properties of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an App Service Environment. - - 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.v2018_02_01.models.AppServiceEnvironmentResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceEnvironmentResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - hosting_environment_envelope=hosting_environment_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _delete_initial( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if force_delete is not None: - query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete an App Service Environment. - - 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 true to force the deletion - even if the App Service Environment contains resources. The default is - false. - :type force_delete: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - force_delete=force_delete, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update an App Service Environment. - - 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.v2018_02_01.models.AppServiceEnvironmentPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def list_capacities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the used, available, and total worker capacity an App Service - Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StampCapacity - :rtype: - ~azure.mgmt.web.v2018_02_01.models.StampCapacityPaged[~azure.mgmt.web.v2018_02_01.models.StampCapacity] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_capacities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} - - def list_vips( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get IP addresses assigned to an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AddressResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.AddressResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vips.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AddressResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} - - - def _change_vnet_initial( - self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): - vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) - - # Construct URL - url = self.change_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def change_vnet( - self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Move an App Service Environment to a different VNET. - - 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 id: Resource id of the Virtual Network. - :type id: str - :param subnet: Subnet within the Virtual Network. - :type subnet: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._change_vnet_initial( - resource_group_name=resource_group_name, - name=name, - id=id, - subnet=subnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} - - def list_diagnostics( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get diagnostic information for an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2018_02_01.models.HostingEnvironmentDiagnostics] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_diagnostics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} - - def get_diagnostics_item( - self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): - """Get a diagnostics item for an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostingEnvironmentDiagnostics or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.HostingEnvironmentDiagnostics or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostics_item.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} - - def get_inbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the network endpoints of all inbound dependencies of an App Service - Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of InboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2018_02_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2018_02_01.models.InboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_inbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} - - def list_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get global metric definitions of an App Service Environment. - - Get global metric definitions 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MetricDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MetricDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MetricDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'} - - def list_metrics( - self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get global metrics of an App Service Environment. - - Get global 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 details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'} - - def list_multi_role_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get all multi-role pools. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} - - def get_multi_role_pool( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get properties of a multi-role pool. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - - def _create_or_update_multi_role_pool_initial( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a multi-role pool. - - 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.v2018_02_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a multi-role pool. - - 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.v2018_02_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def list_multi_role_pool_instance_metric_definitions( - self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): - """Get metric definitions for a specific instance of a multi-role pool of - an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} - - def list_multi_role_pool_instance_metrics( - self, resource_group_name, name, instance, details=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for a specific instance of a multi-role pool of an App - Service Environment. - - Get metrics 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 - :param details: Specify true to include instance details. - The default is false. - :type details: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_instance_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'} - - def list_multi_role_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get metric definitions for a multi-role pool of an App Service - Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} - - def list_multi_role_metrics( - self, resource_group_name, name, start_time=None, end_time=None, time_grain=None, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for a multi-role pool of an App Service Environment. - - Get 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 - :param start_time: Beginning time of the metrics query. - :type start_time: str - :param end_time: End time of the metrics query. - :type end_time: str - :param time_grain: Time granularity of the metrics query. - :type time_grain: str - :param details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if start_time is not None: - query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'str') - if end_time is not None: - query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'str') - if time_grain is not None: - query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str') - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'} - - def list_multi_role_pool_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get available SKUs for scaling a multi-role pool. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SkuInfoPaged[~azure.mgmt.web.v2018_02_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} - - def list_multi_role_usages( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get usage metrics for a multi-role pool of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2018_02_01.models.UsagePaged[~azure.mgmt.web.v2018_02_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} - - def list_operations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List all currently running operations on the App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.Operation] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_operations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Operation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} - - def get_outbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the network endpoints of all outbound dependencies of an App - Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2018_02_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2018_02_01.models.OutboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_outbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} - - def reboot( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Reboot all machines in an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reboot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} - - - def _resume_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.resume.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def resume( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """Resume an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._resume_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} - - def list_app_service_plans( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans in an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServicePlanPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_app_service_plans.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} - - def list_web_apps( - self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): - """Get all apps in an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} - - - def _suspend_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.suspend.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def suspend( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """Suspend an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._suspend_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Get global usage metrics of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} - - def list_worker_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get all worker pools of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} - - def get_worker_pool( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """Get properties of a worker pool. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - - def _create_or_update_worker_pool_initial( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a worker pool. - - 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.v2018_02_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a worker pool. - - 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.v2018_02_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 400, 404, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def list_worker_pool_instance_metric_definitions( - self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): - """Get metric definitions for a specific instance of a worker pool of an - App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} - - def list_worker_pool_instance_metrics( - self, resource_group_name, name, worker_pool_name, instance, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for a specific instance of a worker pool of an App Service - Environment. - - Get metrics 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 - :param details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_instance_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'} - - def list_web_worker_metric_definitions( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """Get metric definitions for a worker pool of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} - - def list_web_worker_metrics( - self, resource_group_name, name, worker_pool_name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for a worker pool of a AppServiceEnvironment (App Service - Environment). - - Get metrics for a worker pool of a AppServiceEnvironment (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 worker pool - :type worker_pool_name: str - :param details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'} - - def list_worker_pool_skus( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """Get available SKUs for scaling a worker pool. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SkuInfoPaged[~azure.mgmt.web.v2018_02_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} - - def list_web_worker_usages( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """Get usage metrics for a worker pool of an App Service Environment. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2018_02_01.models.UsagePaged[~azure.mgmt.web.v2018_02_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_plans_operations.py deleted file mode 100644 index f61257bf766..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_app_service_plans_operations.py +++ /dev/null @@ -1,2114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServicePlansOperations(object): - """AppServicePlansOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, detailed=None, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans for a subscription. - - Get all App Service plans for a subscription. - - :param detailed: Specify true to return all App Service - plan properties. The default is false, which returns a - subset of the properties. - Retrieval of all properties may increase the API latency. - :type detailed: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServicePlanPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AppServicePlanPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlan') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an App Service Plan. - - 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.v2018_02_01.models.AppServicePlan - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AppServicePlan or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.AppServicePlan]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - app_service_plan=app_service_plan, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Delete an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - """Creates or updates an App Service Plan. - - 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.v2018_02_01.models.AppServicePlanPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def list_capabilities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List all capabilities of an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.Capability] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_capabilities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Capability]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Retrieve a Hybrid Connection in use in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Delete a Hybrid Connection in use in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Get the send key name and value of a Hybrid Connection. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connection_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_web_apps_by_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Get all apps that use a Hybrid Connection in an App Service Plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of str - :rtype: ~azure.mgmt.web.v2018_02_01.models.StrPaged[str] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps_by_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} - - def get_hybrid_connection_plan_limit( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the maximum number of Hybrid Connections allowed in an App Service - plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionLimits or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnectionLimits or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_plan_limit.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionLimits', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieve all Hybrid Connections in use in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HybridConnection - :rtype: - ~azure.mgmt.web.v2018_02_01.models.HybridConnectionPaged[~azure.mgmt.web.v2018_02_01.models.HybridConnection] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} - - def list_metric_defintions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get metrics that can be queried for an App Service plan, and their - definitions. - - Get metrics that can be queried for an App Service plan, and their - definitions. - - :param 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metric_defintions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metric_defintions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'} - - def list_metrics( - self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get metrics for an App Service plan. - - Get metrics for 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 details: Specify true to include instance details. - The default is false. - :type details: bool - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'} - - def restart_web_apps( - self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): - """Restart all apps in an App Service plan. - - 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 true to perform a soft - restart, applies the configuration settings and restarts the apps if - necessary. The default is false, which always restarts - and reprovisions the apps - :type soft_restart: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.restart_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if soft_restart is not None: - query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} - - def list_web_apps( - self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): - """Get all apps associated with an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} - - def get_server_farm_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets all selectable SKUs for a given App Service Plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_server_farm_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets server farm usage information. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} - - def list_vnets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get all Virtual Networks associated with an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} - - def get_vnet_from_server_farm( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """Get a Virtual Network associated with an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_from_server_farm.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """Get a Virtual Network gateway. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Update a Virtual Network gateway. - - 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.v2018_02_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_routes_for_vnet( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """Get all routes that are associated with a Virtual Network in an App - Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_routes_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} - - def get_route_for_vnet( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """Get a Virtual Network route in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_route_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def create_or_update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """Create or update a Virtual Network route in an App Service plan. - - 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.v2018_02_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def delete_vnet_route( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """Delete a Virtual Network route in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """Create or update a Virtual Network route in an App Service plan. - - 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.v2018_02_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def reboot_worker( - self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): - """Reboot a worker machine in an App Service plan. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reboot_worker.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificate_registration_provider_operations.py deleted file mode 100644 index a8a23e8917b..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificate_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificateRegistrationProviderOperations(object): - """CertificateRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """Implements Csm operations Api to exposes the list of available Csm Apis - under the resource provider. - - Implements Csm operations Api to exposes the list of available Csm Apis - under the resource provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificates_operations.py deleted file mode 100644 index 1c2850cb061..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_certificates_operations.py +++ /dev/null @@ -1,439 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CertificatesOperations(object): - """CertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all certificates for a subscription. - - Get all certificates for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CertificatePaged[~azure.mgmt.web.v2018_02_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all certificates in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CertificatePaged[~azure.mgmt.web.v2018_02_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get a certificate. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def create_or_update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate. - - 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.v2018_02_01.models.Certificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'Certificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Delete a certificate. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate. - - 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.v2018_02_01.models.CertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_deleted_web_apps_operations.py deleted file mode 100644 index 97e5c74c82b..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_deleted_web_apps_operations.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DeletedWebAppsOperations(object): - """DeletedWebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all deleted apps for a subscription. - - Get all deleted apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DeletedSitePaged[~azure.mgmt.web.v2018_02_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """Get all deleted apps for a subscription at location. - - Get all deleted apps for a subscription at location. - - :param location: - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DeletedSitePaged[~azure.mgmt.web.v2018_02_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} - - def get_deleted_web_app_by_location( - self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): - """Get deleted app for a subscription at location. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeletedSite or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DeletedSite or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deleted_web_app_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeletedSite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_diagnostics_operations.py deleted file mode 100644 index e2c0bb8cde9..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_diagnostics_operations.py +++ /dev/null @@ -1,1735 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DiagnosticsOperations(object): - """DiagnosticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list_hosting_environment_detector_responses( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List Hosting Environment Detector Responses. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DetectorResponsePaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hosting_environment_detector_responses.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} - - def get_hosting_environment_detector_response( - self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Get Hosting Environment Detector Response. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hosting_environment_detector_response.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} - - def list_site_detector_responses( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """List Site Detector Responses. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DetectorResponsePaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} - - def get_site_detector_response( - self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Get site detector response. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} - - def list_site_diagnostic_categories( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """Get Diagnostics Categories. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} - - def get_site_diagnostic_category( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """Get Diagnostics Category. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """Get Site Analyses. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): - """Get Site Analysis. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Execute Analysis. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """Get Detectors. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector( - self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): - """Get Detector. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_site_detector.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector( - self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Execute Detector. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} - - def list_site_detector_responses_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """List Site Detector Responses. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DetectorResponsePaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} - - def get_site_detector_response_slot( - self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Get site detector response. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} - - def list_site_diagnostic_categories_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """Get Diagnostics Categories. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} - - def get_site_diagnostic_category_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """Get Diagnostics Category. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """Get Site Analyses. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): - """Get Site Analysis. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Execute Analysis. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """Get Detectors. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector_slot( - self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): - """Get Detector. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_site_detector_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector_slot( - self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """Execute Detector. - - 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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domain_registration_provider_operations.py deleted file mode 100644 index 1bc59d42587..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domain_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DomainRegistrationProviderOperations(object): - """DomainRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """Implements Csm operations Api to exposes the list of available Csm Apis - under the resource provider. - - Implements Csm operations Api to exposes the list of available Csm Apis - under the resource provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py deleted file mode 100644 index 8aa46a7a4e7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_domains_operations.py +++ /dev/null @@ -1,1093 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DomainsOperations(object): - """DomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def check_availability( - self, name=None, custom_headers=None, raw=False, **operation_config): - """Check if a domain is available for registration. - - Check if a domain is available for registration. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainAvailablilityCheckResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DomainAvailablilityCheckResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.check_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainAvailablilityCheckResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all domains in a subscription. - - Get all domains in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DomainPaged[~azure.mgmt.web.v2018_02_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} - - def get_control_center_sso_request( - self, custom_headers=None, raw=False, **operation_config): - """Generate a single sign-on request for the domain management portal. - - Generate a single sign-on request for the domain management portal. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainControlCenterSsoRequest or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DomainControlCenterSsoRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_control_center_sso_request.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainControlCenterSsoRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} - - def list_recommendations( - self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): - """Get domain name recommendations based on keywords. - - Get domain name recommendations based on keywords. - - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NameIdentifier - :rtype: - ~azure.mgmt.web.v2018_02_01.models.NameIdentifierPaged[~azure.mgmt.web.v2018_02_01.models.NameIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommendations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all domains in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DomainPaged[~azure.mgmt.web.v2018_02_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} - - def get( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Get a domain. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - - def _create_or_update_initial( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'Domain') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a domain. - - 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.v2018_02_01.models.Domain - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.Domain]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - domain=domain, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def delete( - self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): - """Delete a domain. - - 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 true to delete - the domain immediately. The default is false which - deletes the domain after 24 hours. - :type force_hard_delete_domain: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - """Creates or updates a domain. - - 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.v2018_02_01.models.DomainPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'DomainPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def list_ownership_identifiers( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Lists domain ownership identifiers. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DomainOwnershipIdentifier - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_ownership_identifiers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} - - def get_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """Get ownership identifier for domain. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def create_or_update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.create_or_update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def delete_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """Delete ownership identifier for domain. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def renew( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Renew a domain. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204, 400, 500]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_provider_operations.py deleted file mode 100644 index 28477ed78d4..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_provider_operations.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProviderOperations(object): - """ProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def get_available_stacks( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Get available application frameworks and their versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStack - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ApplicationStackPaged[~azure.mgmt.web.v2018_02_01.models.ApplicationStack] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks.metadata['url'] - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """Gets all available operations for the Microsoft.Web resource provider. - Also exposes resource metric definitions. - - Gets all available operations for the Microsoft.Web resource provider. - Also exposes resource metric definitions. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} - - def get_available_stacks_on_prem( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Get available application frameworks and their versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStack - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ApplicationStackPaged[~azure.mgmt.web.v2018_02_01.models.ApplicationStack] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks_on_prem.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_recommendations_operations.py deleted file mode 100644 index 65038b41936..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_recommendations_operations.py +++ /dev/null @@ -1,1078 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RecommendationsOperations(object): - """RecommendationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """List all recommendations for a subscription. - - List all recommendations for a subscription. - - :param featured: Specify true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} - - def reset_all_filters( - self, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for a subscription. - - Reset all recommendation opt-out settings for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_all_filters.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} - - def disable_recommendation_for_subscription( - self, name, custom_headers=None, raw=False, **operation_config): - """Disables the specified rule so it will not apply to a subscription in - the future. - - Disables the specified rule so it will not apply to a subscription in - the future. - - :param name: Rule name - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_recommendation_for_subscription.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} - - def list_history_for_hosting_environment( - self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get past recommendations for an app, optionally specified by the time - range. - - 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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} - - def list_recommended_rules_for_hosting_environment( - self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get all recommendations for an app. - - 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 hosting_environment_name: Name of the app. - :type hosting_environment_name: str - :param featured: Specify true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} - - def disable_all_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """Disable all recommendations for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_all_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} - - def reset_all_filters_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_all_filters_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} - - def get_rule_details_by_hosting_environment( - self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """Get a recommendation rule for an app. - - 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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} - - def disable_recommendation_for_hosting_environment( - self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """Disables the specific rule for a web site permanently. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_recommendation_for_hosting_environment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} - - def list_history_for_web_app( - self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get past recommendations for an app, optionally specified by the time - range. - - 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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} - - def list_recommended_rules_for_web_app( - self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Get all recommendations for an app. - - 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 true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RecommendationPaged[~azure.mgmt.web.v2018_02_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} - - def disable_all_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """Disable all recommendations for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_all_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} - - def reset_all_filters_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_all_filters_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} - - def get_rule_details_by_web_app( - self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """Get a recommendation rule for an app. - - 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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} - - def disable_recommendation_for_site( - self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): - """Disables the specific rule for a web site permanently. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_recommendation_for_site.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_resource_health_metadata_operations.py deleted file mode 100644 index 2923705786a..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_resource_health_metadata_operations.py +++ /dev/null @@ -1,465 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourceHealthMetadataOperations(object): - """ResourceHealthMetadataOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the subscription. - - List all ResourceHealthMetadata for all sites in the subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the resource group in - the subscription. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site - as a collection. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} - - def get_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} - - def list_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site - as a collection. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} - - def get_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_top_level_domains_operations.py deleted file mode 100644 index e930abcb731..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_top_level_domains_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TopLevelDomainsOperations(object): - """TopLevelDomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all top-level domains supported for registration. - - Get all top-level domains supported for registration. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TopLevelDomain - :rtype: - ~azure.mgmt.web.v2018_02_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2018_02_01.models.TopLevelDomain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} - - def get( - self, name, custom_headers=None, raw=False, **operation_config): - """Get details of a top-level domain. - - Get details of a top-level domain. - - :param name: Name of the top-level domain. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TopLevelDomain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.TopLevelDomain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TopLevelDomain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} - - def list_agreements( - self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): - """Gets all legal agreements that user needs to accept before purchasing a - domain. - - 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 include_privacy: If true, then the list of - agreements will include agreements for domain privacy as well; - otherwise, false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TldLegalAgreement - :rtype: - ~azure.mgmt.web.v2018_02_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2018_02_01.models.TldLegalAgreement] - :raises: - :class:`DefaultErrorResponseException` - """ - agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_agreements.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_apps_operations.py deleted file mode 100644 index 0e61cb62ca7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_apps_operations.py +++ /dev/null @@ -1,26850 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class WebAppsOperations(object): - """WebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all apps for a subscription. - - Get all apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} - - def list_by_resource_group( - self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): - """Gets all web, mobile, and API apps in the specified resource group. - - 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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - if include_slots is not None: - query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the details of a web, mobile, or API app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. - - 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.v2018_02_01.models.Site - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def delete( - self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """Deletes a web, mobile, or API app, or one of the deployment slots. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. - - 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.v2018_02_01.models.SitePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def analyze_custom_hostname( - self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): - """Analyze a custom hostname. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} - - def apply_slot_config_to_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Applies the configuration settings from the target slot onto the - current slot. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_config_to_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} - - def backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """Creates a backup of an app. - - 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.v2018_02_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} - - def list_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets existing backups of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2018_02_01.models.BackupItemPaged[~azure.mgmt.web.v2018_02_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} - - def get_backup_status( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """Gets a backup of an app by its ID. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def delete_backup( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """Deletes a backup of an app by its ID. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def list_backup_status_secrets( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - """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. - - 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.v2018_02_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} - - - def _restore_initial( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a specific backup to another app (or deployment slot, if - specified). - - 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.v2018_02_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} - - def list_configurations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List the configurations of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} - - def update_application_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the application settings of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} - - def list_application_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the application settings of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} - - def update_auth_settings( - self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): - """Updates the Authentication / Authorization settings associated with web - app. - - 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.v2018_02_01.models.SiteAuthSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} - - def get_auth_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the Authentication/Authorization settings of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} - - def update_azure_storage_accounts( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Updates the Azure storage account configurations of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) - - # Construct URL - url = self.update_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} - - def list_azure_storage_accounts( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the Azure storage account configurations of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} - - def update_backup_configuration( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """Updates the backup configuration of an app. - - 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.v2018_02_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def delete_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Deletes the backup configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def get_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the backup configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} - - def update_connection_strings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the connection strings of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2018_02_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} - - def list_connection_strings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the connection strings of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the logging configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_diagnostic_logs_config( - self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): - """Updates the logging configuration of an app. - - 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.v2018_02_01.models.SiteLogsConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_metadata( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the metadata of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} - - def list_metadata( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the metadata of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} - - - def _list_publishing_credentials_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """Gets the Git/FTP publishing credentials of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} - - def update_site_push_settings( - self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): - """Updates the Push settings associated with web app. - - 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.v2018_02_01.models.PushSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} - - def list_site_push_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the Push settings associated with web app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} - - def list_slot_configuration_names( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the names of app settings and connection strings that stick to the - slot (not swapped). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def update_slot_configuration_names( - self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): - """Updates the names of application settings and connection string that - remain with the slot during swap operation. - - 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.v2018_02_01.models.SlotConfigNamesResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def get_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the configuration of an app, such as platform version and bitness, - default documents, virtual applications, Always On, etc. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def create_or_update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. - - 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.v2018_02_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. - - 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.v2018_02_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def list_configuration_snapshot_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets a list of web app configuration snapshots identifiers. Each - element of the list contains a timestamp and the ID of the snapshot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} - - def get_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """Gets a snapshot of the configuration of an app at a previous point in - time. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """Reverts the configuration of an app to a previous snapshot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.recover_site_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the last lines of docker logs for the given site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} - - def get_container_logs_zip( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the ZIP archived docker log files for the given site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} - - def list_continuous_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List continuous web jobs for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2018_02_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} - - def get_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Gets a continuous web job by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Delete a continuous web job by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Start a continuous web job for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Stop a continuous web job for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List deployments for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DeploymentPaged[~azure.mgmt.web.v2018_02_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} - - def get_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """Get a deployment by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def create_deployment( - self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): - """Create a deployment for an app, or a deployment slot. - - 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.v2018_02_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def delete_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """Delete a deployment by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def list_deployment_log( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """List deployment log for specific deployment for an app, or a deployment - slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} - - def discover_backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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. - - 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.v2018_02_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} - - def list_domain_ownership_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Lists ownership identifiers for domain associated with web app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2018_02_01.models.IdentifierPaged[~azure.mgmt.web.v2018_02_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """Get domain ownership identifier for web app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. - - 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 kind: Kind of resource. - :type kind: str - :param identifier_id: String representation of the identity. - :type identifier_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """Deletes a domain ownership identifier for a web app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. - - 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 kind: Kind of resource. - :type kind: str - :param identifier_id: String representation of the identity. - :type identifier_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - - # Construct URL - url = self.update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the status of the last MSDeploy operation. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_initial( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. - - 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.v2018_02_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus]] - :raises: :class:`CloudError` - """ - raw_result = self._create_ms_deploy_operation_initial( - resource_group_name=resource_group_name, - name=name, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - def get_ms_deploy_log( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} - - def list_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List the functions for a web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} - - def get_functions_admin_token( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Fetch a short lived token that can be exchanged for a master key. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} - - def get_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """Get function information by its ID for web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - - def _create_function_initial( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_function( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create function for web site, or a deployment slot. - - 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.v2018_02_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_function_initial( - resource_group_name=resource_group_name, - name=name, - function_name=function_name, - function_envelope=function_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def delete_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """Delete a function for web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def create_or_update_function_secret( - self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """Add or update a function secret. - - 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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def delete_function_secret( - self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): - """Delete a function secret. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """Get function keys for a function in a web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} - - def list_function_secrets( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """Get function secrets for a function in a web site, or a deployment - slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} - - def list_host_keys( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get host secrets for a function app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} - - def list_sync_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """This is to allow calling via powershell and ARM template. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} - - def sync_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Syncs function trigger metadata to the management database. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} - - def create_or_update_host_secret( - self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """Add or update a host level secret. - - 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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def delete_host_secret( - self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): - """Delete a host level secret. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get hostname bindings for an app or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2018_02_01.models.HostNameBindingPaged[~azure.mgmt.web.v2018_02_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} - - def get_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """Get the named hostname binding for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding( - self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. - - 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.v2018_02_01.models.HostNameBinding - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def delete_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Retrieves a specific Service Bus Hybrid Connection used by this Web - App. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. - - 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.v2018_02_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Removes a Hybrid Connection from this site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. - - 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.v2018_02_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Gets the send key name and value for a Hybrid Connection. - - Gets the send key name and value for a Hybrid Connection. - - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connection_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieves all Service Bus Hybrid Connections used by this Web App. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} - - def list_relay_service_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets hybrid connections configured for an app (or deployment slot, if - specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} - - def get_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """Gets a hybrid connection configuration by its name. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). - - 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.v2018_02_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def delete_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """Deletes a relay service connection by its name. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). - - 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.v2018_02_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def list_instance_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets all scale-out instances of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteInstance - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SiteInstancePaged[~azure.mgmt.web.v2018_02_01.models.SiteInstance] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} - - def get_instance_ms_deploy_status( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the status of the last MSDeploy operation. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - - def _create_instance_ms_deploy_operation_initial( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. - - 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.v2018_02_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} - - def list_instance_processes( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} - - def get_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} - - def list_instance_process_modules( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module( - self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} - - def list_instance_process_threads( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} - - def get_instance_process_thread( - self, resource_group_name, name, process_id, thread_id, instance_id, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. - - Get thread information by Thread ID for a specific process, in 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 thread_id: TID. - :type thread_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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_thread.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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'), - 'threadId': self._serialize.url("thread_id", thread_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} - - def is_cloneable( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Shows whether an app can be cloned to another resource group or - subscription. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} - - def list_sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """This is to allow calling via powershell and ARM template. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} - - def list_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets all metric definitions of an app (or deployment slot, if - specified). - - Gets all metric definitions 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'} - - def list_metrics( - self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets performance metrics of an app (or deployment slot, if specified). - - Gets performance metrics 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 details: Specify "true" to include metric details in the - response. It is "false" by default. - :type details: bool - :param filter: Return only metrics 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metrics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'} - - - def _migrate_storage_initial( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_storage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_storage( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a web app. - - 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.v2018_02_01.models.StorageMigrationOptions - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StorageMigrationResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.StorageMigrationResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.StorageMigrationResponse]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_storage_initial( - subscription_name=subscription_name, - resource_group_name=resource_group_name, - name=name, - migration_options=migration_options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} - - - def _migrate_my_sql_initial( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_my_sql.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_my_sql( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Migrates a local (in-app) MySql database to a remote MySql database. - - 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.v2018_02_01.models.MigrateMySqlRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Operation or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.Operation] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.Operation]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_my_sql_initial( - resource_group_name=resource_group_name, - name=name, - migration_request_envelope=migration_request_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} - - def get_migrate_my_sql_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Returns the status of MySql in app migration, if one is active, and - whether or not MySql in app is enabled. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} - - def get_swift_virtual_network_connection( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets a Swift Virtual Network connection. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def create_or_update_swift_virtual_network_connection( - self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Deletes a Swift Virtual Network connection from an app (or deployment - slot). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_swift_virtual_network.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def update_swift_virtual_network_connection( - self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def list_network_features( - self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): - """Gets all network features used by the app (or deployment slot, if - specified). - - 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. This can either be "summary" or - "detailed". - :type view: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_network_features.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} - - def get_network_trace_operation( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets a named operation for a network trace capturing (or deployment - slot, if specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """Start capturing network packets for the site (To be deprecated). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Start capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} - - def stop_web_site_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} - - def get_network_traces( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets a named operation for a network trace capturing (or deployment - slot, if specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} - - def get_network_trace_operation_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets a named operation for a network trace capturing (or deployment - slot, if specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} - - def get_network_traces_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets a named operation for a network trace capturing (or deployment - slot, if specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Generates a new publishing password for an app (or deployment slot, if - specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generate_new_site_publishing_password.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} - - def list_perf_mon_counters( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets perfmon counters for web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2018_02_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2018_02_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} - - def get_site_php_error_log_flag( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets web app's event logs. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} - - def list_premier_add_ons( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the premier add-ons of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} - - def get_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """Gets a named add-on of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """Updates a named add-on of an app. - - 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.v2018_02_01.models.PremierAddOn - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """Delete a premier add-on from an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """Updates a named add-on of an app. - - 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.v2018_02_01.models.PremierAddOnPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def get_private_access( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets data around private site access enablement and authorized Virtual - Networks that can access the site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def put_private_access_vnet( - self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): - """Sets data around private site access enablement and authorized Virtual - Networks that can access the site. - - 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.v2018_02_01.models.PrivateAccess - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def list_processes( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} - - def get_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def delete_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def get_process_dump( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} - - def list_process_modules( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} - - def get_process_module( - self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} - - def get_process_thread( - self, resource_group_name, name, process_id, thread_id, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. - - Get thread information by Thread ID for a specific process, in 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 thread_id: TID. - :type thread_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_thread.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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'), - 'threadId': self._serialize.url("thread_id", thread_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} - - def list_public_certificates( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get public certificates for an app or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2018_02_01.models.PublicCertificatePaged[~azure.mgmt.web.v2018_02_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} - - def get_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Get the named public certificate for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate( - self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. - - 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.v2018_02_01.models.PublicCertificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets( - self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the publishing profile for an app (or deployment slot, if - specified). - - 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 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.v2018_02_01.models.PublishingProfileFormat - :param include_disaster_recovery_endpoints: Include the - DisasterRecover endpoint if true - :type include_disaster_recovery_endpoints: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} - - def reset_production_slot_config( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Resets the configuration settings of the current slot if they were - previously modified by calling the API with POST. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_production_slot_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} - - def restart( - self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """Restarts an app (or deployment slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} - - - def _restore_from_backup_blob_initial( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob( - self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores an app from a backup blob in Azure Storage. - - 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.v2018_02_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_from_backup_blob_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a deleted web app to this web app. - - 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.v2018_02_01.models.DeletedAppRestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_from_deleted_app_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} - - - def _restore_snapshot_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a web app from a snapshot. - - 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.v2018_02_01.models.SnapshotRestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_snapshot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} - - def list_site_extensions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get list of siteextensions for a web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} - - def get_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """Get site extension information by its ID for a web site, or a - deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_initial( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Install site extension on a web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo]] - :raises: :class:`CloudError` - """ - raw_result = self._install_site_extension_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def delete_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """Remove a site extension from a web site, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def list_slots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets an app's deployment slots. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SitePaged[~azure.mgmt.web.v2018_02_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} - - def get_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the details of a web, mobile, or API app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - - def _create_or_update_slot_initial( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. - - 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.v2018_02_01.models.Site - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def delete_slot( - self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """Deletes a web, mobile, or API app, or one of the deployment slots. - - 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 true if the App Service plan - will be empty after app deletion and you want to delete the empty App - Service plan. By default, the empty App Service plan is not deleted. - :type delete_empty_server_farm: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. - - 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.v2018_02_01.models.SitePatchResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def analyze_custom_hostname_slot( - self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): - """Analyze a custom hostname. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} - - def apply_slot_configuration_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Applies the configuration settings from the target slot onto the - current slot. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} - - def backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """Creates a backup of an app. - - 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.v2018_02_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} - - def list_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets existing backups of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2018_02_01.models.BackupItemPaged[~azure.mgmt.web.v2018_02_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} - - def get_backup_status_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a backup of an app by its ID. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def delete_backup_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a backup of an app by its ID. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def list_backup_status_secrets_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """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. - - 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.v2018_02_01.models.BackupRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} - - - def _restore_slot_initial( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a specific backup to another app (or deployment slot, if - specified). - - 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.v2018_02_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_slot_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} - - def list_configurations_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List the configurations of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} - - def update_application_settings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the application settings of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} - - def list_application_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the application settings of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} - - def update_auth_settings_slot( - self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): - """Updates the Authentication / Authorization settings associated with web - app. - - 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.v2018_02_01.models.SiteAuthSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} - - def get_auth_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Authentication/Authorization settings of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} - - def update_azure_storage_accounts_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Updates the Azure storage account configurations of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2018_02_01.models.AzureStorageInfoValue] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) - - # Construct URL - url = self.update_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} - - def list_azure_storage_accounts_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Azure storage account configurations of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} - - def update_backup_configuration_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """Updates the backup configuration of an app. - - 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.v2018_02_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def delete_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes the backup configuration of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def get_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the backup configuration of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} - - def update_connection_strings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the connection strings of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2018_02_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} - - def list_connection_strings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the connection strings of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the logging configuration of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_diagnostic_logs_config_slot( - self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the logging configuration of an app. - - 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.v2018_02_01.models.SiteLogsConfig - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_metadata_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Replaces the metadata of an app. - - 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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} - - def list_metadata_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the metadata of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} - - - def _list_publishing_credentials_slot_initial( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Gets the Git/FTP publishing credentials of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} - - def update_site_push_settings_slot( - self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): - """Updates the Push settings associated with web app. - - 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.v2018_02_01.models.PushSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} - - def list_site_push_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Push settings associated with web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} - - def get_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the configuration of an app, such as platform version and bitness, - default documents, virtual applications, Always On, etc. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def create_or_update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. - - 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.v2018_02_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. - - 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.v2018_02_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def list_configuration_snapshot_info_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a list of web app configuration snapshots identifiers. Each - element of the list contains a timestamp and the ID of the snapshot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} - - def get_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a snapshot of the configuration of an app at a previous point in - time. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """Reverts the configuration of an app to a previous snapshot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.recover_site_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the last lines of docker logs for the given site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} - - def get_container_logs_zip_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the ZIP archived docker log files for the given site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} - - def list_continuous_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List continuous web jobs for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2018_02_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} - - def get_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a continuous web job by its ID for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a continuous web job by its ID for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Start a continuous web job for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Stop a continuous web job for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List deployments for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2018_02_01.models.DeploymentPaged[~azure.mgmt.web.v2018_02_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} - - def get_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """Get a deployment by its ID for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def create_deployment_slot( - self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): - """Create a deployment for an app, or a deployment slot. - - 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.v2018_02_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def delete_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """Delete a deployment by its ID for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def list_deployment_log_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """List deployment log for specific deployment for an app, or a deployment - slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} - - def discover_backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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. - - 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.v2018_02_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} - - def list_domain_ownership_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Lists ownership identifiers for domain associated with web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2018_02_01.models.IdentifierPaged[~azure.mgmt.web.v2018_02_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """Get domain ownership identifier for web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. - - 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 kind: Kind of resource. - :type kind: str - :param identifier_id: String representation of the identity. - :type identifier_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a domain ownership identifier for a web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. - - 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 kind: Kind of resource. - :type kind: str - :param identifier_id: String representation of the identity. - :type identifier_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - - # Construct URL - url = self.update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get the status of the last MSDeploy operation. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation_slot( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. - - 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.v2018_02_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus]] - :raises: :class:`CloudError` - """ - raw_result = self._create_ms_deploy_operation_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - def get_ms_deploy_log_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} - - def list_instance_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List the functions for a web site, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} - - def get_functions_admin_token_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Fetch a short lived token that can be exchanged for a master key. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} - - def get_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """Get function information by its ID for web site, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - - def _create_instance_function_slot_initial( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_function_slot( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create function for web site, or a deployment slot. - - 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.v2018_02_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def delete_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a function for web site, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def create_or_update_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """Add or update a function secret. - - 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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a function secret. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """Get function keys for a function in a web site, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} - - def list_function_secrets_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """Get function secrets for a function in a web site, or a deployment - slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} - - def list_host_keys_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get host secrets for a function app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} - - def list_sync_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """This is to allow calling via powershell and ARM template. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} - - def sync_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Syncs function trigger metadata to the management database. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} - - def create_or_update_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """Add or update a host level secret. - - 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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a host level secret. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get hostname bindings for an app or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2018_02_01.models.HostNameBindingPaged[~azure.mgmt.web.v2018_02_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} - - def get_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """Get the named hostname binding for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding_slot( - self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. - - 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.v2018_02_01.models.HostNameBinding - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def delete_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def get_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """Retrieves a specific Service Bus Hybrid Connection used by this Web - App. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. - - 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.v2018_02_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """Removes a Hybrid Connection from this site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. - - 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.v2018_02_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the send key name and value for a Hybrid Connection. - - Gets the send key name and value for a Hybrid Connection. - - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connection_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_hybrid_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Retrieves all Service Bus Hybrid Connections used by this Web App. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} - - def list_relay_service_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets hybrid connections configured for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} - - def get_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a hybrid connection configuration by its name. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). - - 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.v2018_02_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def delete_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a relay service connection by its name. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). - - 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.v2018_02_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def list_instance_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets all scale-out instances of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteInstance - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SiteInstancePaged[~azure.mgmt.web.v2018_02_01.models.SiteInstance] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} - - def get_instance_ms_deploy_status_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the status of the last MSDeploy operation. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - - def _create_instance_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation_slot( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. - - 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.v2018_02_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus]] - :raises: :class:`CloudError` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_processes_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} - - def get_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_process_modules_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def list_instance_process_threads_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} - - def get_instance_process_thread_slot( - self, resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. - - Get thread information by Thread ID for a specific process, in 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 thread_id: TID. - :type thread_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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_thread_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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'), - 'threadId': self._serialize.url("thread_id", thread_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} - - def is_cloneable_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Shows whether an app can be cloned to another resource group or - subscription. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} - - def list_sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """This is to allow calling via powershell and ARM template. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} - - def list_metric_definitions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets all metric definitions of an app (or deployment slot, if - specified). - - Gets all metric definitions 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 metric definitions of the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metric_definitions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} - - def list_metrics_slot( - self, resource_group_name, name, slot, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets performance metrics of an app (or deployment slot, if specified). - - Gets performance metrics 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 metrics of the production slot. - :type slot: str - :param details: Specify "true" to include metric details in the - response. It is "false" by default. - :type details: bool - :param filter: Return only metrics 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ResourceMetricPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetric] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_metrics_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, '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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} - - def get_migrate_my_sql_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Returns the status of MySql in app migration, if one is active, and - whether or not MySql in app is enabled. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} - - def get_swift_virtual_network_connection_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a Swift Virtual Network connection. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def create_or_update_swift_virtual_network_connection_slot( - self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a Swift Virtual Network connection from an app (or deployment - slot). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_swift_virtual_network_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def update_swift_virtual_network_connection_slot( - self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def list_network_features_slot( - self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): - """Gets all network features used by the app (or deployment slot, if - specified). - - 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. This can either be "summary" or - "detailed". - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_network_features_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} - - def get_network_trace_operation_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a named operation for a network trace capturing (or deployment - slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """Start capturing network packets for the site (To be deprecated). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Start capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} - - def stop_web_site_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} - - def get_network_traces_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a named operation for a network trace capturing (or deployment - slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} - - def get_network_trace_operation_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a named operation for a network trace capturing (or deployment - slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def get_network_traces_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a named operation for a network trace capturing (or deployment - slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Generates a new publishing password for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.generate_new_site_publishing_password_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} - - def list_perf_mon_counters_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets perfmon counters for web app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2018_02_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2018_02_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} - - def get_site_php_error_log_flag_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets web app's event logs. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} - - def list_premier_add_ons_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the premier add-ons of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} - - def get_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a named add-on of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """Updates a named add-on of an app. - - 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.v2018_02_01.models.PremierAddOn - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a premier add-on from an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """Updates a named add-on of an app. - - 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.v2018_02_01.models.PremierAddOnPatchResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def get_private_access_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets data around private site access enablement and authorized Virtual - Networks that can access the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def put_private_access_vnet_slot( - self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): - """Sets data around private site access enablement and authorized Virtual - Networks that can access the site. - - 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.v2018_02_01.models.PrivateAccess - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def list_processes_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} - - def get_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def delete_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def get_process_dump_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} - - def list_process_modules_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} - - def get_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} - - def get_process_thread_slot( - self, resource_group_name, name, process_id, thread_id, slot, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. - - Get thread information by Thread ID for a specific process, in 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 thread_id: TID. - :type thread_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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_process_thread_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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'), - 'threadId': self._serialize.url("thread_id", thread_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'} - - def list_public_certificates_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get public certificates for an app or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2018_02_01.models.PublicCertificatePaged[~azure.mgmt.web.v2018_02_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} - - def get_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Get the named public certificate for an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate_slot( - self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. - - 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.v2018_02_01.models.PublicCertificate - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets_slot( - self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the publishing profile for an app (or deployment slot, if - specified). - - 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 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.v2018_02_01.models.PublishingProfileFormat - :param include_disaster_recovery_endpoints: Include the - DisasterRecover endpoint if true - :type include_disaster_recovery_endpoints: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} - - def reset_slot_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Resets the configuration settings of the current slot if they were - previously modified by calling the API with POST. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} - - def restart_slot( - self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """Restarts an app (or deployment slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.restart_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} - - - def _restore_from_backup_blob_slot_initial( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores an app from a backup blob in Azure Storage. - - 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.v2018_02_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_from_backup_blob_slot_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a deleted web app to this web app. - - 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.v2018_02_01.models.DeletedAppRestoreRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_from_deleted_app_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} - - - def _restore_snapshot_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a web app from a snapshot. - - 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.v2018_02_01.models.SnapshotRestoreRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_snapshot_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} - - def list_site_extensions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Get list of siteextensions for a web site, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} - - def get_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """Get site extension information by its ID for a web site, or a - deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_slot_initial( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Install site extension on a web site, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo]] - :raises: :class:`CloudError` - """ - raw_result = self._install_site_extension_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def delete_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """Remove a site extension from a web site, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def list_slot_differences_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Get the difference in configuration settings between two web app slots. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SlotDifferencePaged[~azure.mgmt.web.v2018_02_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} - - - def _swap_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """Swaps two deployment slots of an app. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._swap_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} - - def list_snapshots_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Returns all Snapshots to the user. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SnapshotPaged[~azure.mgmt.web.v2018_02_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} - - def list_snapshots_from_dr_secondary_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Returns all Snapshots to the user from DRSecondary endpoint. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SnapshotPaged[~azure.mgmt.web.v2018_02_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} - - def get_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the source control configuration of an app. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - - def _create_or_update_source_control_slot_initial( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the source control configuration of an app. - - 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.v2018_02_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def delete_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes the source control configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - """Updates the source control configuration of an app. - - 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.v2018_02_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def start_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Starts an app (or deployment slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} - - - def _start_network_trace_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Start capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} - - def stop_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Stops an app (or deployment slot, if specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} - - def stop_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} - - def sync_repository_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Sync web app repository. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_repository_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} - - def sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Syncs function trigger metadata to the management database. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} - - def list_triggered_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List triggered web jobs for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2018_02_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} - - def get_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a triggered web job by its ID for an app, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a triggered web job by its ID for an app, or a deployment slot. - - 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 a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """List a triggered web job's history for an app, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistory] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a triggered web job's history by its ID for an app, , or a - deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def run_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Run a triggered web job for an app, or a deployment slot. - - 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 deletes a deployment for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.run_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} - - def list_usages_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets the quota usage information of an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} - - def list_vnet_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the virtual networks the app (or deployment slot) is connected to. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} - - def get_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a virtual network the app (or deployment slot) is connected to by - name. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Adds a Virtual Network connection to an app or slot (PUT) or updates - the connection properties (PATCH). - - 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.v2018_02_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a connection from an app (or deployment slot to a named virtual - network. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Adds a Virtual Network connection to an app or slot (PUT) or updates - the connection properties (PATCH). - - 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.v2018_02_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets an app's Virtual Network gateway. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Adds a gateway to a connected Virtual Network (PUT) or updates it - (PATCH). - - 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.v2018_02_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Adds a gateway to a connected Virtual Network (PUT) or updates it - (PATCH). - - 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.v2018_02_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List webjobs for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2018_02_01.models.WebJobPaged[~azure.mgmt.web.v2018_02_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} - - def get_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """Get webjob information for an app, or a deployment slot. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} - - def list_slot_differences_from_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Get the difference in configuration settings between two web app slots. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SlotDifferencePaged[~azure.mgmt.web.v2018_02_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_from_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} - - - def _swap_slot_with_production_initial( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_with_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_with_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """Swaps two deployment slots of an app. - - 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._swap_slot_with_production_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} - - def list_snapshots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Returns all Snapshots to the user. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SnapshotPaged[~azure.mgmt.web.v2018_02_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} - - def list_snapshots_from_dr_secondary( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Returns all Snapshots to the user from DRSecondary endpoint. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SnapshotPaged[~azure.mgmt.web.v2018_02_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} - - def get_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the source control configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - - def _create_or_update_source_control_initial( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the source control configuration of an app. - - 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.v2018_02_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def delete_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Deletes the source control configuration of an app. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - """Updates the source control configuration of an app. - - 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.v2018_02_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def start( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Starts an app (or deployment slot, if specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} - - - def _start_network_trace_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Start capturing network packets for the site. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} - - def stop( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Stops an app (or deployment slot, if specified). - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} - - def stop_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} - - def sync_repository( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Sync web app repository. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_repository.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} - - def sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Syncs function trigger metadata to the management database. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} - - def list_triggered_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List triggered web jobs for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2018_02_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} - - def get_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Gets a triggered web job by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Delete a triggered web job by its ID for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """List a triggered web job's history for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistory] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history( - self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): - """Gets a triggered web job's history by its ID for an app, , or a - deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} - - def run_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Run a triggered web job for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.run_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets the quota usage information of an app (or deployment slot, if - specified). - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} - - def list_vnet_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the virtual networks the app (or deployment slot) is connected to. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2018_02_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} - - def get_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """Gets a virtual network the app (or deployment slot) is connected to by - name. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Adds a Virtual Network connection to an app or slot (PUT) or updates - the connection properties (PATCH). - - 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.v2018_02_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """Deletes a connection from an app (or deployment slot to a named virtual - network. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Adds a Virtual Network connection to an app or slot (PUT) or updates - the connection properties (PATCH). - - 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.v2018_02_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """Gets an app's Virtual Network gateway. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Adds a gateway to a connected Virtual Network (PUT) or updates it - (PATCH). - - 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.v2018_02_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Adds a gateway to a connected Virtual Network (PUT) or updates it - (PATCH). - - 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.v2018_02_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """List webjobs for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2018_02_01.models.WebJobPaged[~azure.mgmt.web.v2018_02_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} - - def get_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """Get webjob information for an app, or a deployment slot. - - 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_site_management_client_operations.py deleted file mode 100644 index 1b6dd1aa23a..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/operations/_web_site_management_client_operations.py +++ /dev/null @@ -1,1129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -from .. import models -import uuid - - -class WebSiteManagementClientOperationsMixin(object): - - def get_publishing_user( - self, custom_headers=None, raw=False, **operation_config): - """Gets publishing user. - - Gets publishing user. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def update_publishing_user( - self, user_details, custom_headers=None, raw=False, **operation_config): - """Updates publishing user. - - Updates publishing user. - - :param user_details: Details of publishing user - :type user_details: ~azure.mgmt.web.v2018_02_01.models.User - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(user_details, 'User') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def list_source_controls( - self, custom_headers=None, raw=False, **operation_config): - """Gets the source controls available for Azure websites. - - Gets the source controls available for Azure websites. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SourceControl - :rtype: - ~azure.mgmt.web.v2018_02_01.models.SourceControlPaged[~azure.mgmt.web.v2018_02_01.models.SourceControl] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_source_controls.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} - - def get_source_control( - self, source_control_type, custom_headers=None, raw=False, **operation_config): - """Gets source control token. - - Gets source control token. - - :param source_control_type: Type of source control - :type source_control_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def update_source_control( - self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): - """Updates source control token. - - 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.v2018_02_01.models.SourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_message, 'SourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def list_billing_meters( - self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of meters for a given location. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BillingMeter - :rtype: - ~azure.mgmt.web.v2018_02_01.models.BillingMeterPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeter] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_billing_meters.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} - - def check_name_availability( - self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): - """Check if a resource name is available. - - Check if a resource name is available. - - :param name: Resource name to verify. - :type name: str - :param type: 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.v2018_02_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. - :type is_fqdn: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) - - # Construct URL - url = self.check_name_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceNameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} - - def get_subscription_deployment_locations( - self, custom_headers=None, raw=False, **operation_config): - """Gets list of available geo regions plus ministamps. - - Gets list of available geo regions plus ministamps. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.DeploymentLocations or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_subscription_deployment_locations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeploymentLocations', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} - - def list_geo_regions( - self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): - """Get a list of available geographical regions. - - Get a list of available geographical regions. - - :param sku: Name of SKU used to filter the regions. Possible values - include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' - :type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName - :param linux_workers_enabled: Specify true if you want to - filter to only regions that support Linux workers. - :type linux_workers_enabled: bool - :param xenon_workers_enabled: Specify true if you want to - filter to only regions that support Xenon workers. - :type xenon_workers_enabled: bool - :param linux_dynamic_workers_enabled: Specify true if you - want to filter to only regions that support Linux Consumption Workers. - :type linux_dynamic_workers_enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GeoRegion - :rtype: - ~azure.mgmt.web.v2018_02_01.models.GeoRegionPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegion] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_geo_regions.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} - - def list_site_identifiers_assigned_to_host_name( - self, name=None, custom_headers=None, raw=False, **operation_config): - """List all apps that are assigned to a hostname. - - List all apps that are assigned to a hostname. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2018_02_01.models.IdentifierPaged[~azure.mgmt.web.v2018_02_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} - - def list_premier_add_on_offers( - self, custom_headers=None, raw=False, **operation_config): - """List all premier add-on offers. - - List all premier add-on offers. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PremierAddOnOffer - :rtype: - ~azure.mgmt.web.v2018_02_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2018_02_01.models.PremierAddOnOffer] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_premier_add_on_offers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} - - def list_skus( - self, custom_headers=None, raw=False, **operation_config): - """List all SKUs. - - List all SKUs. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.SkuInfos or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_skus.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SkuInfos', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} - - def verify_hosting_environment_vnet( - self, parameters, custom_headers=None, raw=False, **operation_config): - """Verifies if this VNET is compatible with an App Service Environment by - analyzing the Network Security Group rules. - - 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.v2018_02_01.models.VnetParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetValidationFailureDetails or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2018_02_01.models.VnetValidationFailureDetails or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_hosting_environment_vnet.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VnetParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetValidationFailureDetails', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} - - def move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """Move resources between resource groups. - - 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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} - - def validate( - self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): - """Validate if a resource can be created. - - 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.v2018_02_01.models.ValidateRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_02_01.models.ValidateResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_request, 'ValidateRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidateResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} - - def validate_container_settings( - self, validate_container_settings_request, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Validate if the container settings are correct. - - Validate if the container settings are correct. - - :param validate_container_settings_request: - :type validate_container_settings_request: - ~azure.mgmt.web.v2018_02_01.models.ValidateContainerSettingsRequest - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate_container_settings.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_container_settings_request, 'ValidateContainerSettingsRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate_container_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validateContainerSettings'} - - def validate_move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """Validate whether a resource can be moved. - - 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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.validate_move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_02_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_web_site_management_client.py deleted file mode 100644 index 67eb48a12b0..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/_web_site_management_client.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import CertificatesOperations -from . import models - - -class WebSiteManagementClient(SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.web.v2018_11_01.operations.CertificatesOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-11-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.certificates = CertificatesOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/__init__.py deleted file mode 100644 index 7558f02f8c2..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/__init__.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import ApiDefinitionInfo - from ._models_py3 import AppServicePlan - from ._models_py3 import AutoHealActions - from ._models_py3 import AutoHealCustomAction - from ._models_py3 import AutoHealRules - from ._models_py3 import AutoHealTriggers - from ._models_py3 import AzureStorageInfoValue - from ._models_py3 import Capability - from ._models_py3 import Certificate - from ._models_py3 import CertificatePatchResource - from ._models_py3 import CloningInfo - from ._models_py3 import ConnStringInfo - from ._models_py3 import CorsSettings - from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException - from ._models_py3 import DefaultErrorResponseError - from ._models_py3 import DefaultErrorResponseErrorDetailsItem - from ._models_py3 import DeletedSite - from ._models_py3 import Experiments - from ._models_py3 import GeoDistribution - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostNameSslState - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import Identifier - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models_py3 import NameValuePair - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import Site - from ._models_py3 import SiteConfig - from ._models_py3 import SiteLimits - from ._models_py3 import SiteMachineKey - from ._models_py3 import SkuCapacity - from ._models_py3 import SkuDescription - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import Snapshot - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import User - from ._models_py3 import VirtualApplication - from ._models_py3 import VirtualDirectory - from ._models_py3 import VnetGateway - from ._models_py3 import VnetInfo - from ._models_py3 import VnetRoute -except (SyntaxError, ImportError): - from ._models import ApiDefinitionInfo - from ._models import AppServicePlan - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import AzureStorageInfoValue - from ._models import Capability - from ._models import Certificate - from ._models import CertificatePatchResource - from ._models import CloningInfo - from ._models import ConnStringInfo - from ._models import CorsSettings - from ._models import DefaultErrorResponse, DefaultErrorResponseException - from ._models import DefaultErrorResponseError - from ._models import DefaultErrorResponseErrorDetailsItem - from ._models import DeletedSite - from ._models import Experiments - from ._models import GeoDistribution - from ._models import HandlerMapping - from ._models import HostingEnvironmentProfile - from ._models import HostNameSslState - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import Identifier - from ._models import IpSecurityRestriction - from ._models import ManagedServiceIdentity - from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models import NameValuePair - from ._models import ProxyOnlyResource - from ._models import PushSettings - from ._models import RampUpRule - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import Site - from ._models import SiteConfig - from ._models import SiteLimits - from ._models import SiteMachineKey - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import Snapshot - from ._models import StatusCodesBasedTrigger - from ._models import User - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetRoute -from ._paged_models import CertificatePaged -from ._web_site_management_client_enums import ( - KeyVaultSecretStatus, - RouteType, - ManagedServiceIdentityType, - IpFilterTag, - AutoHealActionType, - ConnectionStringType, - AzureStorageType, - AzureStorageState, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - FtpsState, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - RedundancyMode, - StatusOptions, - ProvisioningState, -) - -__all__ = [ - 'ApiDefinitionInfo', - 'AppServicePlan', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'AzureStorageInfoValue', - 'Capability', - 'Certificate', - 'CertificatePatchResource', - 'CloningInfo', - 'ConnStringInfo', - 'CorsSettings', - 'DefaultErrorResponse', 'DefaultErrorResponseException', - 'DefaultErrorResponseError', - 'DefaultErrorResponseErrorDetailsItem', - 'DeletedSite', - 'Experiments', - 'GeoDistribution', - 'HandlerMapping', - 'HostingEnvironmentProfile', - 'HostNameSslState', - 'HybridConnection', - 'HybridConnectionKey', - 'Identifier', - 'IpSecurityRestriction', - 'ManagedServiceIdentity', - 'ManagedServiceIdentityUserAssignedIdentitiesValue', - 'NameValuePair', - 'ProxyOnlyResource', - 'PushSettings', - 'RampUpRule', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'Site', - 'SiteConfig', - 'SiteLimits', - 'SiteMachineKey', - 'SkuCapacity', - 'SkuDescription', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'Snapshot', - 'StatusCodesBasedTrigger', - 'User', - 'VirtualApplication', - 'VirtualDirectory', - 'VnetGateway', - 'VnetInfo', - 'VnetRoute', - 'CertificatePaged', - 'KeyVaultSecretStatus', - 'RouteType', - 'ManagedServiceIdentityType', - 'IpFilterTag', - 'AutoHealActionType', - 'ConnectionStringType', - 'AzureStorageType', - 'AzureStorageState', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'FtpsState', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'RedundancyMode', - 'StatusOptions', - 'ProvisioningState', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models.py deleted file mode 100644 index 6edea73571f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models.py +++ /dev/null @@ -1,2750 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ApiDefinitionInfo(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 Resource(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: 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.get('location', None) - self.type = None - self.tags = kwargs.get('tags', None) - - -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: Resource tags. - :type tags: dict[str, 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.v2018_11_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.v2018_11_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2018_11_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2018_11_01.models.SkuDescription - """ - - _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}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, 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.sku = kwargs.get('sku', None) - - -class AutoHealActions(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.v2018_11_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2018_11_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': 'AutoHealActionType'}, - '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(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(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.v2018_11_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2018_11_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2018_11_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.v2018_11_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2018_11_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) - - -class AzureStorageInfoValue(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.v2018_11_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' - :vartype state: str or - ~azure.mgmt.web.v2018_11_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - 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 Capability(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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2018_11_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.v2018_11_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', '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) - - -class ProxyOnlyResource(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 CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2018_11_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.v2018_11_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', '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) - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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.get('source_web_app_id', None) - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2018_11_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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 CorsSettings(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 DefaultErrorResponse(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.v2018_11_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 DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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.v2018_11_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(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 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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_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.deleted_site_kind = None - self.geo_region_name = None - - -class Experiments(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2018_11_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 GeoDistribution(Model): - """A global distribution definition. - - :param location: Location. - :type location: str - :param number_of_workers: NumberOfWorkers. - :type number_of_workers: int - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(GeoDistribution, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.number_of_workers = kwargs.get('number_of_workers', None) - - -class HandlerMapping(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 HostingEnvironmentProfile(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 HostNameSslState(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.v2018_11_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 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.v2018_11_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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 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 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 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identifier, self).__init__(**kwargs) - self.identifier_id = kwargs.get('identifier_id', None) - - -class IpSecurityRestriction(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' - :type tag: str or ~azure.mgmt.web.v2018_11_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 - """ - - _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': 'IpFilterTag'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', '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) - - -class ManagedServiceIdentity(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.v2018_11_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.v2018_11_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _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': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class NameValuePair(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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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 RequestsBasedTrigger(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 ResourceMetricAvailability(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.v2018_11_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 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: Resource tags. - :type tags: dict[str, str] - :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.v2018_11_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2018_11_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.v2018_11_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2018_11_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2018_11_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2018_11_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: true if the app is a default - container; otherwise, 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.v2018_11_01.models.SlotSwapStatus - :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.v2018_11_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 geo_distributions: GeoDistributions for this site - :type geo_distributions: - list[~azure.mgmt.web.v2018_11_01.models.GeoDistribution] - :param identity: - :type identity: ~azure.mgmt.web.v2018_11_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) - self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.geo_distributions = kwargs.get('geo_distributions', None) - self.identity = kwargs.get('identity', None) - - -class SiteConfig(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. Default value: - "v4.6" . - :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 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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2018_11_01.models.NameValuePair] - :param azure_storage_accounts: User-provided Azure storage accounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2018_11_01.models.AzureStorageInfoValue] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2018_11_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2018_11_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2018_11_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' - :type scm_type: str or ~azure.mgmt.web.v2018_11_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2018_11_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2018_11_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2018_11_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2018_11_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2018_11_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2018_11_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2018_11_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2018_11_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2018_11_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2018_11_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2018_11_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. Default value: True . - :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.v2018_11_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.v2018_11_01.models.FtpsState - :param reserved_instance_count: Number of reserved instances. - This setting only applies to the Consumption Plan - :type reserved_instance_count: int - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'reserved_instance_count': {'maximum': 10, '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'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, - 'reserved_instance_count': {'key': 'reservedInstanceCount', '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.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.cors = kwargs.get('cors', None) - self.push = kwargs.get('push', None) - self.api_definition = kwargs.get('api_definition', 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.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.ftps_state = kwargs.get('ftps_state', None) - self.reserved_instance_count = kwargs.get('reserved_instance_count', None) - - -class SiteLimits(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 SiteMachineKey(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 SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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.v2018_11_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.v2018_11_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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.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 StatusCodesBasedTrigger(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 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'}, - '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.count = kwargs.get('count', None) - self.time_interval = kwargs.get('time_interval', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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 VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2018_11_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(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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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.v2018_11_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 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.v2018_11_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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models_py3.py deleted file mode 100644 index 77ef8bba271..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_models_py3.py +++ /dev/null @@ -1,2750 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class Resource(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: 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: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.location = location - self.type = None - self.tags = tags - - -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: Resource tags. - :type tags: dict[str, 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.v2018_11_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.v2018_11_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2018_11_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2018_11_01.models.SkuDescription - """ - - _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}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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.sku = sku - - -class AutoHealActions(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.v2018_11_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2018_11_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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.v2018_11_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2018_11_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2018_11_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.v2018_11_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2018_11_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -class AzureStorageInfoValue(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.v2018_11_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' - :vartype state: str or - ~azure.mgmt.web.v2018_11_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: - 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 Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - 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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2018_11_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.v2018_11_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - } - - def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: - 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 - - -class ProxyOnlyResource(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: str=None, **kwargs) -> None: - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.type = None - - -class CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2018_11_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.v2018_11_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - } - - def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, **kwargs) -> None: - 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 - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ConnStringInfo(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.v2018_11_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.support_credentials = support_credentials - - -class DefaultErrorResponse(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.v2018_11_01.models.DefaultErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, - } - - def __init__(self, **kwargs) -> None: - super(DefaultErrorResponse, self).__init__(**kwargs) - self.error = None - - -class DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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.v2018_11_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=None, **kwargs) -> None: - super(DefaultErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = details - self.innererror = None - - -class DefaultErrorResponseErrorDetailsItem(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) -> None: - super(DefaultErrorResponseErrorDetailsItem, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = 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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, - 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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.deleted_site_kind = None - self.geo_region_name = None - - -class Experiments(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2018_11_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -class GeoDistribution(Model): - """A global distribution definition. - - :param location: Location. - :type location: str - :param number_of_workers: NumberOfWorkers. - :type number_of_workers: int - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, - } - - def __init__(self, *, location: str=None, number_of_workers: int=None, **kwargs) -> None: - super(GeoDistribution, self).__init__(**kwargs) - self.location = location - self.number_of_workers = number_of_workers - - -class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostNameSslState(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.v2018_11_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 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.v2018_11_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) - self.send_key_name = None - self.send_key_value = 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 identifier_id: String representation of the identity. - :type identifier_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'}, - 'identifier_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, identifier_id: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.identifier_id = identifier_id - - -class IpSecurityRestriction(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' - :type tag: str or ~azure.mgmt.web.v2018_11_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 - """ - - _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': 'IpFilterTag'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, **kwargs) -> None: - 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 - - -class ManagedServiceIdentity(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.v2018_11_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.v2018_11_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _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': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - self.user_assigned_identities = user_assigned_identities - - -class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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) -> None: - super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - MinReroutePercentage or MaxReroutePercentage. - Site metrics are checked every N minutes specified in - ChangeIntervalInMinutes. - Custom decision algorithm can be provided in TiPCallback site extension - which URL can be specified in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -class ResourceMetricAvailability(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) -> None: - 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.v2018_11_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: str=None, **kwargs) -> None: - 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 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: Resource tags. - :type tags: dict[str, str] - :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.v2018_11_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2018_11_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.v2018_11_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2018_11_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2018_11_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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. 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 - :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.v2018_11_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: true if the app is a default - container; otherwise, 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.v2018_11_01.models.SlotSwapStatus - :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.v2018_11_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 geo_distributions: GeoDistributions for this site - :type geo_distributions: - list[~azure.mgmt.web.v2018_11_01.models.GeoDistribution] - :param identity: - :type identity: ~azure.mgmt.web.v2018_11_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'geo_distributions': {'key': 'properties.geoDistributions', 'type': '[GeoDistribution]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, geo_distributions=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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_exclusion_paths = client_cert_exclusion_paths - self.host_names_disabled = host_names_disabled - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.geo_distributions = geo_distributions - self.identity = identity - - -class SiteConfig(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. Default value: - "v4.6" . - :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 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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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.v2018_11_01.models.NameValuePair] - :param azure_storage_accounts: User-provided Azure storage accounts. - :type azure_storage_accounts: dict[str, - ~azure.mgmt.web.v2018_11_01.models.AzureStorageInfoValue] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2018_11_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2018_11_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2018_11_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' - :type scm_type: str or ~azure.mgmt.web.v2018_11_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2018_11_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2018_11_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2018_11_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2018_11_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2018_11_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2018_11_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2018_11_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2018_11_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2018_11_01.models.ApiDefinitionInfo - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2018_11_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2018_11_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. Default value: True . - :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.v2018_11_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.v2018_11_01.models.FtpsState - :param reserved_instance_count: Number of reserved instances. - This setting only applies to the Consumption Plan - :type reserved_instance_count: int - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'reserved_instance_count': {'maximum': 10, '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'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - 'cors': {'key': 'cors', 'type': 'CorsSettings'}, - 'push': {'key': 'push', 'type': 'PushSettings'}, - 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, - 'reserved_instance_count': {'key': 'reservedInstanceCount', 'type': 'int'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: - 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.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.cors = cors - self.push = push - self.api_definition = api_definition - 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.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.ftps_state = ftps_state - self.reserved_instance_count = reserved_instance_count - - -class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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 SiteMachineKey(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - super(SiteMachineKey, self).__init__(**kwargs) - self.validation = validation - self.validation_key = validation_key - self.decryption = decryption - self.decryption_key = decryption_key - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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.v2018_11_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.v2018_11_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - 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: str=None, **kwargs) -> None: - super(Snapshot, self).__init__(kind=kind, **kwargs) - self.time = None - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - self.count = count - self.time_interval = time_interval - - -class User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: - 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 VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2018_11_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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.v2018_11_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: - 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 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.v2018_11_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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - super(VnetRoute, self).__init__(kind=kind, **kwargs) - self.start_address = start_address - self.end_address = end_address - self.route_type = route_type diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_paged_models.py deleted file mode 100644 index 596f67f1794..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_paged_models.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`Certificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Certificate]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificatePaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_web_site_management_client_enums.py deleted file mode 100644 index 13703438d9e..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class KeyVaultSecretStatus(str, Enum): - - 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 RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned, UserAssigned" - none = "None" - - -class IpFilterTag(str, Enum): - - default = "Default" - xff_proxy = "XffProxy" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 AzureStorageType(str, Enum): - - azure_files = "AzureFiles" - azure_blob = "AzureBlob" - - -class AzureStorageState(str, Enum): - - ok = "Ok" - invalid_credentials = "InvalidCredentials" - invalid_share = "InvalidShare" - - -class ScmType(str, Enum): - - 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" - - -class ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class FtpsState(str, Enum): - - all_allowed = "AllAllowed" - ftps_only = "FtpsOnly" - disabled = "Disabled" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class RedundancyMode(str, Enum): - - none = "None" - manual = "Manual" - failover = "Failover" - active_active = "ActiveActive" - geo_redundant = "GeoRedundant" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/__init__.py deleted file mode 100644 index 4ae1c595329..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._certificates_operations import CertificatesOperations - -__all__ = [ - 'CertificatesOperations', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/_certificates_operations.py deleted file mode 100644 index f17fd25713e..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/operations/_certificates_operations.py +++ /dev/null @@ -1,439 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CertificatesOperations(object): - """CertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2018-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-11-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all certificates for a subscription. - - Get all certificates for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2018_11_01.models.CertificatePaged[~azure.mgmt.web.v2018_11_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all certificates in a resource group. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2018_11_01.models.CertificatePaged[~azure.mgmt.web.v2018_11_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get a certificate. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_11_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def create_or_update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate. - - 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.v2018_11_01.models.Certificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_11_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'Certificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Delete a certificate. - - 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate. - - 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.v2018_11_01.models.CertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2018_11_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2018_11_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py deleted file mode 100644 index f02d0132faa..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/_web_site_management_client.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import WebSiteManagementClientOperationsMixin -from .operations import AppServiceCertificateOrdersOperations -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 ProviderOperations -from .operations import RecommendationsOperations -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, SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar app_service_certificate_orders: AppServiceCertificateOrders operations - :vartype app_service_certificate_orders: azure.mgmt.web.v2019_08_01.operations.AppServiceCertificateOrdersOperations - :ivar certificate_registration_provider: CertificateRegistrationProvider operations - :vartype certificate_registration_provider: azure.mgmt.web.v2019_08_01.operations.CertificateRegistrationProviderOperations - :ivar domains: Domains operations - :vartype domains: azure.mgmt.web.v2019_08_01.operations.DomainsOperations - :ivar top_level_domains: TopLevelDomains operations - :vartype top_level_domains: azure.mgmt.web.v2019_08_01.operations.TopLevelDomainsOperations - :ivar domain_registration_provider: DomainRegistrationProvider operations - :vartype domain_registration_provider: azure.mgmt.web.v2019_08_01.operations.DomainRegistrationProviderOperations - :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.web.v2019_08_01.operations.CertificatesOperations - :ivar deleted_web_apps: DeletedWebApps operations - :vartype deleted_web_apps: azure.mgmt.web.v2019_08_01.operations.DeletedWebAppsOperations - :ivar diagnostics: Diagnostics operations - :vartype diagnostics: azure.mgmt.web.v2019_08_01.operations.DiagnosticsOperations - :ivar provider: Provider operations - :vartype provider: azure.mgmt.web.v2019_08_01.operations.ProviderOperations - :ivar recommendations: Recommendations operations - :vartype recommendations: azure.mgmt.web.v2019_08_01.operations.RecommendationsOperations - :ivar web_apps: WebApps operations - :vartype web_apps: azure.mgmt.web.v2019_08_01.operations.WebAppsOperations - :ivar static_sites: StaticSites operations - :vartype static_sites: azure.mgmt.web.v2019_08_01.operations.StaticSitesOperations - :ivar app_service_environments: AppServiceEnvironments operations - :vartype app_service_environments: azure.mgmt.web.v2019_08_01.operations.AppServiceEnvironmentsOperations - :ivar app_service_plans: AppServicePlans operations - :vartype app_service_plans: azure.mgmt.web.v2019_08_01.operations.AppServicePlansOperations - :ivar resource_health_metadata: ResourceHealthMetadata operations - :vartype resource_health_metadata: azure.mgmt.web.v2019_08_01.operations.ResourceHealthMetadataOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-08-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( - 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.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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py deleted file mode 100644 index 722658164fc..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/__init__.py +++ /dev/null @@ -1,1038 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AbnormalTimePeriod - from ._models_py3 import Address - from ._models_py3 import AddressResponse - from ._models_py3 import AnalysisData - from ._models_py3 import AnalysisDefinition - from ._models_py3 import ApiDefinitionInfo - from ._models_py3 import ApiKVReference - from ._models_py3 import ApiManagementConfig - from ._models_py3 import ApplicationLogsConfig - from ._models_py3 import ApplicationStack - from ._models_py3 import ApplicationStackResource - from ._models_py3 import AppServiceCertificate - from ._models_py3 import AppServiceCertificateOrder - from ._models_py3 import AppServiceCertificateOrderPatchResource - from ._models_py3 import AppServiceCertificatePatchResource - from ._models_py3 import AppServiceCertificateResource - from ._models_py3 import AppServiceEnvironment - from ._models_py3 import AppServiceEnvironmentPatchResource - from ._models_py3 import AppServiceEnvironmentResource - from ._models_py3 import AppServicePlan - from ._models_py3 import AppServicePlanPatchResource - from ._models_py3 import ArmIdWrapper - from ._models_py3 import AutoHealActions - from ._models_py3 import AutoHealCustomAction - from ._models_py3 import AutoHealRules - from ._models_py3 import AutoHealTriggers - from ._models_py3 import AzureBlobStorageApplicationLogsConfig - from ._models_py3 import AzureBlobStorageHttpLogsConfig - from ._models_py3 import AzureStorageInfoValue - from ._models_py3 import AzureStoragePropertyDictionaryResource - from ._models_py3 import AzureTableStorageApplicationLogsConfig - from ._models_py3 import BackupItem - from ._models_py3 import BackupRequest - from ._models_py3 import BackupSchedule - from ._models_py3 import BillingMeter - from ._models_py3 import Capability - from ._models_py3 import Certificate - from ._models_py3 import CertificateDetails - from ._models_py3 import CertificateEmail - from ._models_py3 import CertificateOrderAction - from ._models_py3 import CertificatePatchResource - from ._models_py3 import CloningInfo - from ._models_py3 import ConnectionStringDictionary - from ._models_py3 import ConnStringInfo - from ._models_py3 import ConnStringValueTypePair - 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 CorsSettings - from ._models_py3 import CsmCopySlotEntity - from ._models_py3 import CsmMoveResourceEnvelope - 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 CustomHostnameAnalysisResult - from ._models_py3 import DatabaseBackupSetting - from ._models_py3 import DataSource - from ._models_py3 import DataTableResponseColumn - from ._models_py3 import DataTableResponseObject - from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException - from ._models_py3 import DefaultErrorResponseError - from ._models_py3 import DefaultErrorResponseErrorDetailsItem - from ._models_py3 import DeletedAppRestoreRequest - from ._models_py3 import DeletedSite - from ._models_py3 import Deployment - 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 DiagnosticAnalysis - from ._models_py3 import DiagnosticCategory - from ._models_py3 import DiagnosticData - 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 DomainControlCenterSsoRequest - from ._models_py3 import DomainOwnershipIdentifier - 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 FileSystemApplicationLogsConfig - from ._models_py3 import FileSystemHttpLogsConfig - from ._models_py3 import FunctionEnvelope - from ._models_py3 import FunctionSecrets - from ._models_py3 import GeoRegion - from ._models_py3 import GlobalCsmSkuDescription - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentDeploymentInfo - from ._models_py3 import HostingEnvironmentDiagnostics - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostKeys - from ._models_py3 import HostName - from ._models_py3 import HostNameBinding - from ._models_py3 import HostNameSslState - from ._models_py3 import HttpLogsConfig - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import HybridConnectionLimits - from ._models_py3 import Identifier - from ._models_py3 import InboundEnvironmentEndpoint - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import KeyInfo - from ._models_py3 import KeyVaultReferenceCollection - from ._models_py3 import KeyVaultReferenceResource - from ._models_py3 import LocalizableString - from ._models_py3 import LogSpecification - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models_py3 import MetricAvailability - from ._models_py3 import MetricSpecification - from ._models_py3 import MigrateMySqlRequest - from ._models_py3 import MigrateMySqlStatus - from ._models_py3 import MSDeploy - from ._models_py3 import MSDeployLog - from ._models_py3 import MSDeployLogEntry - from ._models_py3 import MSDeployStatus - from ._models_py3 import NameIdentifier - from ._models_py3 import NameValuePair - from ._models_py3 import NetworkAccessControlEntry - from ._models_py3 import NetworkFeatures - from ._models_py3 import NetworkTrace - from ._models_py3 import Operation - from ._models_py3 import OutboundEnvironmentEndpoint - 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 PremierAddOnPatchResource - from ._models_py3 import PrivateAccess - from ._models_py3 import PrivateAccessSubnet - from ._models_py3 import PrivateAccessVirtualNetwork - from ._models_py3 import PrivateEndpointConnectionResource - 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 ProcessModuleInfo - from ._models_py3 import ProcessThreadInfo - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PublicCertificate - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import Recommendation - from ._models_py3 import RecommendationRule - from ._models_py3 import ReissueCertificateOrderRequest - from ._models_py3 import RelayServiceConnectionEntity - from ._models_py3 import Rendering - from ._models_py3 import RenewCertificateOrderRequest - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceHealthMetadata - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceNameAvailability - from ._models_py3 import ResourceNameAvailabilityRequest - from ._models_py3 import ResponseMetaData - from ._models_py3 import RestoreRequest - from ._models_py3 import ServiceSpecification - from ._models_py3 import Site - from ._models_py3 import SiteAuthSettings - from ._models_py3 import SiteCloneability - from ._models_py3 import SiteCloneabilityCriterion - from ._models_py3 import SiteConfig - from ._models_py3 import SiteConfigResource - from ._models_py3 import SiteConfigurationSnapshotInfo - from ._models_py3 import SiteExtensionInfo - from ._models_py3 import SiteInstance - 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 SkuInfos - from ._models_py3 import SlotConfigNamesResource - from ._models_py3 import SlotDifference - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import Snapshot - from ._models_py3 import SnapshotRecoverySource - from ._models_py3 import SnapshotRestoreRequest - from ._models_py3 import Solution - from ._models_py3 import SourceControl - from ._models_py3 import StackMajorVersion - from ._models_py3 import StackMinorVersion - from ._models_py3 import StampCapacity - from ._models_py3 import StaticSiteARMResource - from ._models_py3 import StaticSiteBuildARMResource - from ._models_py3 import StaticSiteBuildProperties - from ._models_py3 import StaticSiteCustomDomainOverviewARMResource - from ._models_py3 import StaticSiteFunctionOverviewARMResource - from ._models_py3 import StaticSitePatchResource - from ._models_py3 import StaticSiteResetPropertiesARMResource - from ._models_py3 import StaticSiteUserARMResource - from ._models_py3 import StaticSiteUserInvitationRequestResource - from ._models_py3 import StaticSiteUserInvitationResponseResource - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import StorageMigrationOptions - from ._models_py3 import StorageMigrationResponse - from ._models_py3 import StringDictionary - from ._models_py3 import SwiftVirtualNetwork - from ._models_py3 import TldLegalAgreement - from ._models_py3 import TopLevelDomain - from ._models_py3 import TopLevelDomainAgreementOption - from ._models_py3 import TriggeredJobHistory - from ._models_py3 import TriggeredJobRun - from ._models_py3 import TriggeredWebJob - from ._models_py3 import Usage - 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 WebJob - from ._models_py3 import WebSiteInstanceStatus - from ._models_py3 import WorkerPool - from ._models_py3 import WorkerPoolResource -except (SyntaxError, ImportError): - from ._models import AbnormalTimePeriod - from ._models import Address - from ._models import AddressResponse - from ._models import AnalysisData - from ._models import AnalysisDefinition - from ._models import ApiDefinitionInfo - from ._models import ApiKVReference - from ._models import ApiManagementConfig - from ._models import ApplicationLogsConfig - from ._models import ApplicationStack - from ._models import ApplicationStackResource - from ._models import AppServiceCertificate - from ._models import AppServiceCertificateOrder - from ._models import AppServiceCertificateOrderPatchResource - from ._models import AppServiceCertificatePatchResource - from ._models import AppServiceCertificateResource - from ._models import AppServiceEnvironment - from ._models import AppServiceEnvironmentPatchResource - from ._models import AppServiceEnvironmentResource - from ._models import AppServicePlan - from ._models import AppServicePlanPatchResource - from ._models import ArmIdWrapper - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import AzureBlobStorageApplicationLogsConfig - from ._models import AzureBlobStorageHttpLogsConfig - from ._models import AzureStorageInfoValue - from ._models import AzureStoragePropertyDictionaryResource - from ._models import AzureTableStorageApplicationLogsConfig - from ._models import BackupItem - from ._models import BackupRequest - from ._models import BackupSchedule - from ._models import BillingMeter - from ._models import Capability - from ._models import Certificate - from ._models import CertificateDetails - from ._models import CertificateEmail - from ._models import CertificateOrderAction - from ._models import CertificatePatchResource - from ._models import CloningInfo - from ._models import ConnectionStringDictionary - from ._models import ConnStringInfo - from ._models import ConnStringValueTypePair - from ._models import Contact - from ._models import ContainerCpuStatistics - from ._models import ContainerCpuUsage - from ._models import ContainerInfo - from ._models import ContainerMemoryStatistics - from ._models import ContainerNetworkInterfaceStatistics - from ._models import ContainerThrottlingData - from ._models import ContinuousWebJob - from ._models import CorsSettings - from ._models import CsmCopySlotEntity - from ._models import CsmMoveResourceEnvelope - from ._models import CsmOperationDescription - from ._models import CsmOperationDescriptionProperties - from ._models import CsmOperationDisplay - from ._models import CsmPublishingCredentialsPoliciesCollection - from ._models import CsmPublishingCredentialsPoliciesEntity - from ._models import CsmPublishingProfileOptions - from ._models import CsmSlotEntity - from ._models import CsmUsageQuota - from ._models import CustomHostnameAnalysisResult - from ._models import DatabaseBackupSetting - from ._models import DataSource - from ._models import DataTableResponseColumn - from ._models import DataTableResponseObject - from ._models import DefaultErrorResponse, DefaultErrorResponseException - from ._models import DefaultErrorResponseError - from ._models import DefaultErrorResponseErrorDetailsItem - from ._models import DeletedAppRestoreRequest - from ._models import DeletedSite - from ._models import Deployment - from ._models import DeploymentLocations - from ._models import DetectorAbnormalTimePeriod - from ._models import DetectorDefinition - from ._models import DetectorInfo - from ._models import DetectorResponse - from ._models import DiagnosticAnalysis - from ._models import DiagnosticCategory - from ._models import DiagnosticData - from ._models import DiagnosticDetectorResponse - from ._models import DiagnosticMetricSample - from ._models import DiagnosticMetricSet - from ._models import Dimension - from ._models import Domain - from ._models import DomainAvailabilityCheckResult - from ._models import DomainControlCenterSsoRequest - from ._models import DomainOwnershipIdentifier - from ._models import DomainPatchResource - from ._models import DomainPurchaseConsent - from ._models import DomainRecommendationSearchParameters - from ._models import EnabledConfig - from ._models import EndpointDependency - from ._models import EndpointDetail - from ._models import ErrorEntity - from ._models import Experiments - from ._models import FileSystemApplicationLogsConfig - from ._models import FileSystemHttpLogsConfig - from ._models import FunctionEnvelope - from ._models import FunctionSecrets - from ._models import GeoRegion - from ._models import GlobalCsmSkuDescription - from ._models import HandlerMapping - from ._models import HostingEnvironmentDeploymentInfo - from ._models import HostingEnvironmentDiagnostics - from ._models import HostingEnvironmentProfile - from ._models import HostKeys - from ._models import HostName - from ._models import HostNameBinding - from ._models import HostNameSslState - from ._models import HttpLogsConfig - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import HybridConnectionLimits - from ._models import Identifier - from ._models import InboundEnvironmentEndpoint - from ._models import IpSecurityRestriction - from ._models import KeyInfo - from ._models import KeyVaultReferenceCollection - from ._models import KeyVaultReferenceResource - from ._models import LocalizableString - from ._models import LogSpecification - from ._models import ManagedServiceIdentity - from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models import MetricAvailability - from ._models import MetricSpecification - from ._models import MigrateMySqlRequest - from ._models import MigrateMySqlStatus - from ._models import MSDeploy - from ._models import MSDeployLog - from ._models import MSDeployLogEntry - from ._models import MSDeployStatus - from ._models import NameIdentifier - from ._models import NameValuePair - from ._models import NetworkAccessControlEntry - from ._models import NetworkFeatures - from ._models import NetworkTrace - from ._models import Operation - from ._models import OutboundEnvironmentEndpoint - from ._models import PerfMonResponse - from ._models import PerfMonSample - from ._models import PerfMonSet - from ._models import PremierAddOn - from ._models import PremierAddOnOffer - from ._models import PremierAddOnPatchResource - from ._models import PrivateAccess - from ._models import PrivateAccessSubnet - from ._models import PrivateAccessVirtualNetwork - from ._models import PrivateEndpointConnectionResource - from ._models import PrivateLinkConnectionApprovalRequestResource - from ._models import PrivateLinkConnectionState - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourceProperties - from ._models import PrivateLinkResourcesWrapper - from ._models import ProcessInfo - from ._models import ProcessModuleInfo - from ._models import ProcessThreadInfo - from ._models import ProxyOnlyResource - from ._models import PublicCertificate - from ._models import PushSettings - from ._models import RampUpRule - from ._models import Recommendation - from ._models import RecommendationRule - from ._models import ReissueCertificateOrderRequest - from ._models import RelayServiceConnectionEntity - from ._models import Rendering - from ._models import RenewCertificateOrderRequest - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceHealthMetadata - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceNameAvailability - from ._models import ResourceNameAvailabilityRequest - from ._models import ResponseMetaData - from ._models import RestoreRequest - from ._models import ServiceSpecification - from ._models import Site - from ._models import SiteAuthSettings - from ._models import SiteCloneability - from ._models import SiteCloneabilityCriterion - from ._models import SiteConfig - from ._models import SiteConfigResource - from ._models import SiteConfigurationSnapshotInfo - from ._models import SiteExtensionInfo - from ._models import SiteInstance - from ._models import SiteLimits - from ._models import SiteLogsConfig - from ._models import SiteMachineKey - from ._models import SitePatchResource - from ._models import SitePhpErrorLogFlag - from ._models import SiteSeal - from ._models import SiteSealRequest - from ._models import SiteSourceControl - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SkuInfo - from ._models import SkuInfos - from ._models import SlotConfigNamesResource - from ._models import SlotDifference - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import Snapshot - from ._models import SnapshotRecoverySource - from ._models import SnapshotRestoreRequest - from ._models import Solution - from ._models import SourceControl - from ._models import StackMajorVersion - from ._models import StackMinorVersion - from ._models import StampCapacity - from ._models import StaticSiteARMResource - from ._models import StaticSiteBuildARMResource - from ._models import StaticSiteBuildProperties - from ._models import StaticSiteCustomDomainOverviewARMResource - from ._models import StaticSiteFunctionOverviewARMResource - from ._models import StaticSitePatchResource - from ._models import StaticSiteResetPropertiesARMResource - from ._models import StaticSiteUserARMResource - from ._models import StaticSiteUserInvitationRequestResource - from ._models import StaticSiteUserInvitationResponseResource - from ._models import StatusCodesBasedTrigger - from ._models import StorageMigrationOptions - from ._models import StorageMigrationResponse - from ._models import StringDictionary - from ._models import SwiftVirtualNetwork - from ._models import TldLegalAgreement - from ._models import TopLevelDomain - from ._models import TopLevelDomainAgreementOption - from ._models import TriggeredJobHistory - from ._models import TriggeredJobRun - from ._models import TriggeredWebJob - from ._models import Usage - from ._models import User - from ._models import ValidateRequest - from ._models import ValidateResponse - from ._models import ValidateResponseError - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VirtualIPMapping - from ._models import VirtualNetworkProfile - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetParameters - from ._models import VnetRoute - from ._models import VnetValidationFailureDetails - from ._models import VnetValidationTestFailure - from ._models import WebAppCollection - from ._models import WebJob - from ._models import WebSiteInstanceStatus - from ._models import WorkerPool - from ._models import WorkerPoolResource -from ._paged_models import AnalysisDefinitionPaged -from ._paged_models import ApplicationStackResourcePaged -from ._paged_models import AppServiceCertificateOrderPaged -from ._paged_models import AppServiceCertificateResourcePaged -from ._paged_models import AppServiceEnvironmentResourcePaged -from ._paged_models import AppServicePlanPaged -from ._paged_models import BackupItemPaged -from ._paged_models import BillingMeterPaged -from ._paged_models import CertificatePaged -from ._paged_models import ContinuousWebJobPaged -from ._paged_models import CsmOperationDescriptionPaged -from ._paged_models import CsmUsageQuotaPaged -from ._paged_models import DeletedSitePaged -from ._paged_models import DeploymentPaged -from ._paged_models import DetectorDefinitionPaged -from ._paged_models import DetectorResponsePaged -from ._paged_models import DiagnosticCategoryPaged -from ._paged_models import DomainOwnershipIdentifierPaged -from ._paged_models import DomainPaged -from ._paged_models import FunctionEnvelopePaged -from ._paged_models import GeoRegionPaged -from ._paged_models import HostNameBindingPaged -from ._paged_models import HybridConnectionPaged -from ._paged_models import IdentifierPaged -from ._paged_models import InboundEnvironmentEndpointPaged -from ._paged_models import NameIdentifierPaged -from ._paged_models import OutboundEnvironmentEndpointPaged -from ._paged_models import PerfMonResponsePaged -from ._paged_models import PremierAddOnOfferPaged -from ._paged_models import ProcessInfoPaged -from ._paged_models import ProcessModuleInfoPaged -from ._paged_models import ProcessThreadInfoPaged -from ._paged_models import PublicCertificatePaged -from ._paged_models import RecommendationPaged -from ._paged_models import ResourceHealthMetadataPaged -from ._paged_models import ResourceMetricDefinitionPaged -from ._paged_models import SiteConfigResourcePaged -from ._paged_models import SiteConfigurationSnapshotInfoPaged -from ._paged_models import SiteExtensionInfoPaged -from ._paged_models import SiteInstancePaged -from ._paged_models import SitePaged -from ._paged_models import SkuInfoPaged -from ._paged_models import SlotDifferencePaged -from ._paged_models import SnapshotPaged -from ._paged_models import SourceControlPaged -from ._paged_models import StampCapacityPaged -from ._paged_models import StaticSiteARMResourcePaged -from ._paged_models import StaticSiteBuildARMResourcePaged -from ._paged_models import StaticSiteCustomDomainOverviewARMResourcePaged -from ._paged_models import StaticSiteFunctionOverviewARMResourcePaged -from ._paged_models import StaticSiteUserARMResourcePaged -from ._paged_models import StrPaged -from ._paged_models import TldLegalAgreementPaged -from ._paged_models import TopLevelDomainPaged -from ._paged_models import TriggeredJobHistoryPaged -from ._paged_models import TriggeredWebJobPaged -from ._paged_models import UsagePaged -from ._paged_models import WebJobPaged -from ._paged_models import WorkerPoolResourcePaged -from ._web_site_management_client_enums import ( - KeyVaultSecretStatus, - CertificateProductType, - ProvisioningState, - CertificateOrderStatus, - CertificateOrderActionType, - RouteType, - ManagedServiceIdentityType, - IpFilterTag, - AutoHealActionType, - ConnectionStringType, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - FtpsState, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - RedundancyMode, - StatusOptions, - DomainStatus, - AzureResourceType, - CustomHostNameDnsRecordType, - HostNameType, - DnsType, - DomainType, - HostingEnvironmentStatus, - InternalLoadBalancingMode, - ComputeModeOptions, - WorkerSizeOptions, - AccessControlEntryAction, - OperationStatus, - IssueType, - SolutionType, - RenderingType, - ResourceScopeType, - NotificationLevel, - Channels, - AppServicePlanRestrictions, - InAvailabilityReasonType, - CheckNameResourceTypes, - ValidateResourceTypes, - ResolveStatus, - ConfigReferenceSource, - ConfigReferenceLocation, - LogLevel, - AzureStorageType, - AzureStorageState, - BackupItemStatus, - DatabaseType, - FrequencyUnit, - ContinuousWebJobStatus, - WebJobType, - PublishingProfileFormat, - DnsVerificationTestResult, - MSDeployLogEntryType, - MSDeployProvisioningState, - MySqlMigrationType, - PublicCertificateLocation, - BackupRestoreOperationType, - UnauthenticatedClientAction, - BuiltInAuthenticationProvider, - CloneAbilityResult, - SiteExtensionType, - TriggeredWebJobStatus, - SiteRuntimeState, - BuildStatus, - TriggerTypes, - SkuName, -) - -__all__ = [ - 'AbnormalTimePeriod', - 'Address', - 'AddressResponse', - 'AnalysisData', - 'AnalysisDefinition', - 'ApiDefinitionInfo', - 'ApiKVReference', - 'ApiManagementConfig', - 'ApplicationLogsConfig', - 'ApplicationStack', - 'ApplicationStackResource', - 'AppServiceCertificate', - 'AppServiceCertificateOrder', - 'AppServiceCertificateOrderPatchResource', - 'AppServiceCertificatePatchResource', - 'AppServiceCertificateResource', - 'AppServiceEnvironment', - 'AppServiceEnvironmentPatchResource', - 'AppServiceEnvironmentResource', - 'AppServicePlan', - 'AppServicePlanPatchResource', - 'ArmIdWrapper', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'AzureBlobStorageApplicationLogsConfig', - 'AzureBlobStorageHttpLogsConfig', - 'AzureStorageInfoValue', - 'AzureStoragePropertyDictionaryResource', - 'AzureTableStorageApplicationLogsConfig', - 'BackupItem', - 'BackupRequest', - 'BackupSchedule', - 'BillingMeter', - 'Capability', - 'Certificate', - 'CertificateDetails', - 'CertificateEmail', - 'CertificateOrderAction', - 'CertificatePatchResource', - 'CloningInfo', - 'ConnectionStringDictionary', - 'ConnStringInfo', - 'ConnStringValueTypePair', - 'Contact', - 'ContainerCpuStatistics', - 'ContainerCpuUsage', - 'ContainerInfo', - 'ContainerMemoryStatistics', - 'ContainerNetworkInterfaceStatistics', - 'ContainerThrottlingData', - 'ContinuousWebJob', - 'CorsSettings', - 'CsmCopySlotEntity', - 'CsmMoveResourceEnvelope', - 'CsmOperationDescription', - 'CsmOperationDescriptionProperties', - 'CsmOperationDisplay', - 'CsmPublishingCredentialsPoliciesCollection', - 'CsmPublishingCredentialsPoliciesEntity', - 'CsmPublishingProfileOptions', - 'CsmSlotEntity', - 'CsmUsageQuota', - 'CustomHostnameAnalysisResult', - 'DatabaseBackupSetting', - 'DataSource', - 'DataTableResponseColumn', - 'DataTableResponseObject', - 'DefaultErrorResponse', 'DefaultErrorResponseException', - 'DefaultErrorResponseError', - 'DefaultErrorResponseErrorDetailsItem', - 'DeletedAppRestoreRequest', - 'DeletedSite', - 'Deployment', - 'DeploymentLocations', - 'DetectorAbnormalTimePeriod', - 'DetectorDefinition', - 'DetectorInfo', - 'DetectorResponse', - 'DiagnosticAnalysis', - 'DiagnosticCategory', - 'DiagnosticData', - 'DiagnosticDetectorResponse', - 'DiagnosticMetricSample', - 'DiagnosticMetricSet', - 'Dimension', - 'Domain', - 'DomainAvailabilityCheckResult', - 'DomainControlCenterSsoRequest', - 'DomainOwnershipIdentifier', - 'DomainPatchResource', - 'DomainPurchaseConsent', - 'DomainRecommendationSearchParameters', - 'EnabledConfig', - 'EndpointDependency', - 'EndpointDetail', - 'ErrorEntity', - 'Experiments', - 'FileSystemApplicationLogsConfig', - 'FileSystemHttpLogsConfig', - 'FunctionEnvelope', - 'FunctionSecrets', - 'GeoRegion', - 'GlobalCsmSkuDescription', - 'HandlerMapping', - 'HostingEnvironmentDeploymentInfo', - 'HostingEnvironmentDiagnostics', - 'HostingEnvironmentProfile', - 'HostKeys', - 'HostName', - 'HostNameBinding', - 'HostNameSslState', - 'HttpLogsConfig', - 'HybridConnection', - 'HybridConnectionKey', - 'HybridConnectionLimits', - 'Identifier', - 'InboundEnvironmentEndpoint', - 'IpSecurityRestriction', - 'KeyInfo', - 'KeyVaultReferenceCollection', - 'KeyVaultReferenceResource', - 'LocalizableString', - 'LogSpecification', - 'ManagedServiceIdentity', - 'ManagedServiceIdentityUserAssignedIdentitiesValue', - 'MetricAvailability', - 'MetricSpecification', - 'MigrateMySqlRequest', - 'MigrateMySqlStatus', - 'MSDeploy', - 'MSDeployLog', - 'MSDeployLogEntry', - 'MSDeployStatus', - 'NameIdentifier', - 'NameValuePair', - 'NetworkAccessControlEntry', - 'NetworkFeatures', - 'NetworkTrace', - 'Operation', - 'OutboundEnvironmentEndpoint', - 'PerfMonResponse', - 'PerfMonSample', - 'PerfMonSet', - 'PremierAddOn', - 'PremierAddOnOffer', - 'PremierAddOnPatchResource', - 'PrivateAccess', - 'PrivateAccessSubnet', - 'PrivateAccessVirtualNetwork', - 'PrivateEndpointConnectionResource', - 'PrivateLinkConnectionApprovalRequestResource', - 'PrivateLinkConnectionState', - 'PrivateLinkResource', - 'PrivateLinkResourceProperties', - 'PrivateLinkResourcesWrapper', - 'ProcessInfo', - 'ProcessModuleInfo', - 'ProcessThreadInfo', - 'ProxyOnlyResource', - 'PublicCertificate', - 'PushSettings', - 'RampUpRule', - 'Recommendation', - 'RecommendationRule', - 'ReissueCertificateOrderRequest', - 'RelayServiceConnectionEntity', - 'Rendering', - 'RenewCertificateOrderRequest', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceHealthMetadata', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceNameAvailability', - 'ResourceNameAvailabilityRequest', - 'ResponseMetaData', - 'RestoreRequest', - 'ServiceSpecification', - 'Site', - 'SiteAuthSettings', - 'SiteCloneability', - 'SiteCloneabilityCriterion', - 'SiteConfig', - 'SiteConfigResource', - 'SiteConfigurationSnapshotInfo', - 'SiteExtensionInfo', - 'SiteInstance', - 'SiteLimits', - 'SiteLogsConfig', - 'SiteMachineKey', - 'SitePatchResource', - 'SitePhpErrorLogFlag', - 'SiteSeal', - 'SiteSealRequest', - 'SiteSourceControl', - 'SkuCapacity', - 'SkuDescription', - 'SkuInfo', - 'SkuInfos', - 'SlotConfigNamesResource', - 'SlotDifference', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'Snapshot', - 'SnapshotRecoverySource', - 'SnapshotRestoreRequest', - 'Solution', - 'SourceControl', - 'StackMajorVersion', - 'StackMinorVersion', - 'StampCapacity', - 'StaticSiteARMResource', - 'StaticSiteBuildARMResource', - 'StaticSiteBuildProperties', - 'StaticSiteCustomDomainOverviewARMResource', - 'StaticSiteFunctionOverviewARMResource', - 'StaticSitePatchResource', - 'StaticSiteResetPropertiesARMResource', - 'StaticSiteUserARMResource', - 'StaticSiteUserInvitationRequestResource', - 'StaticSiteUserInvitationResponseResource', - 'StatusCodesBasedTrigger', - 'StorageMigrationOptions', - 'StorageMigrationResponse', - 'StringDictionary', - 'SwiftVirtualNetwork', - 'TldLegalAgreement', - 'TopLevelDomain', - 'TopLevelDomainAgreementOption', - 'TriggeredJobHistory', - 'TriggeredJobRun', - 'TriggeredWebJob', - 'Usage', - 'User', - 'ValidateRequest', - 'ValidateResponse', - 'ValidateResponseError', - 'VirtualApplication', - 'VirtualDirectory', - 'VirtualIPMapping', - 'VirtualNetworkProfile', - 'VnetGateway', - 'VnetInfo', - 'VnetParameters', - 'VnetRoute', - 'VnetValidationFailureDetails', - 'VnetValidationTestFailure', - 'WebAppCollection', - 'WebJob', - 'WebSiteInstanceStatus', - 'WorkerPool', - 'WorkerPoolResource', - 'AppServiceCertificateOrderPaged', - 'AppServiceCertificateResourcePaged', - 'CsmOperationDescriptionPaged', - 'DomainPaged', - 'NameIdentifierPaged', - 'DomainOwnershipIdentifierPaged', - 'TopLevelDomainPaged', - 'TldLegalAgreementPaged', - 'CertificatePaged', - 'DeletedSitePaged', - 'DetectorResponsePaged', - 'DiagnosticCategoryPaged', - 'AnalysisDefinitionPaged', - 'DetectorDefinitionPaged', - 'ApplicationStackResourcePaged', - 'RecommendationPaged', - 'SourceControlPaged', - 'BillingMeterPaged', - 'GeoRegionPaged', - 'IdentifierPaged', - 'PremierAddOnOfferPaged', - 'SitePaged', - 'BackupItemPaged', - 'SiteConfigResourcePaged', - 'SiteConfigurationSnapshotInfoPaged', - 'ContinuousWebJobPaged', - 'DeploymentPaged', - 'FunctionEnvelopePaged', - 'HostNameBindingPaged', - 'SiteInstancePaged', - 'ProcessInfoPaged', - 'ProcessModuleInfoPaged', - 'ProcessThreadInfoPaged', - 'PerfMonResponsePaged', - 'PublicCertificatePaged', - 'SiteExtensionInfoPaged', - 'SlotDifferencePaged', - 'SnapshotPaged', - 'TriggeredWebJobPaged', - 'TriggeredJobHistoryPaged', - 'CsmUsageQuotaPaged', - 'WebJobPaged', - 'StaticSiteARMResourcePaged', - 'StaticSiteUserARMResourcePaged', - 'StaticSiteBuildARMResourcePaged', - 'StaticSiteFunctionOverviewARMResourcePaged', - 'StaticSiteCustomDomainOverviewARMResourcePaged', - 'AppServiceEnvironmentResourcePaged', - 'StampCapacityPaged', - 'InboundEnvironmentEndpointPaged', - 'WorkerPoolResourcePaged', - 'ResourceMetricDefinitionPaged', - 'SkuInfoPaged', - 'UsagePaged', - 'OutboundEnvironmentEndpointPaged', - 'AppServicePlanPaged', - 'StrPaged', - 'HybridConnectionPaged', - 'ResourceHealthMetadataPaged', - 'KeyVaultSecretStatus', - 'CertificateProductType', - 'ProvisioningState', - 'CertificateOrderStatus', - 'CertificateOrderActionType', - 'RouteType', - 'ManagedServiceIdentityType', - 'IpFilterTag', - 'AutoHealActionType', - 'ConnectionStringType', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'FtpsState', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'RedundancyMode', - 'StatusOptions', - 'DomainStatus', - 'AzureResourceType', - 'CustomHostNameDnsRecordType', - 'HostNameType', - 'DnsType', - 'DomainType', - 'HostingEnvironmentStatus', - 'InternalLoadBalancingMode', - 'ComputeModeOptions', - 'WorkerSizeOptions', - 'AccessControlEntryAction', - 'OperationStatus', - 'IssueType', - 'SolutionType', - 'RenderingType', - 'ResourceScopeType', - 'NotificationLevel', - 'Channels', - 'AppServicePlanRestrictions', - 'InAvailabilityReasonType', - 'CheckNameResourceTypes', - 'ValidateResourceTypes', - 'ResolveStatus', - 'ConfigReferenceSource', - 'ConfigReferenceLocation', - 'LogLevel', - 'AzureStorageType', - 'AzureStorageState', - 'BackupItemStatus', - 'DatabaseType', - 'FrequencyUnit', - 'ContinuousWebJobStatus', - 'WebJobType', - 'PublishingProfileFormat', - 'DnsVerificationTestResult', - 'MSDeployLogEntryType', - 'MSDeployProvisioningState', - 'MySqlMigrationType', - 'PublicCertificateLocation', - 'BackupRestoreOperationType', - 'UnauthenticatedClientAction', - 'BuiltInAuthenticationProvider', - 'CloneAbilityResult', - 'SiteExtensionType', - 'TriggeredWebJobStatus', - 'SiteRuntimeState', - 'BuildStatus', - 'TriggerTypes', - 'SkuName', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py deleted file mode 100644 index 0753750ec14..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models.py +++ /dev/null @@ -1,13462 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2019_08_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2019_08_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(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.get('address1', None) - self.address2 = kwargs.get('address2', None) - self.city = kwargs.get('city', None) - self.country = kwargs.get('country', None) - self.postal_code = kwargs.get('postal_code', None) - self.state = kwargs.get('state', None) - - -class ProxyOnlyResource(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.v2019_08_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 AnalysisData(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.v2019_08_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2019_08_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2019_08_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(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(Model): - """Description of site key vault references. - - :param reference: - :type reference: str - :param status: Possible values include: 'Initialized', 'Resolved', - 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', - 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons' - :type status: str or ~azure.mgmt.web.v2019_08_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: Possible values include: 'SystemAssigned', - 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type identity_type: str or - ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType - :param details: - :type details: str - :param source: Possible values include: 'KeyVault' - :type source: str or - ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceSource - :param location: Possible values include: 'ApplicationSetting' - :type location: str or - ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceLocation - """ - - _attribute_map = { - 'reference': {'key': 'reference', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ResolveStatus'}, - 'vault_name': {'key': 'vaultName', 'type': 'str'}, - 'secret_name': {'key': 'secretName', 'type': 'str'}, - 'secret_version': {'key': 'secretVersion', 'type': 'str'}, - 'identity_type': {'key': 'identityType', 'type': 'ManagedServiceIdentityType'}, - 'details': {'key': 'details', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'ConfigReferenceSource'}, - 'location': {'key': 'location', 'type': 'ConfigReferenceLocation'}, - } - - 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.source = kwargs.get('source', None) - self.location = kwargs.get('location', None) - - -class ApiManagementConfig(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 ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2019_08_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2019_08_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2019_08_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(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.v2019_08_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2019_08_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]'}, - } - - 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) - - -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 application_stack_resource_name: Application stack name. - :type application_stack_resource_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.v2019_08_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2019_08_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'}, - 'application_stack_resource_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]'}, - } - - def __init__(self, **kwargs): - super(ApplicationStackResource, self).__init__(**kwargs) - self.application_stack_resource_name = kwargs.get('application_stack_resource_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) - - -class AppServiceCertificate(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.v2019_08_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': 'KeyVaultSecretStatus'}, - } - - 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 Resource(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: 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.get('location', None) - 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: Resource tags. - :type tags: dict[str, str] - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2019_08_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2019_08_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2019_08_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.v2019_08_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2019_08_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2019_08_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2019_08_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2019_08_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.v2019_08_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2019_08_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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.v2019_08_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': 'KeyVaultSecretStatus'}, - } - - 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: 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.v2019_08_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': 'KeyVaultSecretStatus'}, - } - - 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(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2019_08_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, - 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2019_08_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) - self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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: Resource tags. - :type tags: dict[str, str] - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2019_08_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentResource, self).__init__(**kwargs) - self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) - self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) - - -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: Resource tags. - :type tags: dict[str, 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.v2019_08_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.v2019_08_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2019_08_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription - """ - - _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}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, 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.sku = kwargs.get('sku', 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.v2019_08_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.v2019_08_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: This needs to set to true when creating a - Linux App Service Plan, along with kind set to - Linux. It should be false otherwise. Default - value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2019_08_01.models.ProvisioningState - """ - - _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': 'StatusOptions'}, - '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': 'ProvisioningState'}, - } - - 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 - - -class ArmIdWrapper(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 AutoHealActions(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.v2019_08_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2019_08_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': 'AutoHealActionType'}, - '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(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(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.v2019_08_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2019_08_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2019_08_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', None) - - -class AzureBlobStorageApplicationLogsConfig(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.v2019_08_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': 'LogLevel'}, - '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(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 AzureStorageInfoValue(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.v2019_08_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' - :vartype state: str or - ~azure.mgmt.web.v2019_08_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - 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.v2019_08_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(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.v2019_08_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': 'LogLevel'}, - '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.get('sas_url', None) - - -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 backup_item_name: Name of this backup. - :vartype backup_item_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.v2019_08_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 - :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.v2019_08_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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.backup_item_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 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. - - 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 - :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: Required. 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.v2019_08_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2019_08_01.models.DatabaseBackupSetting] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account_url': {'required': 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(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). Default value: 7 . - :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.v2019_08_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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 - """ - - _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'}, - } - - 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) - - -class Capability(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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2019_08_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.v2019_08_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', '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) - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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 - """ - - _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.v2019_08_01.models.CertificateOrderActionType - :ivar created_at: Time at which the certificate action was performed. - :vartype created_at: 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': 'CertificateOrderActionType'}, - '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 CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2019_08_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.v2019_08_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', '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) - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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.get('source_web_app_id', None) - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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.v2019_08_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(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.v2019_08_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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(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.v2019_08_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, **kwargs): - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) - - -class Contact(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.v2019_08_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.get('email', None) - self.fax = kwargs.get('fax', None) - self.job_title = kwargs.get('job_title', None) - self.name_first = kwargs.get('name_first', None) - self.name_last = kwargs.get('name_last', None) - self.name_middle = kwargs.get('name_middle', None) - self.organization = kwargs.get('organization', None) - self.phone = kwargs.get('phone', None) - - -class ContainerCpuStatistics(Model): - """ContainerCpuStatistics. - - :param cpu_usage: - :type cpu_usage: ~azure.mgmt.web.v2019_08_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.v2019_08_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(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(Model): - """ContainerInfo. - - :param current_time_stamp: - :type current_time_stamp: datetime - :param previous_time_stamp: - :type previous_time_stamp: datetime - :param current_cpu_stats: - :type current_cpu_stats: - ~azure.mgmt.web.v2019_08_01.models.ContainerCpuStatistics - :param previous_cpu_stats: - :type previous_cpu_stats: - ~azure.mgmt.web.v2019_08_01.models.ContainerCpuStatistics - :param memory_stats: - :type memory_stats: - ~azure.mgmt.web.v2019_08_01.models.ContainerMemoryStatistics - :param name: - :type name: str - :param id: - :type id: str - :param eth0: - :type eth0: - ~azure.mgmt.web.v2019_08_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(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(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(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.v2019_08_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.v2019_08_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': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - '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 CorsSettings(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 CsmCopySlotEntity(Model): - """Copy deployment slot parameters. - - All required parameters must be populated in order to send to Azure. - - :param target_slot: Required. Destination deployment slot during copy - operation. - :type target_slot: str - :param site_config: Required. The site object which will be merged with - the source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2019_08_01.models.SiteConfig - """ - - _validation = { - 'target_slot': {'required': True}, - 'site_config': {'required': True}, - } - - _attribute_map = { - 'target_slot': {'key': 'targetSlot', 'type': 'str'}, - 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, - } - - def __init__(self, **kwargs): - super(CsmCopySlotEntity, self).__init__(**kwargs) - self.target_slot = kwargs.get('target_slot', None) - self.site_config = kwargs.get('site_config', None) - - -class CsmMoveResourceEnvelope(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 CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2019_08_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2019_08_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(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2019_08_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(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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param ftp: Required. Whether FTP is allowed. - :type ftp: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity - :param scm: Required. Whether Scm Basic Auth is allowed. - :type scm: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ftp': {'required': True}, - 'scm': {'required': 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param allow: Required. true to allow access to a publishing - method; otherwise, false. - :type allow: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allow': {'required': 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(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.v2019_08_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(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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.get('target_slot', None) - self.preserve_vnet = kwargs.get('preserve_vnet', None) - - -class CsmUsageQuota(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 - :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.v2019_08_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 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: true if hostname is - already verified; otherwise, 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.v2019_08_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.v2019_08_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_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_cname_records = kwargs.get('alternate_cname_records', None) - self.alternate_txt_records = kwargs.get('alternate_txt_records', None) - - -class DatabaseBackupSetting(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.v2019_08_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.get('database_type', None) - 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 DataSource(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.v2019_08_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(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(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.v2019_08_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(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.v2019_08_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 DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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.v2019_08_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(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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_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.deleted_site_kind = None - self.geo_region_name = 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 - :param end_time: End time. - :type end_time: 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 DeploymentLocations(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.v2019_08_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironment] - :param hosting_environment_deployment_infos: Available App Service - Environments with basic information. - :type hosting_environment_deployment_infos: - list[~azure.mgmt.web.v2019_08_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(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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.v2019_08_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.v2019_08_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2019_08_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': 'IssueType'}, - '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(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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.v2019_08_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2019_08_01.models.DiagnosticData] - """ - - _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]'}, - } - - def __init__(self, **kwargs): - super(DetectorResponse, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.dataset = kwargs.get('dataset', 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 - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2019_08_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2019_08_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.v2019_08_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 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 DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2019_08_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2019_08_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 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 - :param end_time: End time of the period - :type end_time: 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.v2019_08_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2019_08_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2019_08_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2019_08_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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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(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 - :param end_time: End time of the period - :type end_time: 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.v2019_08_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(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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2019_08_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.v2019_08_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.v2019_08_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2019_08_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2019_08_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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.v2019_08_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - 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 DomainControlCenterSsoRequest(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 DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2019_08_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.v2019_08_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.v2019_08_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2019_08_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2019_08_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(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 - 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 - """ - - _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(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(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(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.v2019_08_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(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(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.v2019_08_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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2019_08_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 FileSystemApplicationLogsConfig(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2019_08_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, **kwargs): - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = kwargs.get('level', "Off") - - -class FileSystemHttpLogsConfig(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 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 FunctionSecrets(ProxyOnlyResource): - """Function secrets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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: Secret key. - :type key: str - :param trigger_url: Trigger URL. - :type trigger_url: 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'}, - 'key': {'key': 'properties.key', 'type': 'str'}, - 'trigger_url': {'key': 'properties.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 GlobalCsmSkuDescription(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.v2019_08_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.v2019_08_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 HandlerMapping(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(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(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(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(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(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.v2019_08_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.v2019_08_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.v2019_08_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - 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.v2019_08_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.v2019_08_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2019_08_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2019_08_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - '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 HostNameSslState(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.v2019_08_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 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.v2019_08_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2019_08_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2019_08_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 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 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 InboundEnvironmentEndpoint(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 IpSecurityRestriction(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' - :type tag: str or ~azure.mgmt.web.v2019_08_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 - """ - - _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': 'IpFilterTag'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', '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) - - -class KeyInfo(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 KeyVaultReferenceCollection(ProxyOnlyResource): - """Web app key vault reference and status 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 key_to_reference_statuses: - :type key_to_reference_statuses: dict[str, - ~azure.mgmt.web.v2019_08_01.models.ApiKVReference] - """ - - _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_to_reference_statuses': {'key': 'properties.keyToReferenceStatuses', 'type': '{ApiKVReference}'}, - } - - def __init__(self, **kwargs): - super(KeyVaultReferenceCollection, self).__init__(**kwargs) - self.key_to_reference_statuses = kwargs.get('key_to_reference_statuses', None) - - -class KeyVaultReferenceResource(ProxyOnlyResource): - """Web app key vault reference and status 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 reference: - :type reference: str - :param status: Possible values include: 'Initialized', 'Resolved', - 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', - 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons' - :type status: str or ~azure.mgmt.web.v2019_08_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: Possible values include: 'SystemAssigned', - 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type identity_type: str or - ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType - :param details: - :type details: str - :param source: Possible values include: 'KeyVault' - :type source: str or - ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceSource - :param location: Possible values include: 'ApplicationSetting' - :type location: str or - ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceLocation - """ - - _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'}, - 'reference': {'key': 'properties.reference', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'ResolveStatus'}, - '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': 'ManagedServiceIdentityType'}, - 'details': {'key': 'properties.details', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'ConfigReferenceSource'}, - 'location': {'key': 'properties.location', 'type': 'ConfigReferenceLocation'}, - } - - def __init__(self, **kwargs): - super(KeyVaultReferenceResource, 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.source = kwargs.get('source', None) - self.location = kwargs.get('location', None) - - -class LocalizableString(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 LogSpecification(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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', '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) - - -class ManagedServiceIdentity(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.v2019_08_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.v2019_08_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailability(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(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.v2019_08_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2019_08_01.models.MetricAvailability] - :param supported_time_grain_types: - :type supported_time_grain_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]'}, - } - - 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) - - -class MigrateMySqlRequest(ProxyOnlyResource): - """MySQL migration request. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2019_08_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - 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.v2019_08_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': 'OperationStatus'}, - '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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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.v2019_08_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(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2019_08_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': 'MSDeployLogEntryType'}, - '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.v2019_08_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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(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 NameValuePair(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 NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2019_08_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = kwargs.get('action', None) - self.description = kwargs.get('description', None) - self.order = kwargs.get('order', None) - self.remote_subnet = kwargs.get('remote_subnet', 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.v2019_08_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2019_08_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(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 Operation(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.v2019_08_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2019_08_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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(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.v2019_08_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 PerfMonResponse(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.v2019_08_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(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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(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 - :param end_time: End time of the period. - :type end_time: 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.v2019_08_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: 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: true if promotion code is - required; otherwise, 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.v2019_08_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': 'AppServicePlanRestrictions'}, - '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 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.v2019_08_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(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(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.v2019_08_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 PrivateEndpointConnectionResource(ProxyOnlyResource): - """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.v2019_08_01.models.ArmIdWrapper - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2019_08_01.models.PrivateLinkConnectionState - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionResource, 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) - - -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: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2019_08_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(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(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.v2019_08_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.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.properties = kwargs.get('properties', None) - - -class PrivateLinkResourceProperties(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(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.v2019_08_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.get('value', None) - - -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.v2019_08_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.v2019_08_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 - :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 - :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 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 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 - :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 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.v2019_08_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': 'PublicCertificateLocation'}, - '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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - \\nMinReroutePercentage or - MaxReroutePercentage. Site metrics are checked every N - minutes specified in ChangeIntervalInMinutes.\\nCustom - decision algorithm - can be provided in TiPCallback site extension which URL can be specified - in 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 - :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.v2019_08_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.v2019_08_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.v2019_08_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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 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.v2019_08_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.v2019_08_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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 Rendering(Model): - """Instructions for rendering the data. - - :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', - 'TimeSeries', 'TimeSeriesPerInstance' - :type type: str or ~azure.mgmt.web.v2019_08_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': 'RenderingType'}, - '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(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 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 ResourceMetricAvailability(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.v2019_08_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 ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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.v2019_08_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(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.v2019_08_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.get('name', None) - self.type = kwargs.get('type', None) - self.is_fqdn = kwargs.get('is_fqdn', None) - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2019_08_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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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.v2019_08_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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.v2019_08_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - '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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2019_08_01.models.MetricSpecification] - :param log_specifications: - :type log_specifications: - list[~azure.mgmt.web.v2019_08_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: Resource tags. - :type tags: dict[str, str] - :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.v2019_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2019_08_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.v2019_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2019_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2019_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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 - :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.v2019_08_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: true if the app is a default - container; otherwise, 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.v2019_08_01.models.SlotSwapStatus - :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.v2019_08_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 identity: - :type identity: ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) - self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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.v2019_08_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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' - :type default_provider: str or - ~azure.mgmt.web.v2019_08_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_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 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_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]'}, - 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, - 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, - 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, - 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, - 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, - 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, - 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, - 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, - 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, - 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, - 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', '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.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_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.google_client_id = kwargs.get('google_client_id', None) - self.google_client_secret = kwargs.get('google_client_secret', None) - self.google_oauth_scopes = kwargs.get('google_oauth_scopes', None) - self.facebook_app_id = kwargs.get('facebook_app_id', None) - self.facebook_app_secret = kwargs.get('facebook_app_secret', None) - self.facebook_oauth_scopes = kwargs.get('facebook_oauth_scopes', None) - self.twitter_consumer_key = kwargs.get('twitter_consumer_key', None) - self.twitter_consumer_secret = kwargs.get('twitter_consumer_secret', 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_oauth_scopes = kwargs.get('microsoft_account_oauth_scopes', None) - - -class SiteCloneability(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.v2019_08_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2019_08_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - '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(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(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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, false. - :type http_logging_enabled: bool - :param acr_use_managed_identity_creds: Flag to use Managed Identity Creds - for ACR pull - :type acr_use_managed_identity_creds: bool - :param acr_user_managed_identity_id: If using user managed identity, the - user managed identity ClientId - :type acr_user_managed_identity_id: str - :param logs_directory_size_limit: HTTP logs directory size limit. - :type logs_directory_size_limit: int - :param detailed_error_logging_enabled: true if detailed error - logging is enabled; otherwise, 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.v2019_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2019_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2019_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2019_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2019_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2019_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2019_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2019_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2019_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2019_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2019_08_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2019_08_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2019_08_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2019_08_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. Default value: True . - :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.v2019_08_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.v2019_08_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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'}, - 'acr_use_managed_identity_creds': {'key': 'acrUseManagedIdentityCreds', 'type': 'bool'}, - 'acr_user_managed_identity_id': {'key': 'acrUserManagedIdentityID', 'type': 'str'}, - '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, - 'pre_warmed_instance_count': {'key': 'preWarmedInstanceCount', 'type': 'int'}, - 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, - } - - 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.acr_use_managed_identity_creds = kwargs.get('acr_use_managed_identity_creds', None) - self.acr_user_managed_identity_id = kwargs.get('acr_user_managed_identity_id', 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.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.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.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.ftps_state = kwargs.get('ftps_state', None) - self.pre_warmed_instance_count = kwargs.get('pre_warmed_instance_count', None) - self.health_check_path = kwargs.get('health_check_path', 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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, false. - :type http_logging_enabled: bool - :param acr_use_managed_identity_creds: Flag to use Managed Identity Creds - for ACR pull - :type acr_use_managed_identity_creds: bool - :param acr_user_managed_identity_id: If using user managed identity, the - user managed identity ClientId - :type acr_user_managed_identity_id: str - :param logs_directory_size_limit: HTTP logs directory size limit. - :type logs_directory_size_limit: int - :param detailed_error_logging_enabled: true if detailed error - logging is enabled; otherwise, 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.v2019_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2019_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2019_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2019_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2019_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2019_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2019_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2019_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2019_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2019_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2019_08_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2019_08_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2019_08_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2019_08_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. Default value: True . - :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.v2019_08_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.v2019_08_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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'}, - 'acr_use_managed_identity_creds': {'key': 'properties.acrUseManagedIdentityCreds', 'type': 'bool'}, - 'acr_user_managed_identity_id': {'key': 'properties.acrUserManagedIdentityID', 'type': 'str'}, - '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, - 'pre_warmed_instance_count': {'key': 'properties.preWarmedInstanceCount', 'type': 'int'}, - 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, - } - - 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.acr_use_managed_identity_creds = kwargs.get('acr_use_managed_identity_creds', None) - self.acr_user_managed_identity_id = kwargs.get('acr_user_managed_identity_id', 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.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.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.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.ftps_state = kwargs.get('ftps_state', None) - self.pre_warmed_instance_count = kwargs.get('pre_warmed_instance_count', None) - self.health_check_path = kwargs.get('health_check_path', 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 - :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 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.v2019_08_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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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': 'SiteExtensionType'}, - '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 SiteInstance(ProxyOnlyResource): - """Instance 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 site_instance_name: Name of instance. - :vartype site_instance_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'site_instance_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'}, - 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SiteInstance, self).__init__(**kwargs) - self.site_instance_name = None - - -class SiteLimits(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.v2019_08_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2019_08_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2019_08_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2019_08_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(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 - :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.v2019_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2019_08_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.v2019_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2019_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2019_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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 - :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.v2019_08_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: true if the app is a default - container; otherwise, 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.v2019_08_01.models.SlotSwapStatus - :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.v2019_08_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 identity: - :type identity: ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentity - """ - - _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'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(SitePatchResource, self).__init__(**kwargs) - 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_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) - self.host_names_disabled = kwargs.get('host_names_disabled', 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.identity = kwargs.get('identity', 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(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.get('html', None) - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, - 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, - 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, - } - - 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.deployment_rollback_enabled = kwargs.get('deployment_rollback_enabled', None) - self.is_mercurial = kwargs.get('is_mercurial', None) - - -class SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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.v2019_08_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.v2019_08_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(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.v2019_08_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2019_08_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 SkuInfos(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.v2019_08_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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.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 SnapshotRecoverySource(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. - - 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 - :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.v2019_08_01.models.SnapshotRecoverySource - :param overwrite: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': 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(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.v2019_08_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2019_08_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': 'SolutionType'}, - '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 - """ - - _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 StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2019_08_01.models.StackMinorVersion] - :param application_insights: true if this supports - Application Insights; otherwise, false. - :type application_insights: bool - :param is_preview: true if this stack is in Preview, - otherwise false. - :type is_preview: bool - :param is_deprecated: true if this stack has been deprecated, - otherwise false. - :type is_deprecated: bool - :param is_hidden: true if this stack should be hidden for new - customers on portal, otherwise 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'}, - '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.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(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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(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.v2019_08_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' - :type worker_size: str or - ~azure.mgmt.web.v2019_08_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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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 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: Resource tags. - :type tags: dict[str, 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 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.v2019_08_01.models.StaticSiteBuildProperties - :param sku: - :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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}'}, - 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(StaticSiteARMResource, self).__init__(**kwargs) - self.default_hostname = None - self.repository_url = kwargs.get('repository_url', None) - self.branch = kwargs.get('branch', None) - self.custom_domains = None - self.repository_token = kwargs.get('repository_token', None) - self.build_properties = kwargs.get('build_properties', None) - self.sku = kwargs.get('sku', 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 - :ivar last_updated_on: When this build was updated. - :vartype last_updated_on: 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.v2019_08_01.models.BuildStatus - """ - - _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}, - } - - _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'}, - } - - 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 - - -class StaticSiteBuildProperties(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: The path of the app artifacts after - building. - :type app_artifact_location: str - """ - - _attribute_map = { - 'app_location': {'key': 'appLocation', 'type': 'str'}, - 'api_location': {'key': 'apiLocation', 'type': 'str'}, - 'app_artifact_location': {'key': 'appArtifactLocation', '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) - - -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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_name': {'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'}, - 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, - 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StaticSiteCustomDomainOverviewARMResource, self).__init__(**kwargs) - self.domain_name = None - self.created_on = None - - -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.v2019_08_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 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 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.v2019_08_01.models.StaticSiteBuildProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - } - - 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.custom_domains = None - self.repository_token = kwargs.get('repository_token', None) - self.build_properties = kwargs.get('build_properties', 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 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 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 - :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 StatusCodesBasedTrigger(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 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'}, - '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.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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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 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(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.get('agreement_key', None) - self.title = kwargs.get('title', None) - self.content = kwargs.get('content', None) - self.url = kwargs.get('url', 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 true, then the top level domain supports - domain privacy; otherwise, 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(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - 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 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.v2019_08_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 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.v2019_08_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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': 'TriggeredWebJobStatus'}, - '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.v2019_08_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.v2019_08_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': 'WebJobType'}, - '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 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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2019_08_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': 'ComputeModeOptions'}, - '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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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(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' - :type type: str or - ~azure.mgmt.web.v2019_08_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: 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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ValidateRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.location = kwargs.get('location', None) - 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) - - -class ValidateResponse(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.v2019_08_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(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(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2019_08_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(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(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(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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.get('id', None) - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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.v2019_08_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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'}, - } - - 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) - - -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.v2019_08_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 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.v2019_08_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'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, **kwargs): - super(VnetValidationFailureDetails, self).__init__(**kwargs) - self.failed = kwargs.get('failed', None) - self.failed_tests = kwargs.get('failed_tests', 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(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.v2019_08_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.get('value', None) - 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.v2019_08_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': 'WebJobType'}, - '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 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.v2019_08_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 Diagnose and Solve Portal - :type console_url: str - :param containers: - :type containers: dict[str, - ~azure.mgmt.web.v2019_08_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': 'SiteRuntimeState'}, - 'status_url': {'key': 'properties.statusUrl', 'type': 'str'}, - 'detector_url': {'key': 'properties.detectorUrl', 'type': 'str'}, - 'console_url': {'key': 'properties.consoleUrl', '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.containers = kwargs.get('containers', None) - - -class WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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.v2019_08_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 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.v2019_08_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] - :param sku: - :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(WorkerPoolResource, self).__init__(**kwargs) - 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 - self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py deleted file mode 100644 index 9e6603a4202..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_models_py3.py +++ /dev/null @@ -1,13462 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2019_08_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2019_08_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: - super(AbnormalTimePeriod, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.events = events - self.solutions = solutions - - -class Address(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: str=None, **kwargs) -> None: - 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(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: str=None, **kwargs) -> None: - 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.v2019_08_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: str=None, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: - 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 AnalysisData(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.v2019_08_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2019_08_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2019_08_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) - self.description = None - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class ApiKVReference(Model): - """Description of site key vault references. - - :param reference: - :type reference: str - :param status: Possible values include: 'Initialized', 'Resolved', - 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', - 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons' - :type status: str or ~azure.mgmt.web.v2019_08_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: Possible values include: 'SystemAssigned', - 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type identity_type: str or - ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType - :param details: - :type details: str - :param source: Possible values include: 'KeyVault' - :type source: str or - ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceSource - :param location: Possible values include: 'ApplicationSetting' - :type location: str or - ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceLocation - """ - - _attribute_map = { - 'reference': {'key': 'reference', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'ResolveStatus'}, - 'vault_name': {'key': 'vaultName', 'type': 'str'}, - 'secret_name': {'key': 'secretName', 'type': 'str'}, - 'secret_version': {'key': 'secretVersion', 'type': 'str'}, - 'identity_type': {'key': 'identityType', 'type': 'ManagedServiceIdentityType'}, - 'details': {'key': 'details', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'ConfigReferenceSource'}, - 'location': {'key': 'location', 'type': 'ConfigReferenceLocation'}, - } - - def __init__(self, *, reference: str=None, status=None, vault_name: str=None, secret_name: str=None, secret_version: str=None, identity_type=None, details: str=None, source=None, location=None, **kwargs) -> None: - super(ApiKVReference, self).__init__(**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.source = source - self.location = location - - -class ApiManagementConfig(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: str=None, **kwargs) -> None: - super(ApiManagementConfig, self).__init__(**kwargs) - self.id = id - - -class ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2019_08_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2019_08_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2019_08_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: - 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(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.v2019_08_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2019_08_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]'}, - } - - def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: - super(ApplicationStack, self).__init__(**kwargs) - self.name = name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - - -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 application_stack_resource_name: Application stack name. - :type application_stack_resource_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.v2019_08_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2019_08_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'}, - 'application_stack_resource_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]'}, - } - - def __init__(self, *, kind: str=None, application_stack_resource_name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: - super(ApplicationStackResource, self).__init__(kind=kind, **kwargs) - self.application_stack_resource_name = application_stack_resource_name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - - -class AppServiceCertificate(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.v2019_08_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2019_08_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2019_08_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2019_08_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.v2019_08_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2019_08_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, location: str, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2019_08_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2019_08_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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.v2019_08_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.v2019_08_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2019_08_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 - - -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.v2019_08_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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: 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.v2019_08_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2019_08_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, - 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2019_08_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) - self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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.v2019_08_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.v2019_08_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2019_08_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' - :type internal_load_balancing_mode: str or - ~azure.mgmt.web.v2019_08_01.models.InternalLoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2019_08_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2019_08_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2019_08_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2019_08_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2019_08_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, - 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'InternalLoadBalancingMode'}, - 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, - 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_environment_resource_name = app_service_environment_resource_name - self.app_service_environment_resource_location = app_service_environment_resource_location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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: Resource tags. - :type tags: dict[str, 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.v2019_08_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.v2019_08_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2019_08_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription - """ - - _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}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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.sku = sku - - -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.v2019_08_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.v2019_08_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: This needs to set to true when creating a - Linux App Service Plan, along with kind set to - Linux. It should be false otherwise. Default - value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2019_08_01.models.ProvisioningState - """ - - _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': 'StatusOptions'}, - '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': 'ProvisioningState'}, - } - - def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: - 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 - - -class ArmIdWrapper(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) -> None: - super(ArmIdWrapper, self).__init__(**kwargs) - self.id = None - - -class AutoHealActions(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.v2019_08_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2019_08_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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.v2019_08_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2019_08_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2019_08_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -class AzureBlobStorageApplicationLogsConfig(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.v2019_08_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, - } - - def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: - super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - self.sas_url = sas_url - self.retention_in_days = retention_in_days - - -class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) - self.sas_url = sas_url - self.retention_in_days = retention_in_days - self.enabled = enabled - - -class AzureStorageInfoValue(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.v2019_08_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' - :vartype state: str or - ~azure.mgmt.web.v2019_08_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: - 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.v2019_08_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: str=None, properties=None, **kwargs) -> None: - super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class AzureTableStorageApplicationLogsConfig(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.v2019_08_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - } - - def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: - 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 backup_item_name: Name of this backup. - :vartype backup_item_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.v2019_08_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 - :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.v2019_08_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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: str=None, **kwargs) -> None: - super(BackupItem, self).__init__(kind=kind, **kwargs) - self.backup_id = None - self.storage_account_url = None - self.blob_name = None - self.backup_item_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 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. - - 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 - :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: Required. 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.v2019_08_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2019_08_01.models.DatabaseBackupSetting] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account_url': {'required': 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, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: - 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(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). Default value: 7 . - :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.v2019_08_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: - 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 - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: - 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 - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - 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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2019_08_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.v2019_08_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, - } - - def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: - 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 - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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) -> None: - 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 - """ - - _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: - 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.v2019_08_01.models.CertificateOrderActionType - :ivar created_at: Time at which the certificate action was performed. - :vartype created_at: 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': 'CertificateOrderActionType'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) - self.action_type = None - self.created_at = None - - -class CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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.v2019_08_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.v2019_08_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, - } - - def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: - 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 - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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.v2019_08_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: str=None, properties=None, **kwargs) -> None: - super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class ConnStringInfo(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.v2019_08_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class ConnStringValueTypePair(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.v2019_08_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, value: str, type, **kwargs) -> None: - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = value - self.type = type - - -class Contact(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.v2019_08_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: - 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(Model): - """ContainerCpuStatistics. - - :param cpu_usage: - :type cpu_usage: ~azure.mgmt.web.v2019_08_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.v2019_08_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=None, system_cpu_usage: int=None, online_cpu_count: int=None, throttling_data=None, **kwargs) -> None: - 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(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: int=None, per_cpu_usage=None, kernel_mode_usage: int=None, user_mode_usage: int=None, **kwargs) -> None: - 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(Model): - """ContainerInfo. - - :param current_time_stamp: - :type current_time_stamp: datetime - :param previous_time_stamp: - :type previous_time_stamp: datetime - :param current_cpu_stats: - :type current_cpu_stats: - ~azure.mgmt.web.v2019_08_01.models.ContainerCpuStatistics - :param previous_cpu_stats: - :type previous_cpu_stats: - ~azure.mgmt.web.v2019_08_01.models.ContainerCpuStatistics - :param memory_stats: - :type memory_stats: - ~azure.mgmt.web.v2019_08_01.models.ContainerMemoryStatistics - :param name: - :type name: str - :param id: - :type id: str - :param eth0: - :type eth0: - ~azure.mgmt.web.v2019_08_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=None, previous_time_stamp=None, current_cpu_stats=None, previous_cpu_stats=None, memory_stats=None, name: str=None, id: str=None, eth0=None, **kwargs) -> None: - 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(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: int=None, max_usage: int=None, limit: int=None, **kwargs) -> None: - super(ContainerMemoryStatistics, self).__init__(**kwargs) - self.usage = usage - self.max_usage = max_usage - self.limit = limit - - -class ContainerNetworkInterfaceStatistics(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: int=None, rx_packets: int=None, rx_errors: int=None, rx_dropped: int=None, tx_bytes: int=None, tx_packets: int=None, tx_errors: int=None, tx_dropped: int=None, **kwargs) -> None: - 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(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: int=None, throttled_periods: int=None, throttled_time: int=None, **kwargs) -> None: - 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.v2019_08_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.v2019_08_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': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.support_credentials = support_credentials - - -class CsmCopySlotEntity(Model): - """Copy deployment slot parameters. - - All required parameters must be populated in order to send to Azure. - - :param target_slot: Required. Destination deployment slot during copy - operation. - :type target_slot: str - :param site_config: Required. The site object which will be merged with - the source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2019_08_01.models.SiteConfig - """ - - _validation = { - 'target_slot': {'required': True}, - 'site_config': {'required': True}, - } - - _attribute_map = { - 'target_slot': {'key': 'targetSlot', 'type': 'str'}, - 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, - } - - def __init__(self, *, target_slot: str, site_config, **kwargs) -> None: - super(CsmCopySlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.site_config = site_config - - -class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: - super(CsmMoveResourceEnvelope, self).__init__(**kwargs) - self.target_resource_group = target_resource_group - self.resources = resources - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2019_08_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2019_08_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(CsmOperationDescription, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class CsmOperationDescriptionProperties(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2019_08_01.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(CsmOperationDescriptionProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param ftp: Required. Whether FTP is allowed. - :type ftp: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity - :param scm: Required. Whether Scm Basic Auth is allowed. - :type scm: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ftp': {'required': True}, - 'scm': {'required': 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, *, ftp, scm, kind: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param allow: Required. true to allow access to a publishing - method; otherwise, false. - :type allow: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allow': {'required': 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, *, allow: bool, kind: str=None, **kwargs) -> None: - super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, **kwargs) - self.allow = allow - - -class CsmPublishingProfileOptions(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.v2019_08_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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: - super(CsmPublishingProfileOptions, self).__init__(**kwargs) - self.format = format - self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints - - -class CsmSlotEntity(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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) -> None: - super(CsmSlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.preserve_vnet = preserve_vnet - - -class CsmUsageQuota(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 - :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.v2019_08_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - 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 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: true if hostname is - already verified; otherwise, 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.v2019_08_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.v2019_08_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, - 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: - 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_cname_records = alternate_cname_records - self.alternate_txt_records = alternate_txt_records - - -class DatabaseBackupSetting(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.v2019_08_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: - 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 DataSource(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.v2019_08_01.models.NameValuePair] - """ - - _attribute_map = { - 'instructions': {'key': 'instructions', 'type': '[str]'}, - 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, - } - - def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: - super(DataSource, self).__init__(**kwargs) - self.instructions = instructions - self.data_source_uri = data_source_uri - - -class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: - super(DataTableResponseColumn, self).__init__(**kwargs) - self.column_name = column_name - self.data_type = data_type - self.column_type = column_type - - -class DataTableResponseObject(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.v2019_08_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: str=None, columns=None, rows=None, **kwargs) -> None: - super(DataTableResponseObject, self).__init__(**kwargs) - self.table_name = table_name - self.columns = columns - self.rows = rows - - -class DefaultErrorResponse(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.v2019_08_01.models.DefaultErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, - } - - def __init__(self, **kwargs) -> None: - super(DefaultErrorResponse, self).__init__(**kwargs) - self.error = None - - -class DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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.v2019_08_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=None, **kwargs) -> None: - super(DefaultErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = details - self.innererror = None - - -class DefaultErrorResponseErrorDetailsItem(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) -> None: - 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: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: - 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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, - 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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.deleted_site_kind = None - self.geo_region_name = 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 - :param end_time: End time. - :type end_time: 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: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: - 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 DeploymentLocations(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.v2019_08_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironment] - :param hosting_environment_deployment_infos: Available App Service - Environments with basic information. - :type hosting_environment_deployment_infos: - list[~azure.mgmt.web.v2019_08_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: - super(DeploymentLocations, self).__init__(**kwargs) - self.locations = locations - self.hosting_environments = hosting_environments - self.hosting_environment_deployment_infos = hosting_environment_deployment_infos - - -class DetectorAbnormalTimePeriod(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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.v2019_08_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.v2019_08_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2019_08_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': 'IssueType'}, - 'solutions': {'key': 'solutions', 'type': '[Solution]'}, - } - - def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(DetectorDefinition, self).__init__(kind=kind, **kwargs) - self.display_name = None - self.description = None - self.rank = None - self.is_enabled = None - - -class DetectorInfo(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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.v2019_08_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2019_08_01.models.DiagnosticData] - """ - - _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]'}, - } - - def __init__(self, *, kind: str=None, metadata=None, dataset=None, **kwargs) -> None: - super(DetectorResponse, self).__init__(kind=kind, **kwargs) - self.metadata = metadata - self.dataset = dataset - - -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 - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2019_08_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2019_08_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.v2019_08_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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) - self.description = None - - -class DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2019_08_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2019_08_01.models.Rendering - """ - - _attribute_map = { - 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, - 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, - } - - def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: - super(DiagnosticData, self).__init__(**kwargs) - self.table = table - self.rendering_properties = rendering_properties - - -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 - :param end_time: End time of the period - :type end_time: 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.v2019_08_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2019_08_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2019_08_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2019_08_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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: - 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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: - 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(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 - :param end_time: End time of the period - :type end_time: 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.v2019_08_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2019_08_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.v2019_08_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.v2019_08_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2019_08_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2019_08_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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.v2019_08_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: - super(DomainAvailabilityCheckResult, self).__init__(**kwargs) - self.name = name - self.available = available - self.domain_type = domain_type - - -class DomainControlCenterSsoRequest(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) -> None: - 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: str=None, ownership_id: str=None, **kwargs) -> None: - super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) - self.ownership_id = ownership_id - - -class DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2019_08_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2019_08_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.v2019_08_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.v2019_08_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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.v2019_08_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2019_08_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2019_08_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.v2019_08_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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(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 - 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 - """ - - _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: - super(DomainPurchaseConsent, self).__init__(**kwargs) - self.agreement_keys = agreement_keys - self.agreed_by = agreed_by - self.agreed_at = agreed_at - - -class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: - super(DomainRecommendationSearchParameters, self).__init__(**kwargs) - self.keywords = keywords - self.max_domain_recommendations = max_domain_recommendations - - -class EnabledConfig(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: bool=None, **kwargs) -> None: - super(EnabledConfig, self).__init__(**kwargs) - self.enabled = enabled - - -class EndpointDependency(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.v2019_08_01.models.EndpointDetail] - """ - - _attribute_map = { - 'domain_name': {'key': 'domainName', 'type': 'str'}, - 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, - } - - def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: - super(EndpointDependency, self).__init__(**kwargs) - self.domain_name = domain_name - self.endpoint_details = endpoint_details - - -class EndpointDetail(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: str=None, port: int=None, latency: float=None, is_accessible: bool=None, **kwargs) -> None: - super(EndpointDetail, self).__init__(**kwargs) - self.ip_address = ip_address - self.port = port - self.latency = latency - self.is_accessible = is_accessible - - -class ErrorEntity(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.v2019_08_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: - 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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2019_08_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -class FileSystemApplicationLogsConfig(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2019_08_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, *, level="Off", **kwargs) -> None: - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - - -class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - super(FileSystemHttpLogsConfig, self).__init__(**kwargs) - self.retention_in_mb = retention_in_mb - self.retention_in_days = retention_in_days - self.enabled = enabled - - -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: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: - 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 FunctionSecrets(ProxyOnlyResource): - """Function secrets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype 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: Secret key. - :type key: str - :param trigger_url: Trigger URL. - :type trigger_url: 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'}, - 'key': {'key': 'properties.key', 'type': 'str'}, - 'trigger_url': {'key': 'properties.trigger_url', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, key: str=None, trigger_url: str=None, **kwargs) -> None: - super(FunctionSecrets, self).__init__(kind=kind, **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: str=None, **kwargs) -> None: - super(GeoRegion, self).__init__(kind=kind, **kwargs) - self.description = None - self.display_name = None - self.org_domain = None - - -class GlobalCsmSkuDescription(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.v2019_08_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.v2019_08_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: - super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) - self.name = name - self.location = location - - -class HostingEnvironmentDiagnostics(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: str=None, diagnostics_output: str=None, **kwargs) -> None: - super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) - self.name = name - self.diagnostics_output = diagnostics_output - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: - super(HostKeys, self).__init__(**kwargs) - self.master_key = master_key - self.function_keys = function_keys - self.system_keys = system_keys - - -class HostName(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.v2019_08_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.v2019_08_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.v2019_08_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: - 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.v2019_08_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.v2019_08_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2019_08_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2019_08_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: - 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 HostNameSslState(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.v2019_08_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 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.v2019_08_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2019_08_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2019_08_01.models.AzureBlobStorageHttpLogsConfig - """ - - _attribute_map = { - 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, - 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, - } - - def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: - super(HttpLogsConfig, self).__init__(**kwargs) - self.file_system = file_system - self.azure_blob_storage = azure_blob_storage - - -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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, value: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.value = value - - -class InboundEnvironmentEndpoint(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: str=None, endpoints=None, ports=None, **kwargs) -> None: - super(InboundEnvironmentEndpoint, self).__init__(**kwargs) - self.description = description - self.endpoints = endpoints - self.ports = ports - - -class IpSecurityRestriction(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' - :type tag: str or ~azure.mgmt.web.v2019_08_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 - """ - - _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': 'IpFilterTag'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, **kwargs) -> None: - 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 - - -class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: - super(KeyInfo, self).__init__(**kwargs) - self.name = name - self.value = value - - -class KeyVaultReferenceCollection(ProxyOnlyResource): - """Web app key vault reference and status 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 key_to_reference_statuses: - :type key_to_reference_statuses: dict[str, - ~azure.mgmt.web.v2019_08_01.models.ApiKVReference] - """ - - _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_to_reference_statuses': {'key': 'properties.keyToReferenceStatuses', 'type': '{ApiKVReference}'}, - } - - def __init__(self, *, kind: str=None, key_to_reference_statuses=None, **kwargs) -> None: - super(KeyVaultReferenceCollection, self).__init__(kind=kind, **kwargs) - self.key_to_reference_statuses = key_to_reference_statuses - - -class KeyVaultReferenceResource(ProxyOnlyResource): - """Web app key vault reference and status 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 reference: - :type reference: str - :param status: Possible values include: 'Initialized', 'Resolved', - 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', - 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons' - :type status: str or ~azure.mgmt.web.v2019_08_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: Possible values include: 'SystemAssigned', - 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - :type identity_type: str or - ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentityType - :param details: - :type details: str - :param source: Possible values include: 'KeyVault' - :type source: str or - ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceSource - :param location: Possible values include: 'ApplicationSetting' - :type location: str or - ~azure.mgmt.web.v2019_08_01.models.ConfigReferenceLocation - """ - - _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'}, - 'reference': {'key': 'properties.reference', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'ResolveStatus'}, - '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': 'ManagedServiceIdentityType'}, - 'details': {'key': 'properties.details', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'ConfigReferenceSource'}, - 'location': {'key': 'properties.location', 'type': 'ConfigReferenceLocation'}, - } - - def __init__(self, *, kind: str=None, reference: str=None, status=None, vault_name: str=None, secret_name: str=None, secret_version: str=None, identity_type=None, details: str=None, source=None, location=None, **kwargs) -> None: - super(KeyVaultReferenceResource, 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.source = source - self.location = location - - -class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: - super(LocalizableString, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class LogSpecification(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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: - super(LogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - - -class ManagedServiceIdentity(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.v2019_08_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.v2019_08_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - self.user_assigned_identities = user_assigned_identities - - -class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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) -> None: - super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricSpecification(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.v2019_08_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2019_08_01.models.MetricAvailability] - :param supported_time_grain_types: - :type supported_time_grain_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]'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, supported_time_grain_types=None, **kwargs) -> None: - 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 - - -class MigrateMySqlRequest(ProxyOnlyResource): - """MySQL migration request. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2019_08_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: - 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.v2019_08_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': 'OperationStatus'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: - 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.v2019_08_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: str=None, **kwargs) -> None: - super(MSDeployLog, self).__init__(kind=kind, **kwargs) - self.entries = None - - -class MSDeployLogEntry(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2019_08_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': 'MSDeployLogEntryType'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - 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.v2019_08_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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: str=None, **kwargs) -> None: - 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(Model): - """Identifies an object. - - :param name: Name of the object. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(NameIdentifier, self).__init__(**kwargs) - self.name = name - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2019_08_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = action - self.description = description - self.order = order - self.remote_subnet = remote_subnet - - -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.v2019_08_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2019_08_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: str=None, **kwargs) -> None: - 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(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: str=None, status: str=None, message: str=None, **kwargs) -> None: - super(NetworkTrace, self).__init__(**kwargs) - self.path = path - self.status = status - self.message = message - - -class Operation(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.v2019_08_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2019_08_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: - 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(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.v2019_08_01.models.EndpointDependency] - """ - - _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, - } - - def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: - super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) - self.category = category - self.endpoints = endpoints - - -class PerfMonResponse(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.v2019_08_01.models.PerfMonSet - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'PerfMonSet'}, - } - - def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: - super(PerfMonResponse, self).__init__(**kwargs) - self.code = code - self.message = message - self.data = data - - -class PerfMonSample(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: - super(PerfMonSample, self).__init__(**kwargs) - self.time = time - self.instance_name = instance_name - self.value = value - - -class PerfMonSet(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 - :param end_time: End time of the period. - :type end_time: 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.v2019_08_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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: 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: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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: true if promotion code is - required; otherwise, 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.v2019_08_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': 'AppServicePlanRestrictions'}, - '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: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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 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: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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.v2019_08_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: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: - super(PrivateAccess, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.virtual_networks = virtual_networks - - -class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: - super(PrivateAccessSubnet, self).__init__(**kwargs) - self.name = name - self.key = key - - -class PrivateAccessVirtualNetwork(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.v2019_08_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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: - super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) - self.name = name - self.key = key - self.resource_id = resource_id - self.subnets = subnets - - -class PrivateEndpointConnectionResource(ProxyOnlyResource): - """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.v2019_08_01.models.ArmIdWrapper - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2019_08_01.models.PrivateLinkConnectionState - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateEndpointConnectionResource, 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 - - -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: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2019_08_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: str=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, **kwargs) - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateLinkConnectionState(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: str=None, description: str=None, actions_required: str=None, **kwargs) -> None: - super(PrivateLinkConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = actions_required - - -class PrivateLinkResource(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.v2019_08_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, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.properties = properties - - -class PrivateLinkResourceProperties(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) -> None: - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None - - -class PrivateLinkResourcesWrapper(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.v2019_08_01.models.PrivateLinkResource] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - 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.v2019_08_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.v2019_08_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 - :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 - :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: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: - 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 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: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: - 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 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 - :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: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: - 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 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.v2019_08_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': 'PublicCertificateLocation'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: - super(PublicCertificate, self).__init__(kind=kind, **kwargs) - self.blob = blob - self.public_certificate_location = public_certificate_location - self.thumbprint = None - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - \\nMinReroutePercentage or - MaxReroutePercentage. Site metrics are checked every N - minutes specified in ChangeIntervalInMinutes.\\nCustom - decision algorithm - can be provided in TiPCallback site extension which URL can be specified - in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 - :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.v2019_08_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.v2019_08_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.v2019_08_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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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 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.v2019_08_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.v2019_08_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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: - 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 Rendering(Model): - """Instructions for rendering the data. - - :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', - 'TimeSeries', 'TimeSeriesPerInstance' - :type type: str or ~azure.mgmt.web.v2019_08_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': 'RenderingType'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: - 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: - super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) - self.category = category - self.signal_availability = signal_availability - - -class ResourceMetricAvailability(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) -> None: - 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.v2019_08_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: str=None, **kwargs) -> None: - 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 ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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.v2019_08_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: bool=None, reason=None, message: str=None, **kwargs) -> None: - super(ResourceNameAvailability, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class ResourceNameAvailabilityRequest(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.v2019_08_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, is_fqdn: bool=None, **kwargs) -> None: - super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.is_fqdn = is_fqdn - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2019_08_01.models.DataSource - """ - - _attribute_map = { - 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, - } - - def __init__(self, *, data_source=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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.v2019_08_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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.v2019_08_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, - 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, - } - - def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: - 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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2019_08_01.models.MetricSpecification] - :param log_specifications: - :type log_specifications: - list[~azure.mgmt.web.v2019_08_01.models.LogSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :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.v2019_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2019_08_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.v2019_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2019_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2019_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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 - :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.v2019_08_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: true if the app is a default - container; otherwise, 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.v2019_08_01.models.SlotSwapStatus - :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.v2019_08_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 identity: - :type identity: ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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_exclusion_paths = client_cert_exclusion_paths - self.host_names_disabled = host_names_disabled - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.identity = identity - - -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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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.v2019_08_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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' - :type default_provider: str or - ~azure.mgmt.web.v2019_08_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_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 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 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_oauth_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_oauth_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_oauth_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_oauth_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 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_oauth_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_oauth_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'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_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]'}, - 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, - 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, - 'google_oauth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, - 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, - 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, - 'facebook_oauth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, - 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, - 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, - 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, - 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, - 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, google_client_id: str=None, google_client_secret: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_oauth_scopes=None, **kwargs) -> None: - super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.runtime_version = runtime_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_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.google_client_id = google_client_id - self.google_client_secret = google_client_secret - self.google_oauth_scopes = google_oauth_scopes - self.facebook_app_id = facebook_app_id - self.facebook_app_secret = facebook_app_secret - self.facebook_oauth_scopes = facebook_oauth_scopes - self.twitter_consumer_key = twitter_consumer_key - self.twitter_consumer_secret = twitter_consumer_secret - self.microsoft_account_client_id = microsoft_account_client_id - self.microsoft_account_client_secret = microsoft_account_client_secret - self.microsoft_account_oauth_scopes = microsoft_account_oauth_scopes - - -class SiteCloneability(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.v2019_08_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2019_08_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, - } - - def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: - 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(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: str=None, description: str=None, **kwargs) -> None: - super(SiteCloneabilityCriterion, self).__init__(**kwargs) - self.name = name - self.description = description - - -class SiteConfig(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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, false. - :type http_logging_enabled: bool - :param acr_use_managed_identity_creds: Flag to use Managed Identity Creds - for ACR pull - :type acr_use_managed_identity_creds: bool - :param acr_user_managed_identity_id: If using user managed identity, the - user managed identity ClientId - :type acr_user_managed_identity_id: str - :param logs_directory_size_limit: HTTP logs directory size limit. - :type logs_directory_size_limit: int - :param detailed_error_logging_enabled: true if detailed error - logging is enabled; otherwise, 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.v2019_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2019_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2019_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2019_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2019_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2019_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2019_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2019_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2019_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2019_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2019_08_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2019_08_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2019_08_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2019_08_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. Default value: True . - :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.v2019_08_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.v2019_08_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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'}, - 'acr_use_managed_identity_creds': {'key': 'acrUseManagedIdentityCreds', 'type': 'bool'}, - 'acr_user_managed_identity_id': {'key': 'acrUserManagedIdentityID', 'type': 'str'}, - '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, - 'pre_warmed_instance_count': {'key': 'preWarmedInstanceCount', 'type': 'int'}, - 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, acr_use_managed_identity_creds: bool=None, acr_user_managed_identity_id: str=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: - 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.acr_use_managed_identity_creds = acr_use_managed_identity_creds - self.acr_user_managed_identity_id = acr_user_managed_identity_id - 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.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.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.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.ftps_state = ftps_state - self.pre_warmed_instance_count = pre_warmed_instance_count - self.health_check_path = health_check_path - - -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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, false. - :type http_logging_enabled: bool - :param acr_use_managed_identity_creds: Flag to use Managed Identity Creds - for ACR pull - :type acr_use_managed_identity_creds: bool - :param acr_user_managed_identity_id: If using user managed identity, the - user managed identity ClientId - :type acr_user_managed_identity_id: str - :param logs_directory_size_limit: HTTP logs directory size limit. - :type logs_directory_size_limit: int - :param detailed_error_logging_enabled: true if detailed error - logging is enabled; otherwise, 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.v2019_08_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2019_08_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2019_08_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2019_08_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.v2019_08_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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.v2019_08_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2019_08_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2019_08_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2019_08_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2019_08_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2019_08_01.models.AutoHealRules - :param tracing_options: Tracing options. - :type tracing_options: str - :param vnet_name: Virtual Network name. - :type vnet_name: str - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.web.v2019_08_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2019_08_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2019_08_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2019_08_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2019_08_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2019_08_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. Default value: True . - :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.v2019_08_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.v2019_08_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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'}, - 'acr_use_managed_identity_creds': {'key': 'properties.acrUseManagedIdentityCreds', 'type': 'bool'}, - 'acr_user_managed_identity_id': {'key': 'properties.acrUserManagedIdentityID', 'type': 'str'}, - '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - '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'}, - 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, - 'pre_warmed_instance_count': {'key': 'properties.preWarmedInstanceCount', 'type': 'int'}, - 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, acr_use_managed_identity_creds: bool=None, acr_user_managed_identity_id: str=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: - 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.acr_use_managed_identity_creds = acr_use_managed_identity_creds - self.acr_user_managed_identity_id = acr_user_managed_identity_id - 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.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.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.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.ftps_state = ftps_state - self.pre_warmed_instance_count = pre_warmed_instance_count - self.health_check_path = health_check_path - - -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 - :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: str=None, **kwargs) -> None: - super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) - self.time = None - self.snapshot_id = 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.v2019_08_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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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': 'SiteExtensionType'}, - '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: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: - 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 SiteInstance(ProxyOnlyResource): - """Instance 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 site_instance_name: Name of instance. - :vartype site_instance_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'site_instance_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'}, - 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(SiteInstance, self).__init__(kind=kind, **kwargs) - self.site_instance_name = None - - -class SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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.v2019_08_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2019_08_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2019_08_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2019_08_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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: - 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - 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 - :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.v2019_08_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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.v2019_08_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.v2019_08_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2019_08_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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.v2019_08_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param client_cert_exclusion_paths: client certificate authentication - comma-separated exclusion paths - :type client_cert_exclusion_paths: str - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :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 - :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.v2019_08_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: true if the app is a default - container; otherwise, 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.v2019_08_01.models.SlotSwapStatus - :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.v2019_08_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 identity: - :type identity: ~azure.mgmt.web.v2019_08_01.models.ManagedServiceIdentity - """ - - _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'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: - super(SitePatchResource, self).__init__(kind=kind, **kwargs) - 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_exclusion_paths = client_cert_exclusion_paths - self.host_names_disabled = host_names_disabled - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.identity = identity - - -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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: - 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(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) -> None: - super(SiteSeal, self).__init__(**kwargs) - self.html = html - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: - 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, - 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, - 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: - super(SiteSourceControl, self).__init__(kind=kind, **kwargs) - self.repo_url = repo_url - self.branch = branch - self.is_manual_integration = is_manual_integration - self.deployment_rollback_enabled = deployment_rollback_enabled - self.is_mercurial = is_mercurial - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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.v2019_08_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.v2019_08_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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(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.v2019_08_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2019_08_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: str=None, sku=None, capacity=None, **kwargs) -> None: - super(SkuInfo, self).__init__(**kwargs) - self.resource_type = resource_type - self.sku = sku - self.capacity = capacity - - -class SkuInfos(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.v2019_08_01.models.GlobalCsmSkuDescription] - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, - } - - def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: - 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: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - 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: str=None, **kwargs) -> None: - super(Snapshot, self).__init__(kind=kind, **kwargs) - self.time = None - - -class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: - 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. - - 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 - :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.v2019_08_01.models.SnapshotRecoverySource - :param overwrite: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': 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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: - 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(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.v2019_08_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2019_08_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2019_08_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': 'SolutionType'}, - 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, - 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, - } - - def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: - 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 - """ - - _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: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: - 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 StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2019_08_01.models.StackMinorVersion] - :param application_insights: true if this supports - Application Insights; otherwise, false. - :type application_insights: bool - :param is_preview: true if this stack is in Preview, - otherwise false. - :type is_preview: bool - :param is_deprecated: true if this stack has been deprecated, - otherwise false. - :type is_deprecated: bool - :param is_hidden: true if this stack should be hidden for new - customers on portal, otherwise 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'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, - 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, - } - - def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, is_preview: bool=None, is_deprecated: bool=None, is_hidden: bool=None, **kwargs) -> None: - 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.is_preview = is_preview - self.is_deprecated = is_deprecated - self.is_hidden = is_hidden - - -class StackMinorVersion(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: - 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(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.v2019_08_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' - :type worker_size: str or - ~azure.mgmt.web.v2019_08_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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: - 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 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: Resource tags. - :type tags: dict[str, 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 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.v2019_08_01.models.StaticSiteBuildProperties - :param sku: - :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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}'}, - 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, sku=None, **kwargs) -> None: - super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.default_hostname = None - self.repository_url = repository_url - self.branch = branch - self.custom_domains = None - self.repository_token = repository_token - self.build_properties = build_properties - self.sku = sku - - -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 - :ivar last_updated_on: When this build was updated. - :vartype last_updated_on: 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.v2019_08_01.models.BuildStatus - """ - - _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}, - } - - _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'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 - - -class StaticSiteBuildProperties(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: The path of the app artifacts after - building. - :type app_artifact_location: str - """ - - _attribute_map = { - 'app_location': {'key': 'appLocation', 'type': 'str'}, - 'api_location': {'key': 'apiLocation', 'type': 'str'}, - 'app_artifact_location': {'key': 'appArtifactLocation', 'type': 'str'}, - } - - def __init__(self, *, app_location: str=None, api_location: str=None, app_artifact_location: str=None, **kwargs) -> None: - super(StaticSiteBuildProperties, self).__init__(**kwargs) - self.app_location = app_location - self.api_location = api_location - self.app_artifact_location = app_artifact_location - - -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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_name': {'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'}, - 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, - 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(StaticSiteCustomDomainOverviewARMResource, self).__init__(kind=kind, **kwargs) - self.domain_name = None - self.created_on = None - - -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.v2019_08_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: str=None, **kwargs) -> None: - super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, **kwargs) - self.function_name = None - self.trigger_type = 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 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.v2019_08_01.models.StaticSiteBuildProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - } - - def __init__(self, *, kind: str=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, **kwargs) -> None: - super(StaticSitePatchResource, self).__init__(kind=kind, **kwargs) - self.default_hostname = None - self.repository_url = repository_url - self.branch = branch - self.custom_domains = None - self.repository_token = repository_token - self.build_properties = build_properties - - -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: str=None, repository_token: str=None, should_update_repository: bool=None, **kwargs) -> None: - super(StaticSiteResetPropertiesARMResource, self).__init__(kind=kind, **kwargs) - self.repository_token = repository_token - self.should_update_repository = should_update_repository - - -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: str=None, roles: str=None, **kwargs) -> None: - super(StaticSiteUserARMResource, self).__init__(kind=kind, **kwargs) - self.provider = None - self.user_id = None - self.display_name = None - self.roles = roles - - -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: str=None, domain: str=None, provider: str=None, user_details: str=None, roles: str=None, num_hours_to_expiration: int=None, **kwargs) -> None: - 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 - :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: str=None, **kwargs) -> None: - super(StaticSiteUserInvitationResponseResource, self).__init__(kind=kind, **kwargs) - self.expires_on = None - self.invitation_url = None - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, properties=None, **kwargs) -> None: - super(StringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -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: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: - super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) - self.subnet_resource_id = subnet_resource_id - self.swift_supported = swift_supported - - -class TldLegalAgreement(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: str=None, **kwargs) -> None: - super(TldLegalAgreement, self).__init__(**kwargs) - self.agreement_key = agreement_key - self.title = title - self.content = content - self.url = url - - -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 true, then the top level domain supports - domain privacy; otherwise, 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: str=None, privacy: bool=None, **kwargs) -> None: - super(TopLevelDomain, self).__init__(kind=kind, **kwargs) - self.privacy = privacy - - -class TopLevelDomainAgreementOption(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - """ - - _attribute_map = { - 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, - 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, - } - - def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: - super(TopLevelDomainAgreementOption, self).__init__(**kwargs) - self.include_privacy = include_privacy - self.for_transfer = for_transfer - - -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.v2019_08_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: str=None, runs=None, **kwargs) -> None: - super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) - self.runs = runs - - -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.v2019_08_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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': 'TriggeredWebJobStatus'}, - '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: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: - 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.v2019_08_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.v2019_08_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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2019_08_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': 'ComputeModeOptions'}, - 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: - 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(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' - :type type: str or - ~azure.mgmt.web.v2019_08_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: 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 - """ - - _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'}, - } - - def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, container_registry_base_url: str=None, container_registry_username: str=None, container_registry_password: str=None, container_image_repository: str=None, container_image_tag: str=None, container_image_platform: str=None, **kwargs) -> None: - 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 - - -class ValidateResponse(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.v2019_08_01.models.ValidateResponseError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ValidateResponseError'}, - } - - def __init__(self, *, status: str=None, error=None, **kwargs) -> None: - super(ValidateResponse, self).__init__(**kwargs) - self.status = status - self.error = error - - -class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: - super(ValidateResponseError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2019_08_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -class VirtualIPMapping(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: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, service_name: str=None, **kwargs) -> None: - 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(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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=None, subnet: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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.v2019_08_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: - 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 - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: - 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 - - -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.v2019_08_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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - 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 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.v2019_08_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'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, *, kind: str=None, failed: bool=None, failed_tests=None, **kwargs) -> None: - super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) - self.failed = failed - self.failed_tests = failed_tests - - -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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: - super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) - self.test_name = test_name - self.details = details - - -class WebAppCollection(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.v2019_08_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, **kwargs) -> None: - super(WebAppCollection, 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.v2019_08_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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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.v2019_08_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 Diagnose and Solve Portal - :type console_url: str - :param containers: - :type containers: dict[str, - ~azure.mgmt.web.v2019_08_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': 'SiteRuntimeState'}, - 'status_url': {'key': 'properties.statusUrl', 'type': 'str'}, - 'detector_url': {'key': 'properties.detectorUrl', 'type': 'str'}, - 'console_url': {'key': 'properties.consoleUrl', 'type': 'str'}, - 'containers': {'key': 'properties.containers', 'type': '{ContainerInfo}'}, - } - - def __init__(self, *, kind: str=None, state=None, status_url: str=None, detector_url: str=None, console_url: str=None, containers=None, **kwargs) -> None: - 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.containers = containers - - -class WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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.v2019_08_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 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.v2019_08_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] - :param sku: - :type sku: ~azure.mgmt.web.v2019_08_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: - super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) - 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 - self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py deleted file mode 100644 index 3f4af4dd589..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_paged_models.py +++ /dev/null @@ -1,781 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AppServiceCertificateOrderPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) -class AppServiceCertificateResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) -class CsmOperationDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmOperationDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) -class DomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`Domain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Domain]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainPaged, self).__init__(*args, **kwargs) -class NameIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`NameIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(NameIdentifierPaged, self).__init__(*args, **kwargs) -class DomainOwnershipIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) -class TopLevelDomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`TopLevelDomain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} - } - - def __init__(self, *args, **kwargs): - - super(TopLevelDomainPaged, self).__init__(*args, **kwargs) -class TldLegalAgreementPaged(Paged): - """ - A paging container for iterating over a list of :class:`TldLegalAgreement ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} - } - - def __init__(self, *args, **kwargs): - - super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) -class CertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`Certificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Certificate]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificatePaged, self).__init__(*args, **kwargs) -class DeletedSitePaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSite ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSite]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSitePaged, self).__init__(*args, **kwargs) -class DetectorResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorResponsePaged, self).__init__(*args, **kwargs) -class DiagnosticCategoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiagnosticCategory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} - } - - def __init__(self, *args, **kwargs): - - super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) -class AnalysisDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`AnalysisDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) -class DetectorDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) -class ApplicationStackResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationStackResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationStackResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationStackResourcePaged, self).__init__(*args, **kwargs) -class RecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Recommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Recommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendationPaged, self).__init__(*args, **kwargs) -class SourceControlPaged(Paged): - """ - A paging container for iterating over a list of :class:`SourceControl ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SourceControl]'} - } - - def __init__(self, *args, **kwargs): - - super(SourceControlPaged, self).__init__(*args, **kwargs) -class BillingMeterPaged(Paged): - """ - A paging container for iterating over a list of :class:`BillingMeter ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BillingMeter]'} - } - - def __init__(self, *args, **kwargs): - - super(BillingMeterPaged, self).__init__(*args, **kwargs) -class GeoRegionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoRegion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoRegion]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoRegionPaged, self).__init__(*args, **kwargs) -class IdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`Identifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Identifier]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentifierPaged, self).__init__(*args, **kwargs) -class PremierAddOnOfferPaged(Paged): - """ - A paging container for iterating over a list of :class:`PremierAddOnOffer ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} - } - - def __init__(self, *args, **kwargs): - - super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) -class SitePaged(Paged): - """ - A paging container for iterating over a list of :class:`Site ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Site]'} - } - - def __init__(self, *args, **kwargs): - - super(SitePaged, self).__init__(*args, **kwargs) -class BackupItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupItem]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupItemPaged, self).__init__(*args, **kwargs) -class SiteConfigResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) -class SiteConfigurationSnapshotInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) -class ContinuousWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`ContinuousWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) -class DeploymentPaged(Paged): - """ - A paging container for iterating over a list of :class:`Deployment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Deployment]'} - } - - def __init__(self, *args, **kwargs): - - super(DeploymentPaged, self).__init__(*args, **kwargs) -class FunctionEnvelopePaged(Paged): - """ - A paging container for iterating over a list of :class:`FunctionEnvelope ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} - } - - def __init__(self, *args, **kwargs): - - super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) -class HostNameBindingPaged(Paged): - """ - A paging container for iterating over a list of :class:`HostNameBinding ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} - } - - def __init__(self, *args, **kwargs): - - super(HostNameBindingPaged, self).__init__(*args, **kwargs) -class SiteInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteInstancePaged, self).__init__(*args, **kwargs) -class ProcessInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessInfoPaged, self).__init__(*args, **kwargs) -class ProcessModuleInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessModuleInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) -class ProcessThreadInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessThreadInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) -class PerfMonResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`PerfMonResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(PerfMonResponsePaged, self).__init__(*args, **kwargs) -class PublicCertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`PublicCertificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} - } - - def __init__(self, *args, **kwargs): - - super(PublicCertificatePaged, self).__init__(*args, **kwargs) -class SiteExtensionInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteExtensionInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) -class SlotDifferencePaged(Paged): - """ - A paging container for iterating over a list of :class:`SlotDifference ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SlotDifference]'} - } - - def __init__(self, *args, **kwargs): - - super(SlotDifferencePaged, self).__init__(*args, **kwargs) -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) -class TriggeredWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) -class TriggeredJobHistoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredJobHistory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) -class CsmUsageQuotaPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmUsageQuota ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) -class WebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(WebJobPaged, self).__init__(*args, **kwargs) -class StaticSiteARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteUserARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteUserARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteUserARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteUserARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteBuildARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteBuildARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteBuildARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteFunctionOverviewARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteFunctionOverviewARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteFunctionOverviewARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteCustomDomainOverviewARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteCustomDomainOverviewARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteCustomDomainOverviewARMResourcePaged, self).__init__(*args, **kwargs) -class AppServiceEnvironmentResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) -class StampCapacityPaged(Paged): - """ - A paging container for iterating over a list of :class:`StampCapacity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StampCapacity]'} - } - - def __init__(self, *args, **kwargs): - - super(StampCapacityPaged, self).__init__(*args, **kwargs) -class InboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class WorkerPoolResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkerPoolResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) -class ResourceMetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) -class SkuInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SkuInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SkuInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SkuInfoPaged, self).__init__(*args, **kwargs) -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) -class OutboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class AppServicePlanPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServicePlan ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServicePlanPaged, self).__init__(*args, **kwargs) -class StrPaged(Paged): - """ - A paging container for iterating over a list of str object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } - - def __init__(self, *args, **kwargs): - - super(StrPaged, self).__init__(*args, **kwargs) -class HybridConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`HybridConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HybridConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(HybridConnectionPaged, self).__init__(*args, **kwargs) -class ResourceHealthMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py deleted file mode 100644 index 2cbe79ed770..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,608 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class KeyVaultSecretStatus(str, Enum): - - 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 CertificateProductType(str, Enum): - - standard_domain_validated_ssl = "StandardDomainValidatedSsl" - standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class CertificateOrderStatus(str, Enum): - - pendingissuance = "Pendingissuance" - issued = "Issued" - revoked = "Revoked" - canceled = "Canceled" - denied = "Denied" - pendingrevocation = "Pendingrevocation" - pending_rekey = "PendingRekey" - unused = "Unused" - expired = "Expired" - not_submitted = "NotSubmitted" - - -class CertificateOrderActionType(str, Enum): - - 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 RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned, UserAssigned" - none = "None" - - -class IpFilterTag(str, Enum): - - default = "Default" - xff_proxy = "XffProxy" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 ScmType(str, Enum): - - 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 ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class FtpsState(str, Enum): - - all_allowed = "AllAllowed" - ftps_only = "FtpsOnly" - disabled = "Disabled" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class RedundancyMode(str, Enum): - - none = "None" - manual = "Manual" - failover = "Failover" - active_active = "ActiveActive" - geo_redundant = "GeoRedundant" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class DomainStatus(str, Enum): - - 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 AzureResourceType(str, Enum): - - website = "Website" - traffic_manager = "TrafficManager" - - -class CustomHostNameDnsRecordType(str, Enum): - - cname = "CName" - a = "A" - - -class HostNameType(str, Enum): - - verified = "Verified" - managed = "Managed" - - -class DnsType(str, Enum): - - azure_dns = "AzureDns" - default_domain_registrar_dns = "DefaultDomainRegistrarDns" - - -class DomainType(str, Enum): - - regular = "Regular" - soft_deleted = "SoftDeleted" - - -class HostingEnvironmentStatus(str, Enum): - - preparing = "Preparing" - ready = "Ready" - scaling = "Scaling" - deleting = "Deleting" - - -class InternalLoadBalancingMode(str, Enum): - - none = "None" - web = "Web" - publishing = "Publishing" - - -class ComputeModeOptions(str, Enum): - - shared = "Shared" - dedicated = "Dedicated" - dynamic = "Dynamic" - - -class WorkerSizeOptions(str, Enum): - - small = "Small" - medium = "Medium" - large = "Large" - d1 = "D1" - d2 = "D2" - d3 = "D3" - nested_small = "NestedSmall" - default = "Default" - - -class AccessControlEntryAction(str, Enum): - - permit = "Permit" - deny = "Deny" - - -class OperationStatus(str, Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" - - -class IssueType(str, Enum): - - 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 SolutionType(str, Enum): - - quick_solution = "QuickSolution" - deep_investigation = "DeepInvestigation" - best_practices = "BestPractices" - - -class RenderingType(str, Enum): - - no_graph = "NoGraph" - table = "Table" - time_series = "TimeSeries" - time_series_per_instance = "TimeSeriesPerInstance" - - -class ResourceScopeType(str, Enum): - - server_farm = "ServerFarm" - subscription = "Subscription" - web_site = "WebSite" - - -class NotificationLevel(str, Enum): - - critical = "Critical" - warning = "Warning" - information = "Information" - non_urgent_suggestion = "NonUrgentSuggestion" - - -class Channels(str, Enum): - - notification = "Notification" - api = "Api" - email = "Email" - webhook = "Webhook" - all = "All" - - -class AppServicePlanRestrictions(str, Enum): - - none = "None" - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - - -class InAvailabilityReasonType(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" - - -class CheckNameResourceTypes(str, Enum): - - site = "Site" - slot = "Slot" - hosting_environment = "HostingEnvironment" - publishing_user = "PublishingUser" - microsoft_websites = "Microsoft.Web/sites" - microsoft_websitesslots = "Microsoft.Web/sites/slots" - microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" - microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" - - -class ValidateResourceTypes(str, Enum): - - server_farm = "ServerFarm" - site = "Site" - - -class ResolveStatus(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" - - -class ConfigReferenceSource(str, Enum): - - key_vault = "KeyVault" - - -class ConfigReferenceLocation(str, Enum): - - application_setting = "ApplicationSetting" - - -class LogLevel(str, Enum): - - off = "Off" - verbose = "Verbose" - information = "Information" - warning = "Warning" - error = "Error" - - -class AzureStorageType(str, Enum): - - azure_files = "AzureFiles" - azure_blob = "AzureBlob" - - -class AzureStorageState(str, Enum): - - ok = "Ok" - invalid_credentials = "InvalidCredentials" - invalid_share = "InvalidShare" - - -class BackupItemStatus(str, Enum): - - 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 DatabaseType(str, Enum): - - sql_azure = "SqlAzure" - my_sql = "MySql" - local_my_sql = "LocalMySql" - postgre_sql = "PostgreSql" - - -class FrequencyUnit(str, Enum): - - day = "Day" - hour = "Hour" - - -class ContinuousWebJobStatus(str, Enum): - - initializing = "Initializing" - starting = "Starting" - running = "Running" - pending_restart = "PendingRestart" - stopped = "Stopped" - - -class WebJobType(str, Enum): - - continuous = "Continuous" - triggered = "Triggered" - - -class PublishingProfileFormat(str, Enum): - - file_zilla3 = "FileZilla3" - web_deploy = "WebDeploy" - ftp = "Ftp" - - -class DnsVerificationTestResult(str, Enum): - - passed = "Passed" - failed = "Failed" - skipped = "Skipped" - - -class MSDeployLogEntryType(str, Enum): - - message = "Message" - warning = "Warning" - error = "Error" - - -class MSDeployProvisioningState(str, Enum): - - accepted = "accepted" - running = "running" - succeeded = "succeeded" - failed = "failed" - canceled = "canceled" - - -class MySqlMigrationType(str, Enum): - - local_to_remote = "LocalToRemote" - remote_to_local = "RemoteToLocal" - - -class PublicCertificateLocation(str, Enum): - - current_user_my = "CurrentUserMy" - local_machine_my = "LocalMachineMy" - unknown = "Unknown" - - -class BackupRestoreOperationType(str, Enum): - - default = "Default" - clone = "Clone" - relocation = "Relocation" - snapshot = "Snapshot" - cloud_fs = "CloudFS" - - -class UnauthenticatedClientAction(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - - -class BuiltInAuthenticationProvider(str, Enum): - - azure_active_directory = "AzureActiveDirectory" - facebook = "Facebook" - google = "Google" - microsoft_account = "MicrosoftAccount" - twitter = "Twitter" - - -class CloneAbilityResult(str, Enum): - - cloneable = "Cloneable" - partially_cloneable = "PartiallyCloneable" - not_cloneable = "NotCloneable" - - -class SiteExtensionType(str, Enum): - - gallery = "Gallery" - web_root = "WebRoot" - - -class TriggeredWebJobStatus(str, Enum): - - success = "Success" - failed = "Failed" - error = "Error" - - -class SiteRuntimeState(str, Enum): - - ready = "READY" - stopped = "STOPPED" - unknown = "UNKNOWN" - - -class BuildStatus(str, Enum): - - waiting_for_deployment = "WaitingForDeployment" - uploading = "Uploading" - deploying = "Deploying" - ready = "Ready" - failed = "Failed" - deleting = "Deleting" - detached = "Detached" - - -class TriggerTypes(str, Enum): - - http_trigger = "HttpTrigger" - unknown = "Unknown" - - -class SkuName(str, Enum): - - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - dynamic = "Dynamic" - isolated = "Isolated" - premium_v2 = "PremiumV2" - elastic_premium = "ElasticPremium" - elastic_isolated = "ElasticIsolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py deleted file mode 100644 index b6a3c15dcb7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations -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 ._provider_operations import ProviderOperations -from ._recommendations_operations import RecommendationsOperations -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 -from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin - -__all__ = [ - 'AppServiceCertificateOrdersOperations', - 'CertificateRegistrationProviderOperations', - 'DomainsOperations', - 'TopLevelDomainsOperations', - 'DomainRegistrationProviderOperations', - 'CertificatesOperations', - 'DeletedWebAppsOperations', - 'DiagnosticsOperations', - 'ProviderOperations', - 'RecommendationsOperations', - 'WebAppsOperations', - 'StaticSitesOperations', - 'AppServiceEnvironmentsOperations', - 'AppServicePlansOperations', - 'ResourceHealthMetadataOperations', - 'WebSiteManagementClientOperationsMixin', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_certificate_orders_operations.py deleted file mode 100644 index a4be5eff7a0..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_certificate_orders_operations.py +++ /dev/null @@ -1,1423 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceCertificateOrdersOperations(object): - """AppServiceCertificateOrdersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all certificate orders in a subscription. - - Description for List all certificate orders in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def validate_purchase_information( - self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate_purchase_information.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def get( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - - def _create_or_update_initial( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateOrder or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def delete( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.AppServiceCertificateOrderPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def list_certificates( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_certificates.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} - - def get_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - - def _create_or_update_certificate_initial( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.AppServiceCertificateResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def delete_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.AppServiceCertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def reissue( - self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.ReissueCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reissue.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} - - def renew( - self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.RenewCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} - - def resend_email( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.resend_email.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} - - def resend_request_emails( - self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): - """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: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.resend_request_emails.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} - - def retrieve_site_seal( - self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): - """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 light_theme: If 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSeal or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSeal or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) - - # Construct URL - url = self.retrieve_site_seal.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSeal', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} - - def verify_domain_ownership( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_domain_ownership.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} - - def retrieve_certificate_actions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2019_08_01.models.CertificateOrderAction] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_actions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateOrderAction]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} - - def retrieve_certificate_email_history( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.CertificateEmail] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_email_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateEmail]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_environments_operations.py deleted file mode 100644 index cc00719e9de..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_environments_operations.py +++ /dev/null @@ -1,2858 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceEnvironmentsOperations(object): - """AppServiceEnvironmentsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all App Service Environments for a subscription. - - Description for Get all App Service Environments for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.AppServiceEnvironmentResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceEnvironmentResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - hosting_environment_envelope=hosting_environment_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _delete_initial( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if force_delete is not None: - query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 true to force the deletion - even if the App Service Environment contains resources. The default is - false. - :type force_delete: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - force_delete=force_delete, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.AppServiceEnvironmentPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def list_capacities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StampCapacity - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StampCapacityPaged[~azure.mgmt.web.v2019_08_01.models.StampCapacity] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_capacities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} - - def get_vip_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AddressResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.AddressResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vip_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AddressResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} - - - def _change_vnet_initial( - self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): - vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) - - # Construct URL - url = self.change_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def change_vnet( - self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 id: Resource id of the Virtual Network. - :type id: str - :param subnet: Subnet within the Virtual Network. - :type subnet: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._change_vnet_initial( - resource_group_name=resource_group_name, - name=name, - id=id, - subnet=subnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} - - def list_diagnostics( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2019_08_01.models.HostingEnvironmentDiagnostics] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_diagnostics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} - - def get_diagnostics_item( - self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostingEnvironmentDiagnostics or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.HostingEnvironmentDiagnostics or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostics_item.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} - - def get_inbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of InboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2019_08_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2019_08_01.models.InboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_inbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} - - def list_multi_role_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} - - def get_multi_role_pool( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - - def _create_or_update_multi_role_pool_initial( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def list_multi_role_pool_instance_metric_definitions( - self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} - - def list_multi_role_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} - - def list_multi_role_pool_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SkuInfoPaged[~azure.mgmt.web.v2019_08_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} - - def list_multi_role_usages( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2019_08_01.models.UsagePaged[~azure.mgmt.web.v2019_08_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} - - def list_operations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.Operation] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_operations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Operation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} - - def get_outbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2019_08_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2019_08_01.models.OutboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_outbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} - - def reboot( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reboot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} - - - def _resume_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.resume.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def resume( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._resume_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} - - def list_app_service_plans( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServicePlanPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_app_service_plans.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} - - def list_web_apps( - self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} - - - def _suspend_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.suspend.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def suspend( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._suspend_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} - - def list_worker_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} - - def get_worker_pool( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - - def _create_or_update_worker_pool_initial( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def list_worker_pool_instance_metric_definitions( - self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} - - def list_web_worker_metric_definitions( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} - - def list_worker_pool_skus( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SkuInfoPaged[~azure.mgmt.web.v2019_08_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} - - def list_web_worker_usages( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2019_08_01.models.UsagePaged[~azure.mgmt.web.v2019_08_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_plans_operations.py deleted file mode 100644 index 9e251b26889..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_app_service_plans_operations.py +++ /dev/null @@ -1,1946 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServicePlansOperations(object): - """AppServicePlansOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, detailed=None, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans for a subscription. - - Description for Get all App Service plans for a subscription. - - :param detailed: Specify true to return all App Service - plan properties. The default is false, which returns a - subset of the properties. - Retrieval of all properties may increase the API latency. - :type detailed: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServicePlanPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AppServicePlanPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlan') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.AppServicePlan - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AppServicePlan or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.AppServicePlan]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - app_service_plan=app_service_plan, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.AppServicePlanPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def list_capabilities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.Capability] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_capabilities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Capability]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connection_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_web_apps_by_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of str - :rtype: ~azure.mgmt.web.v2019_08_01.models.StrPaged[str] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps_by_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} - - def get_hybrid_connection_plan_limit( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionLimits or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnectionLimits or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_plan_limit.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionLimits', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HybridConnection - :rtype: - ~azure.mgmt.web.v2019_08_01.models.HybridConnectionPaged[~azure.mgmt.web.v2019_08_01.models.HybridConnection] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} - - def restart_web_apps( - self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): - """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 true to perform a soft - restart, applies the configuration settings and restarts the apps if - necessary. The default is false, which always restarts - and reprovisions the apps - :type soft_restart: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if soft_restart is not None: - query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} - - def list_web_apps( - self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} - - def get_server_farm_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_server_farm_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} - - def list_vnets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} - - def get_vnet_from_server_farm( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_from_server_farm.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_routes_for_vnet( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_routes_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} - - def get_route_for_vnet( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_route_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def create_or_update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def delete_vnet_route( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def reboot_worker( - self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reboot_worker.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificate_registration_provider_operations.py deleted file mode 100644 index 7343d0e6393..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificate_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificateRegistrationProviderOperations(object): - """CertificateRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificates_operations.py deleted file mode 100644 index 3f969cef555..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_certificates_operations.py +++ /dev/null @@ -1,437 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificatesOperations(object): - """CertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all certificates for a subscription. - - Description for Get all certificates for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CertificatePaged[~azure.mgmt.web.v2019_08_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CertificatePaged[~azure.mgmt.web.v2019_08_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def create_or_update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.Certificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'Certificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.CertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_deleted_web_apps_operations.py deleted file mode 100644 index 56e57117028..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_deleted_web_apps_operations.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DeletedWebAppsOperations(object): - """DeletedWebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all deleted apps for a subscription. - - Description for Get all deleted apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DeletedSitePaged[~azure.mgmt.web.v2019_08_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DeletedSitePaged[~azure.mgmt.web.v2019_08_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} - - def get_deleted_web_app_by_location( - self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeletedSite or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DeletedSite or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deleted_web_app_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeletedSite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_diagnostics_operations.py deleted file mode 100644 index bafb68e7b58..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_diagnostics_operations.py +++ /dev/null @@ -1,1713 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DiagnosticsOperations(object): - """DiagnosticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list_hosting_environment_detector_responses( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DetectorResponsePaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hosting_environment_detector_responses.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} - - def get_hosting_environment_detector_response( - self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hosting_environment_detector_response.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} - - def list_site_detector_responses( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DetectorResponsePaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} - - def get_site_detector_response( - self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} - - def list_site_diagnostic_categories( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} - - def get_site_diagnostic_category( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AnalysisDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.AnalysisDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AnalysisDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector( - self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector( - self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} - - def list_site_detector_responses_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DetectorResponsePaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} - - def get_site_detector_response_slot( - self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} - - def list_site_diagnostic_categories_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} - - def get_site_diagnostic_category_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AnalysisDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.AnalysisDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AnalysisDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2019_08_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector_slot( - self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DetectorDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector_slot( - self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domain_registration_provider_operations.py deleted file mode 100644 index 0bc953a446e..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domain_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DomainRegistrationProviderOperations(object): - """DomainRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py deleted file mode 100644 index 8932a5abf48..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_domains_operations.py +++ /dev/null @@ -1,1090 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DomainsOperations(object): - """DomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def check_availability( - self, name=None, custom_headers=None, raw=False, **operation_config): - """Check if a domain is available for registration. - - Description for Check if a domain is available for registration. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainAvailabilityCheckResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DomainAvailabilityCheckResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.check_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainAvailabilityCheckResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all domains in a subscription. - - Description for Get all domains in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DomainPaged[~azure.mgmt.web.v2019_08_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} - - def get_control_center_sso_request( - self, custom_headers=None, raw=False, **operation_config): - """Generate a single sign-on request for the domain management portal. - - Description for Generate a single sign-on request for the domain - management portal. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainControlCenterSsoRequest or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DomainControlCenterSsoRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_control_center_sso_request.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainControlCenterSsoRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} - - def list_recommendations( - self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): - """Get domain name recommendations based on keywords. - - Description for Get domain name recommendations based on keywords. - - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NameIdentifier - :rtype: - ~azure.mgmt.web.v2019_08_01.models.NameIdentifierPaged[~azure.mgmt.web.v2019_08_01.models.NameIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommendations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DomainPaged[~azure.mgmt.web.v2019_08_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} - - def get( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - - def _create_or_update_initial( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'Domain') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.Domain - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Domain]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - domain=domain, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def delete( - self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): - """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 true to delete - the domain immediately. The default is false which - deletes the domain after 24 hours. - :type force_hard_delete_domain: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.DomainPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'DomainPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def list_ownership_identifiers( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DomainOwnershipIdentifier - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_ownership_identifiers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} - - def get_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def create_or_update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.create_or_update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def delete_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def renew( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_provider_operations.py deleted file mode 100644 index 5d65128919a..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_provider_operations.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProviderOperations(object): - """ProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def get_available_stacks( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Description for Get available application frameworks and their - versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStackResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2019_08_01.models.ApplicationStackResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks.metadata['url'] - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} - - def get_available_stacks_on_prem( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Description for Get available application frameworks and their - versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStackResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2019_08_01.models.ApplicationStackResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks_on_prem.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_recommendations_operations.py deleted file mode 100644 index cc1718ea088..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_recommendations_operations.py +++ /dev/null @@ -1,1070 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class RecommendationsOperations(object): - """RecommendationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """List all recommendations for a subscription. - - Description for List all recommendations for a subscription. - - :param featured: Specify true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} - - def reset_all_filters( - self, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for a subscription. - - Description for Reset all recommendation opt-out settings for a - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} - - def disable_recommendation_for_subscription( - self, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_subscription.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} - - def list_history_for_hosting_environment( - self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} - - def list_recommended_rules_for_hosting_environment( - self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 hosting_environment_name: Name of the app. - :type hosting_environment_name: str - :param featured: Specify true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} - - def disable_all_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_all_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} - - def reset_all_filters_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} - - def get_rule_details_by_hosting_environment( - self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} - - def disable_recommendation_for_hosting_environment( - self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_hosting_environment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} - - def list_history_for_web_app( - self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} - - def list_recommended_rules_for_web_app( - self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RecommendationPaged[~azure.mgmt.web.v2019_08_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} - - def disable_all_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_all_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} - - def reset_all_filters_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} - - def get_rule_details_by_web_app( - self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} - - def disable_recommendation_for_site( - self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_site.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_resource_health_metadata_operations.py deleted file mode 100644 index 50613aefaa9..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_resource_health_metadata_operations.py +++ /dev/null @@ -1,468 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourceHealthMetadataOperations(object): - """ResourceHealthMetadataOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the subscription. - - Description for List all ResourceHealthMetadata for all sites in the - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} - - def get_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} - - def list_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} - - def get_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_static_sites_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_static_sites_operations.py deleted file mode 100644 index a57504878d0..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_static_sites_operations.py +++ /dev/null @@ -1,1820 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class StaticSitesOperations(object): - """StaticSitesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all Static Sites for a subscription. - - Description for Get all Static Sites for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteARMResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} - - def get_static_sites_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteARMResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_static_sites_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} - - def get_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def create_or_update_static_site( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.StaticSiteARMResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def delete_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def update_static_site( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.StaticSitePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def list_static_site_users( - self, resource_group_name, name, authprovider, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteUserARMResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteUserARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteUserARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_users.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteUserARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} - - def delete_static_site_user( - self, resource_group_name, name, authprovider, userid, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} - - def update_static_site_user( - self, resource_group_name, name, authprovider, userid, kind=None, roles=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param roles: The roles for the static site user, in free-form string - format - :type roles: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteUserARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - static_site_user_envelope = models.StaticSiteUserARMResource(kind=kind, roles=roles) - - # Construct URL - url = self.update_static_site_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} - - def get_static_site_builds( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteBuildARMResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteBuildARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteBuildARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_static_site_builds.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteBuildARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} - - def get_static_site_build( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteBuildARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StaticSiteBuildARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteBuildARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} - - def delete_static_site_build( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} - - def create_or_update_static_site_build_function_app_settings( - self, resource_group_name, name, pr_id, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings'} - - def list_static_site_build_functions( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteFunctionOverviewARMResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_build_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} - - def list_static_site_build_function_app_settings( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 - :param pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_build_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} - - def create_or_update_static_site_function_app_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.create_or_update_static_site_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} - - def create_user_roles_invitation_link( - self, resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.StaticSiteUserInvitationRequestResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserInvitationResponseResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteUserInvitationResponseResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_user_roles_invitation_link.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} - - def list_static_site_custom_domains( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteCustomDomainOverviewARMResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteCustomDomainOverviewARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteCustomDomainOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_custom_domains.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteCustomDomainOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} - - def create_or_update_static_site_custom_domain( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteCustomDomainOverviewARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteCustomDomainOverviewARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - def delete_static_site_custom_domain( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - def validate_custom_domain_can_be_added_to_static_site( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate_custom_domain_can_be_added_to_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} - - def detach_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.detach_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} - - def list_static_site_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteFunctionOverviewARMResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} - - def list_static_site_function_app_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} - - def list_static_site_secrets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} - - def reset_static_site_api_key( - self, resource_group_name, name, reset_properties_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.StaticSiteResetPropertiesARMResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_static_site_api_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_top_level_domains_operations.py deleted file mode 100644 index 7d49b049304..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_top_level_domains_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TopLevelDomainsOperations(object): - """TopLevelDomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all top-level domains supported for registration. - - Description for Get all top-level domains supported for registration. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TopLevelDomain - :rtype: - ~azure.mgmt.web.v2019_08_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2019_08_01.models.TopLevelDomain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} - - def get( - self, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TopLevelDomain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.TopLevelDomain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TopLevelDomain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} - - def list_agreements( - self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): - """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 include_privacy: If true, then the list of - agreements will include agreements for domain privacy as well; - otherwise, false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TldLegalAgreement - :rtype: - ~azure.mgmt.web.v2019_08_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2019_08_01.models.TldLegalAgreement] - :raises: - :class:`DefaultErrorResponseException` - """ - agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_agreements.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py deleted file mode 100644 index 938d74d4cac..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_apps_operations.py +++ /dev/null @@ -1,27342 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class WebAppsOperations(object): - """WebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all apps for a subscription. - - Description for Get all apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} - - def list_by_resource_group( - self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - if include_slots is not None: - query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.Site - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def delete( - self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SitePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def analyze_custom_hostname( - self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} - - def apply_slot_config_to_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_config_to_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} - - def backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} - - def list_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2019_08_01.models.BackupItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} - - def get_backup_status( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def delete_backup( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def list_backup_status_secrets( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} - - - def _restore_initial( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} - - def get_basic_publishing_credentials_policies( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesCollection or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesCollection - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_basic_publishing_credentials_policies.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} - - def get_ftp_allowed( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ftp_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} - - def update_ftp_allowed( - self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): - """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 allow: true to allow access to a publishing - method; otherwise, false. - :type allow: bool - :param kind: Kind of resource. - :type kind: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) - - # Construct URL - url = self.update_ftp_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} - - def get_scm_allowed( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_scm_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} - - def update_scm_allowed( - self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): - """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 allow: true to allow access to a publishing - method; otherwise, false. - :type allow: bool - :param kind: Kind of resource. - :type kind: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) - - # Construct URL - url = self.update_scm_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} - - def list_configurations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} - - def update_application_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} - - def list_application_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} - - def update_auth_settings( - self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteAuthSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} - - def get_auth_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} - - def update_azure_storage_accounts( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) - - # Construct URL - url = self.update_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} - - def list_azure_storage_accounts( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} - - def update_backup_configuration( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def delete_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def get_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} - - def get_app_settings_key_vault_references( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyVaultReferenceCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyVaultReferenceCollection - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_app_settings_key_vault_references.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyVaultReferenceCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} - - def get_app_setting_key_vault_reference( - self, resource_group_name, name, app_setting_key, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyVaultReferenceResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyVaultReferenceResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_app_setting_key_vault_reference.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyVaultReferenceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} - - def update_connection_strings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2019_08_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} - - def list_connection_strings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_diagnostic_logs_config( - self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteLogsConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_metadata( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} - - def list_metadata( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} - - - def _list_publishing_credentials_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} - - def update_site_push_settings( - self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PushSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} - - def list_site_push_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} - - def list_slot_configuration_names( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def update_slot_configuration_names( - self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SlotConfigNamesResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def get_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def create_or_update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def list_configuration_snapshot_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} - - def get_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.recover_site_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} - - def get_container_logs_zip( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} - - def list_continuous_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2019_08_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} - - def get_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DeploymentPaged[~azure.mgmt.web.v2019_08_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} - - def get_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def create_deployment( - self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def delete_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def list_deployment_log( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} - - def discover_backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} - - def list_domain_ownership_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2019_08_01.models.IdentifierPaged[~azure.mgmt.web.v2019_08_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_initial( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_ms_deploy_operation_initial( - resource_group_name=resource_group_name, - name=name, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - def get_ms_deploy_log( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} - - def list_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} - - def get_functions_admin_token( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} - - def get_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - - def _create_function_initial( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_function( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_function_initial( - resource_group_name=resource_group_name, - name=name, - function_name=function_name, - function_envelope=function_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def delete_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def create_or_update_function_secret( - self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def delete_function_secret( - self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} - - def list_function_secrets( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} - - def list_host_keys( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} - - def list_sync_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} - - def sync_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} - - def create_or_update_host_secret( - self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def delete_host_secret( - self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2019_08_01.models.HostNameBindingPaged[~azure.mgmt.web.v2019_08_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} - - def get_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding( - self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.HostNameBinding - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def delete_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} - - def list_relay_service_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} - - def get_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def delete_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def list_instance_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteInstance - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SiteInstancePaged[~azure.mgmt.web.v2019_08_01.models.SiteInstance] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} - - def get_instance_info( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebSiteInstanceStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.WebSiteInstanceStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebSiteInstanceStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} - - def get_instance_ms_deploy_status( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - - def _create_instance_ms_deploy_operation_initial( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} - - def list_instance_processes( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} - - def get_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} - - def list_instance_process_modules( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module( - self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} - - def list_instance_process_threads( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} - - def is_cloneable( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} - - def list_site_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2019_08_01.models.BackupItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} - - def list_sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} - - - def _migrate_storage_initial( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_storage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_storage( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.StorageMigrationOptions - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StorageMigrationResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.StorageMigrationResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.StorageMigrationResponse]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_storage_initial( - subscription_name=subscription_name, - resource_group_name=resource_group_name, - name=name, - migration_options=migration_options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} - - - def _migrate_my_sql_initial( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_my_sql.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_my_sql( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.MigrateMySqlRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Operation or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Operation] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Operation]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_my_sql_initial( - resource_group_name=resource_group_name, - name=name, - migration_request_envelope=migration_request_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} - - def get_migrate_my_sql_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} - - def get_swift_virtual_network_connection( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def create_or_update_swift_virtual_network_connection( - self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_swift_virtual_network.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def update_swift_virtual_network_connection( - self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def list_network_features( - self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): - """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. This can either be "summary" or - "detailed". - :type view: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_network_features.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} - - def get_network_trace_operation( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} - - def stop_web_site_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} - - def get_network_traces( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} - - def get_network_trace_operation_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} - - def get_network_traces_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.generate_new_site_publishing_password.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} - - def list_perf_mon_counters( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2019_08_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2019_08_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} - - def get_site_php_error_log_flag( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} - - def list_premier_add_ons( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} - - def get_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PremierAddOn - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PremierAddOnPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def get_private_access( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def put_private_access_vnet( - self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PrivateAccess - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def list_processes( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} - - def get_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def delete_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def get_process_dump( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} - - def list_process_modules( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} - - def get_process_module( - self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} - - def list_public_certificates( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2019_08_01.models.PublicCertificatePaged[~azure.mgmt.web.v2019_08_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} - - def get_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate( - self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PublicCertificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets( - self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """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 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.v2019_08_01.models.PublishingProfileFormat - :param include_disaster_recovery_endpoints: Include the - DisasterRecover endpoint if true - :type include_disaster_recovery_endpoints: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} - - def reset_production_slot_config( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_production_slot_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} - - def restart( - self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} - - - def _restore_from_backup_blob_initial( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob( - self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_backup_blob_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.DeletedAppRestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_deleted_app_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} - - - def _restore_snapshot_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.SnapshotRestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_snapshot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} - - def list_site_extensions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} - - def get_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_initial( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._install_site_extension_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def delete_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _copy_production_slot_initial( - self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, **operation_config): - copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) - - # Construct URL - url = self.copy_production_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def copy_production_slot( - self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): - """Copies a deployment slot to another deployment slot of an app. - - Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. - :type target_slot: str - :param site_config: The site object which will be merged with the - source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2019_08_01.models.SiteConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._copy_production_slot_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - site_config=site_config, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} - - def list_slots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SitePaged[~azure.mgmt.web.v2019_08_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} - - def get_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - - def _create_or_update_slot_initial( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.Site - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def delete_slot( - self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """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 true if the App Service plan - will be empty after app deletion and you want to delete the empty App - Service plan. By default, the empty App Service plan is not deleted. - :type delete_empty_server_farm: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SitePatchResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def analyze_custom_hostname_slot( - self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} - - def apply_slot_configuration_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} - - def backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} - - def list_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2019_08_01.models.BackupItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} - - def get_backup_status_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def delete_backup_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def list_backup_status_secrets_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.BackupRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} - - - def _restore_slot_initial( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_slot_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} - - def list_configurations_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} - - def update_application_settings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} - - def list_application_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} - - def update_auth_settings_slot( - self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteAuthSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} - - def get_auth_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} - - def update_azure_storage_accounts_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2019_08_01.models.AzureStorageInfoValue] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) - - # Construct URL - url = self.update_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} - - def list_azure_storage_accounts_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} - - def update_backup_configuration_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def delete_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def get_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} - - def update_connection_strings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2019_08_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} - - def list_connection_strings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_diagnostic_logs_config_slot( - self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteLogsConfig - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_metadata_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} - - def list_metadata_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} - - - def _list_publishing_credentials_slot_initial( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} - - def update_site_push_settings_slot( - self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PushSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} - - def list_site_push_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} - - def get_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def create_or_update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def list_configuration_snapshot_info_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} - - def get_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.recover_site_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} - - def get_container_logs_zip_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} - - def list_continuous_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2019_08_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} - - def get_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2019_08_01.models.DeploymentPaged[~azure.mgmt.web.v2019_08_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} - - def get_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def create_deployment_slot( - self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def delete_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def list_deployment_log_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} - - def discover_backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} - - def list_domain_ownership_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2019_08_01.models.IdentifierPaged[~azure.mgmt.web.v2019_08_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation_slot( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_ms_deploy_operation_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - def get_ms_deploy_log_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} - - def list_instance_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} - - def get_functions_admin_token_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} - - def get_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - - def _create_instance_function_slot_initial( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_function_slot( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def delete_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def create_or_update_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} - - def list_function_secrets_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} - - def list_host_keys_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} - - def list_sync_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} - - def sync_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} - - def create_or_update_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2019_08_01.models.HostNameBindingPaged[~azure.mgmt.web.v2019_08_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} - - def get_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding_slot( - self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.HostNameBinding - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def delete_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def get_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} - - def list_relay_service_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} - - def get_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def delete_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def list_instance_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteInstance - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SiteInstancePaged[~azure.mgmt.web.v2019_08_01.models.SiteInstance] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} - - def get_instance_info_slot( - self, resource_group_name, name, instance_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebSiteInstanceStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.WebSiteInstanceStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebSiteInstanceStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} - - def get_instance_ms_deploy_status_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - - def _create_instance_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation_slot( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_processes_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} - - def get_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_process_modules_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def list_instance_process_threads_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} - - def is_cloneable_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} - - def list_site_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2019_08_01.models.BackupItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} - - def list_sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} - - def get_migrate_my_sql_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} - - def get_swift_virtual_network_connection_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def create_or_update_swift_virtual_network_connection_slot( - self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_swift_virtual_network_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def update_swift_virtual_network_connection_slot( - self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def list_network_features_slot( - self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): - """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. This can either be "summary" or - "detailed". - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_network_features_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} - - def get_network_trace_operation_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} - - def stop_web_site_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} - - def get_network_traces_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} - - def get_network_trace_operation_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def get_network_traces_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.generate_new_site_publishing_password_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} - - def list_perf_mon_counters_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2019_08_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2019_08_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} - - def get_site_php_error_log_flag_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} - - def list_premier_add_ons_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} - - def get_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PremierAddOn - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PremierAddOnPatchResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def get_private_access_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def put_private_access_vnet_slot( - self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PrivateAccess - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def get_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """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: - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.PrivateEndpointConnectionResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _approve_or_reject_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.approve_or_reject_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - if response.status_code == 202: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def approve_or_reject_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2019_08_01.models.PrivateLinkConnectionState - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnectionResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.PrivateEndpointConnectionResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.PrivateEndpointConnectionResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - kind=kind, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 202: - deserialized = self._deserialize('object', response) - if response.status_code == 204: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_private_endpoint_connection_initial( - resource_group_name=resource_group_name, - name=name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def get_private_link_resources( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PrivateLinkResourcesWrapper - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_link_resources.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} - - def list_processes_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} - - def get_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def delete_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def get_process_dump_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} - - def list_process_modules_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} - - def get_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} - - def list_public_certificates_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2019_08_01.models.PublicCertificatePaged[~azure.mgmt.web.v2019_08_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} - - def get_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate_slot( - self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.PublicCertificate - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets_slot( - self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """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 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.v2019_08_01.models.PublishingProfileFormat - :param include_disaster_recovery_endpoints: Include the - DisasterRecover endpoint if true - :type include_disaster_recovery_endpoints: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} - - def reset_slot_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} - - def restart_slot( - self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} - - - def _restore_from_backup_blob_slot_initial( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_backup_blob_slot_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.DeletedAppRestoreRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_deleted_app_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} - - - def _restore_snapshot_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.SnapshotRestoreRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_snapshot_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} - - def list_site_extensions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} - - def get_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_slot_initial( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._install_site_extension_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def delete_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _copy_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, **operation_config): - copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) - - # Construct URL - url = self.copy_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def copy_slot_slot( - self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): - """Copies a deployment slot to another deployment slot of an app. - - Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. - :type target_slot: str - :param site_config: The site object which will be merged with the - source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2019_08_01.models.SiteConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._copy_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - site_config=site_config, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - copy_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} - - def list_slot_differences_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SlotDifferencePaged[~azure.mgmt.web.v2019_08_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} - - - def _swap_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._swap_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} - - def list_snapshots_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SnapshotPaged[~azure.mgmt.web.v2019_08_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} - - def list_snapshots_from_dr_secondary_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SnapshotPaged[~azure.mgmt.web.v2019_08_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} - - def get_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - - def _create_or_update_source_control_slot_initial( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def delete_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def start_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} - - - def _start_network_trace_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} - - def stop_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} - - def stop_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} - - def sync_repository_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_repository_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} - - def sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} - - def list_triggered_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2019_08_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} - - def get_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def run_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.run_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} - - def list_usages_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} - - def list_vnet_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} - - def get_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2019_08_01.models.WebJobPaged[~azure.mgmt.web.v2019_08_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} - - def get_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} - - def list_slot_differences_from_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SlotDifferencePaged[~azure.mgmt.web.v2019_08_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_from_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} - - - def _swap_slot_with_production_initial( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_with_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_with_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._swap_slot_with_production_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} - - def list_snapshots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SnapshotPaged[~azure.mgmt.web.v2019_08_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} - - def list_snapshots_from_dr_secondary( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SnapshotPaged[~azure.mgmt.web.v2019_08_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} - - def get_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - - def _create_or_update_source_control_initial( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): - """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.v2019_08_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def delete_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def start( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} - - - def _start_network_trace_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} - - def stop( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} - - def stop_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} - - def sync_repository( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_repository.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} - - def sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} - - def list_triggered_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2019_08_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} - - def get_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history( - self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} - - def run_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.run_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} - - def list_vnet_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2019_08_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} - - def get_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2019_08_01.models.WebJobPaged[~azure.mgmt.web.v2019_08_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} - - def get_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_site_management_client_operations.py deleted file mode 100644 index 236763bb809..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/operations/_web_site_management_client_operations.py +++ /dev/null @@ -1,1061 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -from .. import models -import uuid - - -class WebSiteManagementClientOperationsMixin(object): - - def get_publishing_user( - self, custom_headers=None, raw=False, **operation_config): - """Gets publishing user. - - Description for Gets publishing user. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def update_publishing_user( - self, user_details, custom_headers=None, raw=False, **operation_config): - """Updates publishing user. - - Description for Updates publishing user. - - :param user_details: Details of publishing user - :type user_details: ~azure.mgmt.web.v2019_08_01.models.User - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(user_details, 'User') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def list_source_controls( - self, custom_headers=None, raw=False, **operation_config): - """Gets the source controls available for Azure websites. - - Description for Gets the source controls available for Azure websites. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SourceControl - :rtype: - ~azure.mgmt.web.v2019_08_01.models.SourceControlPaged[~azure.mgmt.web.v2019_08_01.models.SourceControl] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_source_controls.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} - - def get_source_control( - self, source_control_type, custom_headers=None, raw=False, **operation_config): - """Gets source control token. - - Description for Gets source control token. - - :param source_control_type: Type of source control - :type source_control_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def update_source_control( - self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.SourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_message, 'SourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def list_billing_meters( - self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BillingMeter - :rtype: - ~azure.mgmt.web.v2019_08_01.models.BillingMeterPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeter] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_billing_meters.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} - - def check_name_availability( - self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): - """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. 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.v2019_08_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. - :type is_fqdn: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) - - # Construct URL - url = self.check_name_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceNameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} - - def get_subscription_deployment_locations( - self, custom_headers=None, raw=False, **operation_config): - """Gets list of available geo regions plus ministamps. - - Description for Gets list of available geo regions plus ministamps. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_subscription_deployment_locations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeploymentLocations', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} - - def list_geo_regions( - self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values - include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' - :type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName - :param linux_workers_enabled: Specify true if you want to - filter to only regions that support Linux workers. - :type linux_workers_enabled: bool - :param xenon_workers_enabled: Specify true if you want to - filter to only regions that support Xenon workers. - :type xenon_workers_enabled: bool - :param linux_dynamic_workers_enabled: Specify true if you - want to filter to only regions that support Linux Consumption Workers. - :type linux_dynamic_workers_enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GeoRegion - :rtype: - ~azure.mgmt.web.v2019_08_01.models.GeoRegionPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegion] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_geo_regions.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} - - def list_site_identifiers_assigned_to_host_name( - self, name=None, custom_headers=None, raw=False, **operation_config): - """List all apps that are assigned to a hostname. - - Description for List all apps that are assigned to a hostname. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2019_08_01.models.IdentifierPaged[~azure.mgmt.web.v2019_08_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} - - def list_premier_add_on_offers( - self, custom_headers=None, raw=False, **operation_config): - """List all premier add-on offers. - - Description for List all premier add-on offers. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PremierAddOnOffer - :rtype: - ~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOffer] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_premier_add_on_offers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} - - def list_skus( - self, custom_headers=None, raw=False, **operation_config): - """List all SKUs. - - Description for List all SKUs. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_skus.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SkuInfos', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} - - def verify_hosting_environment_vnet( - self, parameters, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.VnetParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetValidationFailureDetails or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_hosting_environment_vnet.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VnetParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetValidationFailureDetails', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} - - def move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} - - def validate( - self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): - """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.v2019_08_01.models.ValidateRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_request, 'ValidateRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidateResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} - - def validate_move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.validate_move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2019_08_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py deleted file mode 100644 index cdf4ed97614..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/_web_site_management_client.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import WebSiteManagementClientOperationsMixin -from .operations import AppServiceCertificateOrdersOperations -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 ProviderOperations -from .operations import RecommendationsOperations -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, SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar app_service_certificate_orders: AppServiceCertificateOrders operations - :vartype app_service_certificate_orders: azure.mgmt.web.v2020_06_01.operations.AppServiceCertificateOrdersOperations - :ivar certificate_registration_provider: CertificateRegistrationProvider operations - :vartype certificate_registration_provider: azure.mgmt.web.v2020_06_01.operations.CertificateRegistrationProviderOperations - :ivar domains: Domains operations - :vartype domains: azure.mgmt.web.v2020_06_01.operations.DomainsOperations - :ivar top_level_domains: TopLevelDomains operations - :vartype top_level_domains: azure.mgmt.web.v2020_06_01.operations.TopLevelDomainsOperations - :ivar domain_registration_provider: DomainRegistrationProvider operations - :vartype domain_registration_provider: azure.mgmt.web.v2020_06_01.operations.DomainRegistrationProviderOperations - :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.web.v2020_06_01.operations.CertificatesOperations - :ivar deleted_web_apps: DeletedWebApps operations - :vartype deleted_web_apps: azure.mgmt.web.v2020_06_01.operations.DeletedWebAppsOperations - :ivar diagnostics: Diagnostics operations - :vartype diagnostics: azure.mgmt.web.v2020_06_01.operations.DiagnosticsOperations - :ivar provider: Provider operations - :vartype provider: azure.mgmt.web.v2020_06_01.operations.ProviderOperations - :ivar recommendations: Recommendations operations - :vartype recommendations: azure.mgmt.web.v2020_06_01.operations.RecommendationsOperations - :ivar web_apps: WebApps operations - :vartype web_apps: azure.mgmt.web.v2020_06_01.operations.WebAppsOperations - :ivar static_sites: StaticSites operations - :vartype static_sites: azure.mgmt.web.v2020_06_01.operations.StaticSitesOperations - :ivar app_service_environments: AppServiceEnvironments operations - :vartype app_service_environments: azure.mgmt.web.v2020_06_01.operations.AppServiceEnvironmentsOperations - :ivar app_service_plans: AppServicePlans operations - :vartype app_service_plans: azure.mgmt.web.v2020_06_01.operations.AppServicePlansOperations - :ivar resource_health_metadata: ResourceHealthMetadata operations - :vartype resource_health_metadata: azure.mgmt.web.v2020_06_01.operations.ResourceHealthMetadataOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-06-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( - 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.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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py deleted file mode 100644 index 157dfd37127..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/__init__.py +++ /dev/null @@ -1,1135 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -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 ApiManagementConfig - from ._models_py3 import ApplicationLogsConfig - from ._models_py3 import ApplicationStack - from ._models_py3 import ApplicationStackResource - from ._models_py3 import AppRegistration - from ._models_py3 import AppServiceCertificate - from ._models_py3 import AppServiceCertificateOrder - from ._models_py3 import AppServiceCertificateOrderPatchResource - from ._models_py3 import AppServiceCertificatePatchResource - from ._models_py3 import AppServiceCertificateResource - from ._models_py3 import AppServiceEnvironment - from ._models_py3 import AppServiceEnvironmentPatchResource - from ._models_py3 import AppServiceEnvironmentResource - from ._models_py3 import AppServicePlan - from ._models_py3 import AppServicePlanPatchResource - from ._models_py3 import ArmIdWrapper - 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 AzureStorageInfoValue - from ._models_py3 import AzureStoragePropertyDictionaryResource - from ._models_py3 import AzureTableStorageApplicationLogsConfig - from ._models_py3 import BackupItem - from ._models_py3 import BackupRequest - from ._models_py3 import BackupSchedule - from ._models_py3 import BillingMeter - from ._models_py3 import BlobStorageTokenStore - from ._models_py3 import Capability - from ._models_py3 import Certificate - from ._models_py3 import CertificateDetails - from ._models_py3 import CertificateEmail - from ._models_py3 import CertificateOrderAction - from ._models_py3 import CertificatePatchResource - from ._models_py3 import ClientRegistration - from ._models_py3 import CloningInfo - from ._models_py3 import ConnectionStringDictionary - from ._models_py3 import ConnStringInfo - from ._models_py3 import ConnStringValueTypePair - 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 CookieExpiration - from ._models_py3 import CorsSettings - from ._models_py3 import CsmCopySlotEntity - from ._models_py3 import CsmMoveResourceEnvelope - 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 CustomHostnameAnalysisResult - from ._models_py3 import CustomOpenIdConnectProvider - from ._models_py3 import DatabaseBackupSetting - from ._models_py3 import DataSource - from ._models_py3 import DataTableResponseColumn - from ._models_py3 import DataTableResponseObject - from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException - from ._models_py3 import DefaultErrorResponseError - from ._models_py3 import DefaultErrorResponseErrorDetailsItem - from ._models_py3 import DeletedAppRestoreRequest - from ._models_py3 import DeletedSite - from ._models_py3 import Deployment - 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 DiagnosticAnalysis - from ._models_py3 import DiagnosticCategory - from ._models_py3 import DiagnosticData - 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 DomainControlCenterSsoRequest - from ._models_py3 import DomainOwnershipIdentifier - 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 FunctionEnvelope - from ._models_py3 import FunctionSecrets - from ._models_py3 import GeoRegion - from ._models_py3 import GitHub - from ._models_py3 import GlobalCsmSkuDescription - from ._models_py3 import GlobalValidation - from ._models_py3 import Google - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentDeploymentInfo - from ._models_py3 import HostingEnvironmentDiagnostics - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostKeys - from ._models_py3 import HostName - from ._models_py3 import HostNameBinding - from ._models_py3 import HostNameSslState - from ._models_py3 import HttpLogsConfig - from ._models_py3 import HttpSettings - from ._models_py3 import HttpSettingsRoutes - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import HybridConnectionLimits - from ._models_py3 import Identifier - from ._models_py3 import IdentityProviders - from ._models_py3 import InboundEnvironmentEndpoint - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import JwtClaimChecks - from ._models_py3 import KeyInfo - from ._models_py3 import LocalizableString - from ._models_py3 import Login - from ._models_py3 import LoginRoutes - from ._models_py3 import LoginScopes - from ._models_py3 import LogSpecification - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models_py3 import MetricAvailability - from ._models_py3 import MetricSpecification - from ._models_py3 import MigrateMySqlRequest - from ._models_py3 import MigrateMySqlStatus - from ._models_py3 import MSDeploy - from ._models_py3 import MSDeployLog - from ._models_py3 import MSDeployLogEntry - from ._models_py3 import MSDeployStatus - from ._models_py3 import NameIdentifier - from ._models_py3 import NameValuePair - from ._models_py3 import NetworkAccessControlEntry - 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 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 PremierAddOnPatchResource - from ._models_py3 import PrivateAccess - from ._models_py3 import PrivateAccessSubnet - from ._models_py3 import PrivateAccessVirtualNetwork - from ._models_py3 import PrivateEndpointConnectionResource - 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 ProcessModuleInfo - from ._models_py3 import ProcessThreadInfo - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PublicCertificate - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import Recommendation - from ._models_py3 import RecommendationRule - from ._models_py3 import ReissueCertificateOrderRequest - from ._models_py3 import RelayServiceConnectionEntity - from ._models_py3 import Rendering - from ._models_py3 import RenewCertificateOrderRequest - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceHealthMetadata - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceNameAvailability - from ._models_py3 import ResourceNameAvailabilityRequest - from ._models_py3 import ResponseMetaData - from ._models_py3 import RestoreRequest - 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 SiteConfigResource - from ._models_py3 import SiteConfigurationSnapshotInfo - from ._models_py3 import SiteExtensionInfo - 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 SkuInfos - from ._models_py3 import SlotConfigNamesResource - from ._models_py3 import SlotDifference - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import Snapshot - from ._models_py3 import SnapshotRecoverySource - from ._models_py3 import SnapshotRestoreRequest - from ._models_py3 import Solution - from ._models_py3 import SourceControl - from ._models_py3 import StackMajorVersion - from ._models_py3 import StackMinorVersion - from ._models_py3 import StampCapacity - from ._models_py3 import StaticSiteARMResource - from ._models_py3 import StaticSiteBuildARMResource - from ._models_py3 import StaticSiteBuildProperties - from ._models_py3 import StaticSiteCustomDomainOverviewARMResource - from ._models_py3 import StaticSiteFunctionOverviewARMResource - from ._models_py3 import StaticSitePatchResource - from ._models_py3 import StaticSiteResetPropertiesARMResource - from ._models_py3 import StaticSitesWorkflowPreview - from ._models_py3 import StaticSitesWorkflowPreviewRequest - from ._models_py3 import StaticSiteUserARMResource - from ._models_py3 import StaticSiteUserInvitationRequestResource - from ._models_py3 import StaticSiteUserInvitationResponseResource - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import StorageMigrationOptions - from ._models_py3 import StorageMigrationResponse - from ._models_py3 import StringDictionary - from ._models_py3 import SwiftVirtualNetwork - from ._models_py3 import TldLegalAgreement - from ._models_py3 import TokenStore - from ._models_py3 import TopLevelDomain - from ._models_py3 import TopLevelDomainAgreementOption - from ._models_py3 import TriggeredJobHistory - from ._models_py3 import TriggeredJobRun - from ._models_py3 import TriggeredWebJob - from ._models_py3 import Twitter - from ._models_py3 import TwitterRegistration - from ._models_py3 import Usage - 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 WebJob - from ._models_py3 import WebSiteInstanceStatus - from ._models_py3 import WorkerPool - from ._models_py3 import WorkerPoolResource -except (SyntaxError, ImportError): - from ._models import AbnormalTimePeriod - from ._models import Address - from ._models import AddressResponse - from ._models import AllowedAudiencesValidation - from ._models import AnalysisData - from ._models import AnalysisDefinition - from ._models import ApiDefinitionInfo - from ._models import ApiManagementConfig - from ._models import ApplicationLogsConfig - from ._models import ApplicationStack - from ._models import ApplicationStackResource - from ._models import AppRegistration - from ._models import AppServiceCertificate - from ._models import AppServiceCertificateOrder - from ._models import AppServiceCertificateOrderPatchResource - from ._models import AppServiceCertificatePatchResource - from ._models import AppServiceCertificateResource - from ._models import AppServiceEnvironment - from ._models import AppServiceEnvironmentPatchResource - from ._models import AppServiceEnvironmentResource - from ._models import AppServicePlan - from ._models import AppServicePlanPatchResource - from ._models import ArmIdWrapper - from ._models import AuthPlatform - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import AzureActiveDirectory - from ._models import AzureActiveDirectoryLogin - from ._models import AzureActiveDirectoryRegistration - from ._models import AzureActiveDirectoryValidation - from ._models import AzureBlobStorageApplicationLogsConfig - from ._models import AzureBlobStorageHttpLogsConfig - from ._models import AzureStorageInfoValue - from ._models import AzureStoragePropertyDictionaryResource - from ._models import AzureTableStorageApplicationLogsConfig - from ._models import BackupItem - from ._models import BackupRequest - from ._models import BackupSchedule - from ._models import BillingMeter - from ._models import BlobStorageTokenStore - from ._models import Capability - from ._models import Certificate - from ._models import CertificateDetails - from ._models import CertificateEmail - from ._models import CertificateOrderAction - from ._models import CertificatePatchResource - from ._models import ClientRegistration - from ._models import CloningInfo - from ._models import ConnectionStringDictionary - from ._models import ConnStringInfo - from ._models import ConnStringValueTypePair - from ._models import Contact - from ._models import ContainerCpuStatistics - from ._models import ContainerCpuUsage - from ._models import ContainerInfo - from ._models import ContainerMemoryStatistics - from ._models import ContainerNetworkInterfaceStatistics - from ._models import ContainerThrottlingData - from ._models import ContinuousWebJob - from ._models import CookieExpiration - from ._models import CorsSettings - from ._models import CsmCopySlotEntity - from ._models import CsmMoveResourceEnvelope - from ._models import CsmOperationDescription - from ._models import CsmOperationDescriptionProperties - from ._models import CsmOperationDisplay - from ._models import CsmPublishingCredentialsPoliciesCollection - from ._models import CsmPublishingCredentialsPoliciesEntity - from ._models import CsmPublishingProfileOptions - from ._models import CsmSlotEntity - from ._models import CsmUsageQuota - from ._models import CustomHostnameAnalysisResult - from ._models import CustomOpenIdConnectProvider - from ._models import DatabaseBackupSetting - from ._models import DataSource - from ._models import DataTableResponseColumn - from ._models import DataTableResponseObject - from ._models import DefaultErrorResponse, DefaultErrorResponseException - from ._models import DefaultErrorResponseError - from ._models import DefaultErrorResponseErrorDetailsItem - from ._models import DeletedAppRestoreRequest - from ._models import DeletedSite - from ._models import Deployment - from ._models import DeploymentLocations - from ._models import DetectorAbnormalTimePeriod - from ._models import DetectorDefinition - from ._models import DetectorInfo - from ._models import DetectorResponse - from ._models import DiagnosticAnalysis - from ._models import DiagnosticCategory - from ._models import DiagnosticData - from ._models import DiagnosticDetectorResponse - from ._models import DiagnosticMetricSample - from ._models import DiagnosticMetricSet - from ._models import Dimension - from ._models import Domain - from ._models import DomainAvailabilityCheckResult - from ._models import DomainControlCenterSsoRequest - from ._models import DomainOwnershipIdentifier - from ._models import DomainPatchResource - from ._models import DomainPurchaseConsent - from ._models import DomainRecommendationSearchParameters - from ._models import EnabledConfig - from ._models import EndpointDependency - from ._models import EndpointDetail - from ._models import ErrorEntity - from ._models import Experiments - from ._models import Facebook - from ._models import FileSystemApplicationLogsConfig - from ._models import FileSystemHttpLogsConfig - from ._models import FileSystemTokenStore - from ._models import ForwardProxy - from ._models import FunctionEnvelope - from ._models import FunctionSecrets - from ._models import GeoRegion - from ._models import GitHub - from ._models import GlobalCsmSkuDescription - from ._models import GlobalValidation - from ._models import Google - from ._models import HandlerMapping - from ._models import HostingEnvironmentDeploymentInfo - from ._models import HostingEnvironmentDiagnostics - from ._models import HostingEnvironmentProfile - from ._models import HostKeys - from ._models import HostName - from ._models import HostNameBinding - from ._models import HostNameSslState - from ._models import HttpLogsConfig - from ._models import HttpSettings - from ._models import HttpSettingsRoutes - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import HybridConnectionLimits - from ._models import Identifier - from ._models import IdentityProviders - from ._models import InboundEnvironmentEndpoint - from ._models import IpSecurityRestriction - from ._models import JwtClaimChecks - from ._models import KeyInfo - from ._models import LocalizableString - from ._models import Login - from ._models import LoginRoutes - from ._models import LoginScopes - from ._models import LogSpecification - from ._models import ManagedServiceIdentity - from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models import MetricAvailability - from ._models import MetricSpecification - from ._models import MigrateMySqlRequest - from ._models import MigrateMySqlStatus - from ._models import MSDeploy - from ._models import MSDeployLog - from ._models import MSDeployLogEntry - from ._models import MSDeployStatus - from ._models import NameIdentifier - from ._models import NameValuePair - from ._models import NetworkAccessControlEntry - from ._models import NetworkFeatures - from ._models import NetworkTrace - from ._models import Nonce - from ._models import OpenIdConnectClientCredential - from ._models import OpenIdConnectConfig - from ._models import OpenIdConnectLogin - from ._models import OpenIdConnectRegistration - from ._models import Operation - from ._models import OutboundEnvironmentEndpoint - from ._models import PerfMonResponse - from ._models import PerfMonSample - from ._models import PerfMonSet - from ._models import PremierAddOn - from ._models import PremierAddOnOffer - from ._models import PremierAddOnPatchResource - from ._models import PrivateAccess - from ._models import PrivateAccessSubnet - from ._models import PrivateAccessVirtualNetwork - from ._models import PrivateEndpointConnectionResource - from ._models import PrivateLinkConnectionApprovalRequestResource - from ._models import PrivateLinkConnectionState - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourceProperties - from ._models import PrivateLinkResourcesWrapper - from ._models import ProcessInfo - from ._models import ProcessModuleInfo - from ._models import ProcessThreadInfo - from ._models import ProxyOnlyResource - from ._models import PublicCertificate - from ._models import PushSettings - from ._models import RampUpRule - from ._models import Recommendation - from ._models import RecommendationRule - from ._models import ReissueCertificateOrderRequest - from ._models import RelayServiceConnectionEntity - from ._models import Rendering - from ._models import RenewCertificateOrderRequest - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceHealthMetadata - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceNameAvailability - from ._models import ResourceNameAvailabilityRequest - from ._models import ResponseMetaData - from ._models import RestoreRequest - from ._models import ServiceSpecification - from ._models import Site - from ._models import SiteAuthSettings - from ._models import SiteAuthSettingsV2 - from ._models import SiteCloneability - from ._models import SiteCloneabilityCriterion - from ._models import SiteConfig - from ._models import SiteConfigResource - from ._models import SiteConfigurationSnapshotInfo - from ._models import SiteExtensionInfo - from ._models import SiteLimits - from ._models import SiteLogsConfig - from ._models import SiteMachineKey - from ._models import SitePatchResource - from ._models import SitePhpErrorLogFlag - from ._models import SiteSeal - from ._models import SiteSealRequest - from ._models import SiteSourceControl - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SkuInfo - from ._models import SkuInfos - from ._models import SlotConfigNamesResource - from ._models import SlotDifference - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import Snapshot - from ._models import SnapshotRecoverySource - from ._models import SnapshotRestoreRequest - from ._models import Solution - from ._models import SourceControl - from ._models import StackMajorVersion - from ._models import StackMinorVersion - from ._models import StampCapacity - from ._models import StaticSiteARMResource - from ._models import StaticSiteBuildARMResource - from ._models import StaticSiteBuildProperties - from ._models import StaticSiteCustomDomainOverviewARMResource - from ._models import StaticSiteFunctionOverviewARMResource - from ._models import StaticSitePatchResource - from ._models import StaticSiteResetPropertiesARMResource - from ._models import StaticSitesWorkflowPreview - from ._models import StaticSitesWorkflowPreviewRequest - from ._models import StaticSiteUserARMResource - from ._models import StaticSiteUserInvitationRequestResource - from ._models import StaticSiteUserInvitationResponseResource - from ._models import StatusCodesBasedTrigger - from ._models import StorageMigrationOptions - from ._models import StorageMigrationResponse - from ._models import StringDictionary - from ._models import SwiftVirtualNetwork - from ._models import TldLegalAgreement - from ._models import TokenStore - from ._models import TopLevelDomain - from ._models import TopLevelDomainAgreementOption - from ._models import TriggeredJobHistory - from ._models import TriggeredJobRun - from ._models import TriggeredWebJob - from ._models import Twitter - from ._models import TwitterRegistration - from ._models import Usage - from ._models import User - from ._models import ValidateRequest - from ._models import ValidateResponse - from ._models import ValidateResponseError - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VirtualIPMapping - from ._models import VirtualNetworkProfile - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetParameters - from ._models import VnetRoute - from ._models import VnetValidationFailureDetails - from ._models import VnetValidationTestFailure - from ._models import WebAppCollection - from ._models import WebJob - from ._models import WebSiteInstanceStatus - from ._models import WorkerPool - from ._models import WorkerPoolResource -from ._paged_models import AnalysisDefinitionPaged -from ._paged_models import ApplicationStackResourcePaged -from ._paged_models import AppServiceCertificateOrderPaged -from ._paged_models import AppServiceCertificateResourcePaged -from ._paged_models import AppServiceEnvironmentResourcePaged -from ._paged_models import AppServicePlanPaged -from ._paged_models import BackupItemPaged -from ._paged_models import BillingMeterPaged -from ._paged_models import CertificatePaged -from ._paged_models import ContinuousWebJobPaged -from ._paged_models import CsmOperationDescriptionPaged -from ._paged_models import CsmUsageQuotaPaged -from ._paged_models import DeletedSitePaged -from ._paged_models import DeploymentPaged -from ._paged_models import DetectorDefinitionPaged -from ._paged_models import DetectorResponsePaged -from ._paged_models import DiagnosticCategoryPaged -from ._paged_models import DomainOwnershipIdentifierPaged -from ._paged_models import DomainPaged -from ._paged_models import FunctionEnvelopePaged -from ._paged_models import GeoRegionPaged -from ._paged_models import HostNameBindingPaged -from ._paged_models import HybridConnectionPaged -from ._paged_models import IdentifierPaged -from ._paged_models import InboundEnvironmentEndpointPaged -from ._paged_models import NameIdentifierPaged -from ._paged_models import OutboundEnvironmentEndpointPaged -from ._paged_models import PerfMonResponsePaged -from ._paged_models import PremierAddOnOfferPaged -from ._paged_models import ProcessInfoPaged -from ._paged_models import ProcessModuleInfoPaged -from ._paged_models import ProcessThreadInfoPaged -from ._paged_models import PublicCertificatePaged -from ._paged_models import RecommendationPaged -from ._paged_models import ResourceHealthMetadataPaged -from ._paged_models import ResourceMetricDefinitionPaged -from ._paged_models import SiteConfigResourcePaged -from ._paged_models import SiteConfigurationSnapshotInfoPaged -from ._paged_models import SiteExtensionInfoPaged -from ._paged_models import SitePaged -from ._paged_models import SkuInfoPaged -from ._paged_models import SlotDifferencePaged -from ._paged_models import SnapshotPaged -from ._paged_models import SourceControlPaged -from ._paged_models import StampCapacityPaged -from ._paged_models import StaticSiteARMResourcePaged -from ._paged_models import StaticSiteBuildARMResourcePaged -from ._paged_models import StaticSiteCustomDomainOverviewARMResourcePaged -from ._paged_models import StaticSiteFunctionOverviewARMResourcePaged -from ._paged_models import StaticSiteUserARMResourcePaged -from ._paged_models import StrPaged -from ._paged_models import TldLegalAgreementPaged -from ._paged_models import TopLevelDomainPaged -from ._paged_models import TriggeredJobHistoryPaged -from ._paged_models import TriggeredWebJobPaged -from ._paged_models import UsagePaged -from ._paged_models import WebJobPaged -from ._paged_models import WebSiteInstanceStatusPaged -from ._paged_models import WorkerPoolResourcePaged -from ._web_site_management_client_enums import ( - KeyVaultSecretStatus, - CertificateProductType, - ProvisioningState, - CertificateOrderStatus, - CertificateOrderActionType, - RouteType, - ManagedServiceIdentityType, - IpFilterTag, - AutoHealActionType, - ConnectionStringType, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - FtpsState, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - ClientCertMode, - RedundancyMode, - StatusOptions, - DomainStatus, - AzureResourceType, - CustomHostNameDnsRecordType, - HostNameType, - DnsType, - DomainType, - HostingEnvironmentStatus, - LoadBalancingMode, - ComputeModeOptions, - WorkerSizeOptions, - AccessControlEntryAction, - OperationStatus, - IssueType, - SolutionType, - RenderingType, - ResourceScopeType, - NotificationLevel, - Channels, - AppServicePlanRestrictions, - InAvailabilityReasonType, - CheckNameResourceTypes, - ValidateResourceTypes, - LogLevel, - AzureStorageType, - AzureStorageState, - BackupItemStatus, - DatabaseType, - FrequencyUnit, - ContinuousWebJobStatus, - WebJobType, - CookieExpirationConvention, - PublishingProfileFormat, - DnsVerificationTestResult, - ClientCredentialMethod, - ForwardProxyConvention, - UnauthenticatedClientActionV2, - MSDeployLogEntryType, - MSDeployProvisioningState, - MySqlMigrationType, - PublicCertificateLocation, - BackupRestoreOperationType, - UnauthenticatedClientAction, - BuiltInAuthenticationProvider, - CloneAbilityResult, - SiteExtensionType, - TriggeredWebJobStatus, - SiteRuntimeState, - BuildStatus, - TriggerTypes, - SkuName, -) - -__all__ = [ - 'AbnormalTimePeriod', - 'Address', - 'AddressResponse', - 'AllowedAudiencesValidation', - 'AnalysisData', - 'AnalysisDefinition', - 'ApiDefinitionInfo', - 'ApiManagementConfig', - 'ApplicationLogsConfig', - 'ApplicationStack', - 'ApplicationStackResource', - 'AppRegistration', - 'AppServiceCertificate', - 'AppServiceCertificateOrder', - 'AppServiceCertificateOrderPatchResource', - 'AppServiceCertificatePatchResource', - 'AppServiceCertificateResource', - 'AppServiceEnvironment', - 'AppServiceEnvironmentPatchResource', - 'AppServiceEnvironmentResource', - 'AppServicePlan', - 'AppServicePlanPatchResource', - 'ArmIdWrapper', - 'AuthPlatform', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'AzureActiveDirectory', - 'AzureActiveDirectoryLogin', - 'AzureActiveDirectoryRegistration', - 'AzureActiveDirectoryValidation', - 'AzureBlobStorageApplicationLogsConfig', - 'AzureBlobStorageHttpLogsConfig', - 'AzureStorageInfoValue', - 'AzureStoragePropertyDictionaryResource', - 'AzureTableStorageApplicationLogsConfig', - 'BackupItem', - 'BackupRequest', - 'BackupSchedule', - 'BillingMeter', - 'BlobStorageTokenStore', - 'Capability', - 'Certificate', - 'CertificateDetails', - 'CertificateEmail', - 'CertificateOrderAction', - 'CertificatePatchResource', - 'ClientRegistration', - 'CloningInfo', - 'ConnectionStringDictionary', - 'ConnStringInfo', - 'ConnStringValueTypePair', - 'Contact', - 'ContainerCpuStatistics', - 'ContainerCpuUsage', - 'ContainerInfo', - 'ContainerMemoryStatistics', - 'ContainerNetworkInterfaceStatistics', - 'ContainerThrottlingData', - 'ContinuousWebJob', - 'CookieExpiration', - 'CorsSettings', - 'CsmCopySlotEntity', - 'CsmMoveResourceEnvelope', - 'CsmOperationDescription', - 'CsmOperationDescriptionProperties', - 'CsmOperationDisplay', - 'CsmPublishingCredentialsPoliciesCollection', - 'CsmPublishingCredentialsPoliciesEntity', - 'CsmPublishingProfileOptions', - 'CsmSlotEntity', - 'CsmUsageQuota', - 'CustomHostnameAnalysisResult', - 'CustomOpenIdConnectProvider', - 'DatabaseBackupSetting', - 'DataSource', - 'DataTableResponseColumn', - 'DataTableResponseObject', - 'DefaultErrorResponse', 'DefaultErrorResponseException', - 'DefaultErrorResponseError', - 'DefaultErrorResponseErrorDetailsItem', - 'DeletedAppRestoreRequest', - 'DeletedSite', - 'Deployment', - 'DeploymentLocations', - 'DetectorAbnormalTimePeriod', - 'DetectorDefinition', - 'DetectorInfo', - 'DetectorResponse', - 'DiagnosticAnalysis', - 'DiagnosticCategory', - 'DiagnosticData', - 'DiagnosticDetectorResponse', - 'DiagnosticMetricSample', - 'DiagnosticMetricSet', - 'Dimension', - 'Domain', - 'DomainAvailabilityCheckResult', - 'DomainControlCenterSsoRequest', - 'DomainOwnershipIdentifier', - 'DomainPatchResource', - 'DomainPurchaseConsent', - 'DomainRecommendationSearchParameters', - 'EnabledConfig', - 'EndpointDependency', - 'EndpointDetail', - 'ErrorEntity', - 'Experiments', - 'Facebook', - 'FileSystemApplicationLogsConfig', - 'FileSystemHttpLogsConfig', - 'FileSystemTokenStore', - 'ForwardProxy', - 'FunctionEnvelope', - 'FunctionSecrets', - 'GeoRegion', - 'GitHub', - 'GlobalCsmSkuDescription', - 'GlobalValidation', - 'Google', - 'HandlerMapping', - 'HostingEnvironmentDeploymentInfo', - 'HostingEnvironmentDiagnostics', - 'HostingEnvironmentProfile', - 'HostKeys', - 'HostName', - 'HostNameBinding', - 'HostNameSslState', - 'HttpLogsConfig', - 'HttpSettings', - 'HttpSettingsRoutes', - 'HybridConnection', - 'HybridConnectionKey', - 'HybridConnectionLimits', - 'Identifier', - 'IdentityProviders', - 'InboundEnvironmentEndpoint', - 'IpSecurityRestriction', - 'JwtClaimChecks', - 'KeyInfo', - 'LocalizableString', - 'Login', - 'LoginRoutes', - 'LoginScopes', - 'LogSpecification', - 'ManagedServiceIdentity', - 'ManagedServiceIdentityUserAssignedIdentitiesValue', - 'MetricAvailability', - 'MetricSpecification', - 'MigrateMySqlRequest', - 'MigrateMySqlStatus', - 'MSDeploy', - 'MSDeployLog', - 'MSDeployLogEntry', - 'MSDeployStatus', - 'NameIdentifier', - 'NameValuePair', - 'NetworkAccessControlEntry', - 'NetworkFeatures', - 'NetworkTrace', - 'Nonce', - 'OpenIdConnectClientCredential', - 'OpenIdConnectConfig', - 'OpenIdConnectLogin', - 'OpenIdConnectRegistration', - 'Operation', - 'OutboundEnvironmentEndpoint', - 'PerfMonResponse', - 'PerfMonSample', - 'PerfMonSet', - 'PremierAddOn', - 'PremierAddOnOffer', - 'PremierAddOnPatchResource', - 'PrivateAccess', - 'PrivateAccessSubnet', - 'PrivateAccessVirtualNetwork', - 'PrivateEndpointConnectionResource', - 'PrivateLinkConnectionApprovalRequestResource', - 'PrivateLinkConnectionState', - 'PrivateLinkResource', - 'PrivateLinkResourceProperties', - 'PrivateLinkResourcesWrapper', - 'ProcessInfo', - 'ProcessModuleInfo', - 'ProcessThreadInfo', - 'ProxyOnlyResource', - 'PublicCertificate', - 'PushSettings', - 'RampUpRule', - 'Recommendation', - 'RecommendationRule', - 'ReissueCertificateOrderRequest', - 'RelayServiceConnectionEntity', - 'Rendering', - 'RenewCertificateOrderRequest', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceHealthMetadata', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceNameAvailability', - 'ResourceNameAvailabilityRequest', - 'ResponseMetaData', - 'RestoreRequest', - 'ServiceSpecification', - 'Site', - 'SiteAuthSettings', - 'SiteAuthSettingsV2', - 'SiteCloneability', - 'SiteCloneabilityCriterion', - 'SiteConfig', - 'SiteConfigResource', - 'SiteConfigurationSnapshotInfo', - 'SiteExtensionInfo', - 'SiteLimits', - 'SiteLogsConfig', - 'SiteMachineKey', - 'SitePatchResource', - 'SitePhpErrorLogFlag', - 'SiteSeal', - 'SiteSealRequest', - 'SiteSourceControl', - 'SkuCapacity', - 'SkuDescription', - 'SkuInfo', - 'SkuInfos', - 'SlotConfigNamesResource', - 'SlotDifference', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'Snapshot', - 'SnapshotRecoverySource', - 'SnapshotRestoreRequest', - 'Solution', - 'SourceControl', - 'StackMajorVersion', - 'StackMinorVersion', - 'StampCapacity', - 'StaticSiteARMResource', - 'StaticSiteBuildARMResource', - 'StaticSiteBuildProperties', - 'StaticSiteCustomDomainOverviewARMResource', - 'StaticSiteFunctionOverviewARMResource', - 'StaticSitePatchResource', - 'StaticSiteResetPropertiesARMResource', - 'StaticSitesWorkflowPreview', - 'StaticSitesWorkflowPreviewRequest', - 'StaticSiteUserARMResource', - 'StaticSiteUserInvitationRequestResource', - 'StaticSiteUserInvitationResponseResource', - 'StatusCodesBasedTrigger', - 'StorageMigrationOptions', - 'StorageMigrationResponse', - 'StringDictionary', - 'SwiftVirtualNetwork', - 'TldLegalAgreement', - 'TokenStore', - 'TopLevelDomain', - 'TopLevelDomainAgreementOption', - 'TriggeredJobHistory', - 'TriggeredJobRun', - 'TriggeredWebJob', - 'Twitter', - 'TwitterRegistration', - 'Usage', - 'User', - 'ValidateRequest', - 'ValidateResponse', - 'ValidateResponseError', - 'VirtualApplication', - 'VirtualDirectory', - 'VirtualIPMapping', - 'VirtualNetworkProfile', - 'VnetGateway', - 'VnetInfo', - 'VnetParameters', - 'VnetRoute', - 'VnetValidationFailureDetails', - 'VnetValidationTestFailure', - 'WebAppCollection', - 'WebJob', - 'WebSiteInstanceStatus', - 'WorkerPool', - 'WorkerPoolResource', - 'AppServiceCertificateOrderPaged', - 'AppServiceCertificateResourcePaged', - 'CsmOperationDescriptionPaged', - 'DomainPaged', - 'NameIdentifierPaged', - 'DomainOwnershipIdentifierPaged', - 'TopLevelDomainPaged', - 'TldLegalAgreementPaged', - 'CertificatePaged', - 'DeletedSitePaged', - 'DetectorResponsePaged', - 'DiagnosticCategoryPaged', - 'AnalysisDefinitionPaged', - 'DetectorDefinitionPaged', - 'ApplicationStackResourcePaged', - 'RecommendationPaged', - 'SourceControlPaged', - 'BillingMeterPaged', - 'GeoRegionPaged', - 'IdentifierPaged', - 'PremierAddOnOfferPaged', - 'SitePaged', - 'BackupItemPaged', - 'SiteConfigResourcePaged', - 'SiteConfigurationSnapshotInfoPaged', - 'ContinuousWebJobPaged', - 'DeploymentPaged', - 'FunctionEnvelopePaged', - 'HostNameBindingPaged', - 'WebSiteInstanceStatusPaged', - 'ProcessInfoPaged', - 'ProcessModuleInfoPaged', - 'ProcessThreadInfoPaged', - 'PerfMonResponsePaged', - 'PublicCertificatePaged', - 'SiteExtensionInfoPaged', - 'SlotDifferencePaged', - 'SnapshotPaged', - 'TriggeredWebJobPaged', - 'TriggeredJobHistoryPaged', - 'CsmUsageQuotaPaged', - 'WebJobPaged', - 'StaticSiteARMResourcePaged', - 'StaticSiteUserARMResourcePaged', - 'StaticSiteBuildARMResourcePaged', - 'StaticSiteFunctionOverviewARMResourcePaged', - 'StaticSiteCustomDomainOverviewARMResourcePaged', - 'AppServiceEnvironmentResourcePaged', - 'StampCapacityPaged', - 'InboundEnvironmentEndpointPaged', - 'WorkerPoolResourcePaged', - 'ResourceMetricDefinitionPaged', - 'SkuInfoPaged', - 'UsagePaged', - 'OutboundEnvironmentEndpointPaged', - 'AppServicePlanPaged', - 'StrPaged', - 'HybridConnectionPaged', - 'ResourceHealthMetadataPaged', - 'KeyVaultSecretStatus', - 'CertificateProductType', - 'ProvisioningState', - 'CertificateOrderStatus', - 'CertificateOrderActionType', - 'RouteType', - 'ManagedServiceIdentityType', - 'IpFilterTag', - 'AutoHealActionType', - 'ConnectionStringType', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'FtpsState', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'ClientCertMode', - 'RedundancyMode', - 'StatusOptions', - 'DomainStatus', - 'AzureResourceType', - 'CustomHostNameDnsRecordType', - 'HostNameType', - 'DnsType', - 'DomainType', - 'HostingEnvironmentStatus', - 'LoadBalancingMode', - 'ComputeModeOptions', - 'WorkerSizeOptions', - 'AccessControlEntryAction', - 'OperationStatus', - 'IssueType', - 'SolutionType', - 'RenderingType', - 'ResourceScopeType', - 'NotificationLevel', - 'Channels', - 'AppServicePlanRestrictions', - 'InAvailabilityReasonType', - 'CheckNameResourceTypes', - 'ValidateResourceTypes', - 'LogLevel', - 'AzureStorageType', - 'AzureStorageState', - 'BackupItemStatus', - 'DatabaseType', - 'FrequencyUnit', - 'ContinuousWebJobStatus', - 'WebJobType', - 'CookieExpirationConvention', - 'PublishingProfileFormat', - 'DnsVerificationTestResult', - 'ClientCredentialMethod', - 'ForwardProxyConvention', - 'UnauthenticatedClientActionV2', - 'MSDeployLogEntryType', - 'MSDeployProvisioningState', - 'MySqlMigrationType', - 'PublicCertificateLocation', - 'BackupRestoreOperationType', - 'UnauthenticatedClientAction', - 'BuiltInAuthenticationProvider', - 'CloneAbilityResult', - 'SiteExtensionType', - 'TriggeredWebJobStatus', - 'SiteRuntimeState', - 'BuildStatus', - 'TriggerTypes', - 'SkuName', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py deleted file mode 100644 index 582a49ef321..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models.py +++ /dev/null @@ -1,14962 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2020_06_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2020_06_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(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.get('address1', None) - self.address2 = kwargs.get('address2', None) - self.city = kwargs.get('city', None) - self.country = kwargs.get('country', None) - self.postal_code = kwargs.get('postal_code', None) - self.state = kwargs.get('state', None) - - -class ProxyOnlyResource(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_06_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(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_06_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2020_06_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2020_06_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(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 ApiManagementConfig(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 ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2020_06_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2020_06_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2020_06_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(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_06_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2020_06_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]'}, - } - - 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) - - -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 application_stack_resource_name: Application stack name. - :type application_stack_resource_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_06_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2020_06_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'}, - 'application_stack_resource_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]'}, - } - - def __init__(self, **kwargs): - super(ApplicationStackResource, self).__init__(**kwargs) - self.application_stack_resource_name = kwargs.get('application_stack_resource_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) - - -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(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_06_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': 'KeyVaultSecretStatus'}, - } - - 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 Resource(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: 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.get('location', None) - 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: Resource tags. - :type tags: dict[str, str] - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2020_06_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_06_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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_06_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_06_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2020_06_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_06_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2020_06_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2020_06_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_06_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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_06_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_06_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2020_06_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_06_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2020_06_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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_06_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': 'KeyVaultSecretStatus'}, - } - - 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: 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_06_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': 'KeyVaultSecretStatus'}, - } - - 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(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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_06_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_06_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', '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'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, - 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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_06_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_06_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) - self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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: Resource tags. - :type tags: dict[str, str] - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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_06_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_06_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentResource, self).__init__(**kwargs) - self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) - self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) - - -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: Resource tags. - :type tags: dict[str, 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_06_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_06_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_06_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription - """ - - _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}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, 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.sku = kwargs.get('sku', 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_06_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_06_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: This needs to set to true when creating a - Linux App Service Plan, along with kind set to - Linux. It should be false otherwise. Default - value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_06_01.models.ProvisioningState - """ - - _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': 'StatusOptions'}, - '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': 'ProvisioningState'}, - } - - 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 - - -class ArmIdWrapper(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 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(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_06_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2020_06_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': 'AutoHealActionType'}, - '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(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(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_06_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2020_06_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2020_06_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_06_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2020_06_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', 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_06_01.models.AzureActiveDirectoryRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_06_01.models.AzureActiveDirectoryLogin - :param validation: - :type validation: - ~azure.mgmt.web.v2020_06_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_06_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(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_06_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': 'LogLevel'}, - '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(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 AzureStorageInfoValue(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_06_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' - :vartype state: str or - ~azure.mgmt.web.v2020_06_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - 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_06_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(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_06_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': 'LogLevel'}, - '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.get('sas_url', None) - - -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 backup_item_name: Name of this backup. - :vartype backup_item_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_06_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 - :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_06_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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.backup_item_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 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. - - 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 - :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: Required. 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_06_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2020_06_01.models.DatabaseBackupSetting] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account_url': {'required': 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(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). Default value: 7 . - :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_06_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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 - """ - - _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'}, - } - - 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) - - -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(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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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_06_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_06_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', '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) - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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 - """ - - _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_06_01.models.CertificateOrderActionType - :ivar created_at: Time at which the certificate action was performed. - :vartype created_at: 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': 'CertificateOrderActionType'}, - '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 CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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_06_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_06_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', '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) - - -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(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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.get('source_web_app_id', None) - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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_06_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(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_06_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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(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_06_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, **kwargs): - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) - - -class Contact(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_06_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.get('email', None) - self.fax = kwargs.get('fax', None) - self.job_title = kwargs.get('job_title', None) - self.name_first = kwargs.get('name_first', None) - self.name_last = kwargs.get('name_last', None) - self.name_middle = kwargs.get('name_middle', None) - self.organization = kwargs.get('organization', None) - self.phone = kwargs.get('phone', None) - - -class ContainerCpuStatistics(Model): - """ContainerCpuStatistics. - - :param cpu_usage: - :type cpu_usage: ~azure.mgmt.web.v2020_06_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_06_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(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(Model): - """ContainerInfo. - - :param current_time_stamp: - :type current_time_stamp: datetime - :param previous_time_stamp: - :type previous_time_stamp: datetime - :param current_cpu_stats: - :type current_cpu_stats: - ~azure.mgmt.web.v2020_06_01.models.ContainerCpuStatistics - :param previous_cpu_stats: - :type previous_cpu_stats: - ~azure.mgmt.web.v2020_06_01.models.ContainerCpuStatistics - :param memory_stats: - :type memory_stats: - ~azure.mgmt.web.v2020_06_01.models.ContainerMemoryStatistics - :param name: - :type name: str - :param id: - :type id: str - :param eth0: - :type eth0: - ~azure.mgmt.web.v2020_06_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(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(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(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_06_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_06_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': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - '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 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_06_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': 'CookieExpirationConvention'}, - '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(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 CsmCopySlotEntity(Model): - """Copy deployment slot parameters. - - All required parameters must be populated in order to send to Azure. - - :param target_slot: Required. Destination deployment slot during copy - operation. - :type target_slot: str - :param site_config: Required. The site object which will be merged with - the source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2020_06_01.models.SiteConfig - """ - - _validation = { - 'target_slot': {'required': True}, - 'site_config': {'required': True}, - } - - _attribute_map = { - 'target_slot': {'key': 'targetSlot', 'type': 'str'}, - 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, - } - - def __init__(self, **kwargs): - super(CsmCopySlotEntity, self).__init__(**kwargs) - self.target_slot = kwargs.get('target_slot', None) - self.site_config = kwargs.get('site_config', None) - - -class CsmMoveResourceEnvelope(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 CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2020_06_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2020_06_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(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2020_06_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(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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param ftp: Required. Whether FTP is allowed. - :type ftp: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity - :param scm: Required. Whether Scm Basic Auth is allowed. - :type scm: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ftp': {'required': True}, - 'scm': {'required': 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param allow: Required. true to allow access to a publishing - method; otherwise, false. - :type allow: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allow': {'required': 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(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_06_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(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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.get('target_slot', None) - self.preserve_vnet = kwargs.get('preserve_vnet', None) - - -class CsmUsageQuota(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 - :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_06_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 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: true if hostname is - already verified; otherwise, 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_06_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_06_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_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_cname_records = kwargs.get('alternate_cname_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_06_01.models.OpenIdConnectRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_06_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(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_06_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.get('database_type', None) - 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 DataSource(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_06_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(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(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_06_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(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_06_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 DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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_06_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(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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_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.deleted_site_kind = None - self.geo_region_name = 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 - :param end_time: End time. - :type end_time: 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 DeploymentLocations(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_06_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2020_06_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_06_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(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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_06_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_06_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2020_06_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': 'IssueType'}, - '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(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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_06_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2020_06_01.models.DiagnosticData] - """ - - _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]'}, - } - - def __init__(self, **kwargs): - super(DetectorResponse, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.dataset = kwargs.get('dataset', 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 - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2020_06_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2020_06_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_06_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 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 DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2020_06_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2020_06_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 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 - :param end_time: End time of the period - :type end_time: 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_06_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2020_06_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2020_06_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2020_06_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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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(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 - :param end_time: End time of the period - :type end_time: 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_06_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(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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2020_06_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_06_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_06_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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_06_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2020_06_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2020_06_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_06_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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_06_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - 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 DomainControlCenterSsoRequest(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 DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2020_06_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_06_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_06_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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_06_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2020_06_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2020_06_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_06_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(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 - 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 - """ - - _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(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(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(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_06_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(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(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_06_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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2020_06_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_06_01.models.AppRegistration - :param graph_api_version: - :type graph_api_version: str - :param login: - :type login: ~azure.mgmt.web.v2020_06_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(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2020_06_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, **kwargs): - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = kwargs.get('level', "Off") - - -class FileSystemHttpLogsConfig(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_06_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': 'ForwardProxyConvention'}, - '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 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 FunctionSecrets(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 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_06_01.models.ClientRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_06_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 GlobalCsmSkuDescription(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_06_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_06_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_06_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': 'UnauthenticatedClientActionV2'}, - '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_06_01.models.ClientRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_06_01.models.LoginScopes - :param validation: - :type validation: - ~azure.mgmt.web.v2020_06_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(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(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(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(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(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(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_06_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_06_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_06_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - 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_06_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_06_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2020_06_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2020_06_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - '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 HostNameSslState(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_06_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 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_06_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2020_06_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2020_06_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_06_01.models.HttpSettingsRoutes - :param forward_proxy: - :type forward_proxy: ~azure.mgmt.web.v2020_06_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 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 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_06_01.models.AzureActiveDirectory - :param facebook: - :type facebook: ~azure.mgmt.web.v2020_06_01.models.Facebook - :param git_hub: - :type git_hub: ~azure.mgmt.web.v2020_06_01.models.GitHub - :param google: - :type google: ~azure.mgmt.web.v2020_06_01.models.Google - :param twitter: - :type twitter: ~azure.mgmt.web.v2020_06_01.models.Twitter - :param custom_open_id_connect_providers: - :type custom_open_id_connect_providers: dict[str, - ~azure.mgmt.web.v2020_06_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'}, - 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, - '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.twitter = kwargs.get('twitter', None) - self.custom_open_id_connect_providers = kwargs.get('custom_open_id_connect_providers', None) - - -class InboundEnvironmentEndpoint(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 IpSecurityRestriction(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_06_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(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 LocalizableString(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_06_01.models.LoginRoutes - :param token_store: - :type token_store: ~azure.mgmt.web.v2020_06_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_06_01.models.CookieExpiration - :param nonce: - :type nonce: ~azure.mgmt.web.v2020_06_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(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(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_06_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_06_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailability(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(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_06_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2020_06_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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2020_06_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - 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_06_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': 'OperationStatus'}, - '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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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_06_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(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2020_06_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': 'MSDeployLogEntryType'}, - '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_06_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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(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 NameValuePair(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 NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2020_06_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = kwargs.get('action', None) - self.description = kwargs.get('description', None) - self.order = kwargs.get('order', None) - self.remote_subnet = kwargs.get('remote_subnet', 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_06_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2020_06_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(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 - :param method: Possible values include: 'ClientSecretPost' - :type method: str or - ~azure.mgmt.web.v2020_06_01.models.ClientCredentialMethod - :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'}, - 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, - 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OpenIdConnectClientCredential, self).__init__(**kwargs) - self.method = kwargs.get('method', None) - 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_06_01.models.OpenIdConnectClientCredential - :param open_id_connect_configuration: - :type open_id_connect_configuration: - ~azure.mgmt.web.v2020_06_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(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_06_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2020_06_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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(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_06_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 PerfMonResponse(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_06_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(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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(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 - :param end_time: End time of the period. - :type end_time: 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_06_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: 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: true if promotion code is - required; otherwise, 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_06_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': 'AppServicePlanRestrictions'}, - '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 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_06_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(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(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_06_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 PrivateEndpointConnectionResource(ProxyOnlyResource): - """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_06_01.models.ArmIdWrapper - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_06_01.models.PrivateLinkConnectionState - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionResource, 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) - - -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: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_06_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(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(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_06_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.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.properties = kwargs.get('properties', None) - - -class PrivateLinkResourceProperties(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(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_06_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.get('value', None) - - -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_06_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_06_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 - :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 - :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 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 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 - :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 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_06_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': 'PublicCertificateLocation'}, - '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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - \\nMinReroutePercentage or - MaxReroutePercentage. Site metrics are checked every N - minutes specified in ChangeIntervalInMinutes.\\nCustom - decision algorithm - can be provided in TiPCallback site extension which URL can be specified - in 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 - :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_06_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_06_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_06_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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 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_06_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_06_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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 Rendering(Model): - """Instructions for rendering the data. - - :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', - 'TimeSeries', 'TimeSeriesPerInstance' - :type type: str or ~azure.mgmt.web.v2020_06_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': 'RenderingType'}, - '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(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 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 ResourceMetricAvailability(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_06_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 ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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_06_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(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_06_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.get('name', None) - self.type = kwargs.get('type', None) - self.is_fqdn = kwargs.get('is_fqdn', None) - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2020_06_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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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_06_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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_06_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - '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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2020_06_01.models.MetricSpecification] - :param log_specifications: - :type log_specifications: - list[~azure.mgmt.web.v2020_06_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: Resource tags. - :type tags: dict[str, str] - :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_06_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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_06_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_06_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2020_06_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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_06_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2020_06_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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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_06_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: true if the app is a default - container; otherwise, 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_06_01.models.SlotSwapStatus - :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_06_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 identity: - :type identity: ~azure.mgmt.web.v2020_06_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.identity = kwargs.get('identity', 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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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_06_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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_06_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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested - as part of GitHub Login authentication. - This setting is optional - :type git_hub_oauth_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_oauth_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_oauth_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'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_oauth_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_oauth_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_oauth_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_oauth_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.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_oauth_scopes = kwargs.get('google_oauth_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_oauth_scopes = kwargs.get('facebook_oauth_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_oauth_scopes = kwargs.get('git_hub_oauth_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_oauth_scopes = kwargs.get('microsoft_account_oauth_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_06_01.models.AuthPlatform - :param global_validation: - :type global_validation: - ~azure.mgmt.web.v2020_06_01.models.GlobalValidation - :param identity_providers: - :type identity_providers: - ~azure.mgmt.web.v2020_06_01.models.IdentityProviders - :param login: - :type login: ~azure.mgmt.web.v2020_06_01.models.Login - :param http_settings: - :type http_settings: ~azure.mgmt.web.v2020_06_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(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_06_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2020_06_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_06_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2020_06_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - '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(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(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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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_06_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2020_06_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2020_06_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2020_06_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_06_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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_06_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2020_06_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2020_06_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2020_06_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2020_06_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2020_06_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_06_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2020_06_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2020_06_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2020_06_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2020_06_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2020_06_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. Default value: True . - :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_06_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_06_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_06_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, - } - - 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.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.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.health_check_path = kwargs.get('health_check_path', 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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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_06_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2020_06_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2020_06_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2020_06_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_06_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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_06_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2020_06_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2020_06_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2020_06_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2020_06_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2020_06_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_06_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2020_06_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2020_06_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2020_06_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2020_06_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2020_06_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. Default value: True . - :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_06_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_06_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_06_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, - } - - 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.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.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.health_check_path = kwargs.get('health_check_path', 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 - :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 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_06_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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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': 'SiteExtensionType'}, - '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 SiteLimits(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_06_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2020_06_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2020_06_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2020_06_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(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 - :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_06_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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_06_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_06_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2020_06_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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_06_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2020_06_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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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_06_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: true if the app is a default - container; otherwise, 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_06_01.models.SlotSwapStatus - :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_06_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 identity: - :type identity: ~azure.mgmt.web.v2020_06_01.models.ManagedServiceIdentity - """ - - _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'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(SitePatchResource, self).__init__(**kwargs) - 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.identity = kwargs.get('identity', 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(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.get('html', None) - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param is_git_hub_action: true if this is deployed via GitHub - action. - :type is_git_hub_action: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - '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'}, - } - - 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) - - -class SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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_06_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_06_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(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_06_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2020_06_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 SkuInfos(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_06_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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.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 SnapshotRecoverySource(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. - - 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 - :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_06_01.models.SnapshotRecoverySource - :param overwrite: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': 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(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_06_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2020_06_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': 'SolutionType'}, - '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 - """ - - _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 StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2020_06_01.models.StackMinorVersion] - :param application_insights: true if this supports - Application Insights; otherwise, false. - :type application_insights: bool - :param is_preview: true if this stack is in Preview, - otherwise false. - :type is_preview: bool - :param is_deprecated: true if this stack has been deprecated, - otherwise false. - :type is_deprecated: bool - :param is_hidden: true if this stack should be hidden for new - customers on portal, otherwise 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'}, - '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.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(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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(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_06_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' - :type worker_size: str or - ~azure.mgmt.web.v2020_06_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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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 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: Resource tags. - :type tags: dict[str, 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 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_06_01.models.StaticSiteBuildProperties - :param sku: - :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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}'}, - 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(StaticSiteARMResource, self).__init__(**kwargs) - self.default_hostname = None - self.repository_url = kwargs.get('repository_url', None) - self.branch = kwargs.get('branch', None) - self.custom_domains = None - self.repository_token = kwargs.get('repository_token', None) - self.build_properties = kwargs.get('build_properties', None) - self.sku = kwargs.get('sku', 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 - :ivar last_updated_on: When this build was updated. - :vartype last_updated_on: 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_06_01.models.BuildStatus - """ - - _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}, - } - - _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'}, - } - - 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 - - -class StaticSiteBuildProperties(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: The path of the app artifacts after - building. - :type app_artifact_location: str - """ - - _attribute_map = { - 'app_location': {'key': 'appLocation', 'type': 'str'}, - 'api_location': {'key': 'apiLocation', 'type': 'str'}, - 'app_artifact_location': {'key': 'appArtifactLocation', '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) - - -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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_name': {'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'}, - 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, - 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StaticSiteCustomDomainOverviewARMResource, self).__init__(**kwargs) - self.domain_name = None - self.created_on = None - - -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_06_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 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 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_06_01.models.StaticSiteBuildProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - } - - 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.custom_domains = None - self.repository_token = kwargs.get('repository_token', None) - self.build_properties = kwargs.get('build_properties', 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_06_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 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 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 - :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 StatusCodesBasedTrigger(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 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'}, - '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.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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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 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(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.get('agreement_key', None) - self.title = kwargs.get('title', None) - self.content = kwargs.get('content', None) - self.url = kwargs.get('url', 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_06_01.models.FileSystemTokenStore - :param azure_blob_storage: - :type azure_blob_storage: - ~azure.mgmt.web.v2020_06_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 true, then the top level domain supports - domain privacy; otherwise, 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(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - 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 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_06_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 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_06_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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': 'TriggeredWebJobStatus'}, - '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_06_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_06_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': 'WebJobType'}, - '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 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_06_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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2020_06_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': 'ComputeModeOptions'}, - '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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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(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' - :type type: str or - ~azure.mgmt.web.v2020_06_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: 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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ValidateRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.location = kwargs.get('location', None) - 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) - - -class ValidateResponse(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_06_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(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(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2020_06_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(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(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(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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.get('id', None) - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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_06_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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 - """ - - _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'}, - } - - 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) - - -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_06_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 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_06_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'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, **kwargs): - super(VnetValidationFailureDetails, self).__init__(**kwargs) - self.failed = kwargs.get('failed', None) - self.failed_tests = kwargs.get('failed_tests', 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(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_06_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.get('value', None) - 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_06_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': 'WebJobType'}, - '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 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_06_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: - :type containers: dict[str, - ~azure.mgmt.web.v2020_06_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': 'SiteRuntimeState'}, - '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 WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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_06_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 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_06_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] - :param sku: - :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(WorkerPoolResource, self).__init__(**kwargs) - 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 - self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py deleted file mode 100644 index e8a2e342f8b..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_models_py3.py +++ /dev/null @@ -1,14962 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2020_06_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2020_06_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: - super(AbnormalTimePeriod, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.events = events - self.solutions = solutions - - -class Address(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: str=None, **kwargs) -> None: - 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(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: str=None, **kwargs) -> None: - 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_06_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: str=None, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: - 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: str=None, allowed_audiences=None, **kwargs) -> None: - super(AllowedAudiencesValidation, self).__init__(kind=kind, **kwargs) - self.allowed_audiences = allowed_audiences - - -class AnalysisData(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_06_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2020_06_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2020_06_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) - self.description = None - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class ApiManagementConfig(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: str=None, **kwargs) -> None: - super(ApiManagementConfig, self).__init__(**kwargs) - self.id = id - - -class ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2020_06_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2020_06_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2020_06_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: - 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(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_06_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2020_06_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]'}, - } - - def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: - super(ApplicationStack, self).__init__(**kwargs) - self.name = name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - - -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 application_stack_resource_name: Application stack name. - :type application_stack_resource_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_06_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2020_06_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'}, - 'application_stack_resource_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]'}, - } - - def __init__(self, *, kind: str=None, application_stack_resource_name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: - super(ApplicationStackResource, self).__init__(kind=kind, **kwargs) - self.application_stack_resource_name = application_stack_resource_name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - - -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: str=None, app_id: str=None, app_secret_setting_name: str=None, **kwargs) -> None: - super(AppRegistration, self).__init__(kind=kind, **kwargs) - self.app_id = app_id - self.app_secret_setting_name = app_secret_setting_name - - -class AppServiceCertificate(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_06_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2020_06_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_06_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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_06_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_06_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2020_06_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_06_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2020_06_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, location: str, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2020_06_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_06_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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_06_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_06_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2020_06_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_06_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2020_06_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 - - -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_06_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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: 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_06_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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_06_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_06_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', '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'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, - 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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_06_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_06_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) - self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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: Resource tags. - :type tags: dict[str, str] - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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_06_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_06_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_06_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_06_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_06_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_06_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_06_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_06_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_06_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_environment_resource_name = app_service_environment_resource_name - self.app_service_environment_resource_location = app_service_environment_resource_location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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: Resource tags. - :type tags: dict[str, 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_06_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_06_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_06_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription - """ - - _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}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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.sku = sku - - -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_06_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_06_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: This needs to set to true when creating a - Linux App Service Plan, along with kind set to - Linux. It should be false otherwise. Default - value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_06_01.models.ProvisioningState - """ - - _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': 'StatusOptions'}, - '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': 'ProvisioningState'}, - } - - def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: - 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 - - -class ArmIdWrapper(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) -> None: - super(ArmIdWrapper, self).__init__(**kwargs) - self.id = 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, *, kind: str=None, enabled: bool=None, runtime_version: str=None, config_file_path: str=None, **kwargs) -> None: - super(AuthPlatform, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.runtime_version = runtime_version - self.config_file_path = config_file_path - - -class AutoHealActions(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_06_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2020_06_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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_06_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2020_06_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2020_06_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_06_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2020_06_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -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_06_01.models.AzureActiveDirectoryRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_06_01.models.AzureActiveDirectoryLogin - :param validation: - :type validation: - ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, login=None, validation=None, is_auto_provisioned: bool=None, **kwargs) -> None: - 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: str=None, disable_www_authenticate: bool=None, login_parameters=None, **kwargs) -> None: - 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: str=None, open_id_issuer: str=None, client_id: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, **kwargs) -> None: - 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_06_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: str=None, jwt_claim_checks=None, allowed_audiences=None, **kwargs) -> None: - super(AzureActiveDirectoryValidation, self).__init__(kind=kind, **kwargs) - self.jwt_claim_checks = jwt_claim_checks - self.allowed_audiences = allowed_audiences - - -class AzureBlobStorageApplicationLogsConfig(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_06_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, - } - - def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: - super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - self.sas_url = sas_url - self.retention_in_days = retention_in_days - - -class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) - self.sas_url = sas_url - self.retention_in_days = retention_in_days - self.enabled = enabled - - -class AzureStorageInfoValue(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_06_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' - :vartype state: str or - ~azure.mgmt.web.v2020_06_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: - 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_06_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: str=None, properties=None, **kwargs) -> None: - super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class AzureTableStorageApplicationLogsConfig(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_06_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - } - - def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: - 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 backup_item_name: Name of this backup. - :vartype backup_item_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_06_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 - :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_06_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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: str=None, **kwargs) -> None: - super(BackupItem, self).__init__(kind=kind, **kwargs) - self.backup_id = None - self.storage_account_url = None - self.blob_name = None - self.backup_item_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 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. - - 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 - :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: Required. 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_06_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2020_06_01.models.DatabaseBackupSetting] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account_url': {'required': 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, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: - 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(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). Default value: 7 . - :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_06_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: - 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 - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: - 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 - - -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: str=None, sas_url_setting_name: str=None, **kwargs) -> None: - super(BlobStorageTokenStore, self).__init__(kind=kind, **kwargs) - self.sas_url_setting_name = sas_url_setting_name - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - 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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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_06_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_06_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, - } - - def __init__(self, *, location: str, password: str, kind: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: - 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 - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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) -> None: - 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 - """ - - _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: - 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_06_01.models.CertificateOrderActionType - :ivar created_at: Time at which the certificate action was performed. - :vartype created_at: 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': 'CertificateOrderActionType'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) - self.action_type = None - self.created_at = None - - -class CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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_06_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_06_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 - """ - - _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}, - 'password': {'required': 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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, - } - - def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: - 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 - - -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: str=None, client_id: str=None, client_secret_setting_name: str=None, **kwargs) -> None: - super(ClientRegistration, self).__init__(kind=kind, **kwargs) - self.client_id = client_id - self.client_secret_setting_name = client_secret_setting_name - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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_06_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: str=None, properties=None, **kwargs) -> None: - super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class ConnStringInfo(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_06_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class ConnStringValueTypePair(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_06_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, value: str, type, **kwargs) -> None: - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = value - self.type = type - - -class Contact(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_06_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: - 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(Model): - """ContainerCpuStatistics. - - :param cpu_usage: - :type cpu_usage: ~azure.mgmt.web.v2020_06_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_06_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=None, system_cpu_usage: int=None, online_cpu_count: int=None, throttling_data=None, **kwargs) -> None: - 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(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: int=None, per_cpu_usage=None, kernel_mode_usage: int=None, user_mode_usage: int=None, **kwargs) -> None: - 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(Model): - """ContainerInfo. - - :param current_time_stamp: - :type current_time_stamp: datetime - :param previous_time_stamp: - :type previous_time_stamp: datetime - :param current_cpu_stats: - :type current_cpu_stats: - ~azure.mgmt.web.v2020_06_01.models.ContainerCpuStatistics - :param previous_cpu_stats: - :type previous_cpu_stats: - ~azure.mgmt.web.v2020_06_01.models.ContainerCpuStatistics - :param memory_stats: - :type memory_stats: - ~azure.mgmt.web.v2020_06_01.models.ContainerMemoryStatistics - :param name: - :type name: str - :param id: - :type id: str - :param eth0: - :type eth0: - ~azure.mgmt.web.v2020_06_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=None, previous_time_stamp=None, current_cpu_stats=None, previous_cpu_stats=None, memory_stats=None, name: str=None, id: str=None, eth0=None, **kwargs) -> None: - 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(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: int=None, max_usage: int=None, limit: int=None, **kwargs) -> None: - super(ContainerMemoryStatistics, self).__init__(**kwargs) - self.usage = usage - self.max_usage = max_usage - self.limit = limit - - -class ContainerNetworkInterfaceStatistics(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: int=None, rx_packets: int=None, rx_errors: int=None, rx_dropped: int=None, tx_bytes: int=None, tx_packets: int=None, tx_errors: int=None, tx_dropped: int=None, **kwargs) -> None: - 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(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: int=None, throttled_periods: int=None, throttled_time: int=None, **kwargs) -> None: - 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_06_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_06_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': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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_06_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': 'CookieExpirationConvention'}, - 'time_to_expiration': {'key': 'properties.timeToExpiration', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, convention=None, time_to_expiration: str=None, **kwargs) -> None: - super(CookieExpiration, self).__init__(kind=kind, **kwargs) - self.convention = convention - self.time_to_expiration = time_to_expiration - - -class CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.support_credentials = support_credentials - - -class CsmCopySlotEntity(Model): - """Copy deployment slot parameters. - - All required parameters must be populated in order to send to Azure. - - :param target_slot: Required. Destination deployment slot during copy - operation. - :type target_slot: str - :param site_config: Required. The site object which will be merged with - the source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2020_06_01.models.SiteConfig - """ - - _validation = { - 'target_slot': {'required': True}, - 'site_config': {'required': True}, - } - - _attribute_map = { - 'target_slot': {'key': 'targetSlot', 'type': 'str'}, - 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, - } - - def __init__(self, *, target_slot: str, site_config, **kwargs) -> None: - super(CsmCopySlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.site_config = site_config - - -class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: - super(CsmMoveResourceEnvelope, self).__init__(**kwargs) - self.target_resource_group = target_resource_group - self.resources = resources - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2020_06_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2020_06_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(CsmOperationDescription, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class CsmOperationDescriptionProperties(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2020_06_01.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(CsmOperationDescriptionProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param ftp: Required. Whether FTP is allowed. - :type ftp: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity - :param scm: Required. Whether Scm Basic Auth is allowed. - :type scm: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ftp': {'required': True}, - 'scm': {'required': 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, *, ftp, scm, kind: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param allow: Required. true to allow access to a publishing - method; otherwise, false. - :type allow: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allow': {'required': 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, *, allow: bool, kind: str=None, **kwargs) -> None: - super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, **kwargs) - self.allow = allow - - -class CsmPublishingProfileOptions(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_06_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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: - super(CsmPublishingProfileOptions, self).__init__(**kwargs) - self.format = format - self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints - - -class CsmSlotEntity(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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) -> None: - super(CsmSlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.preserve_vnet = preserve_vnet - - -class CsmUsageQuota(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 - :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_06_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - 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 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: true if hostname is - already verified; otherwise, 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_06_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_06_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, - 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: - 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_cname_records = alternate_cname_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_06_01.models.OpenIdConnectRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: - super(CustomOpenIdConnectProvider, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - - -class DatabaseBackupSetting(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_06_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: - 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 DataSource(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_06_01.models.NameValuePair] - """ - - _attribute_map = { - 'instructions': {'key': 'instructions', 'type': '[str]'}, - 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, - } - - def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: - super(DataSource, self).__init__(**kwargs) - self.instructions = instructions - self.data_source_uri = data_source_uri - - -class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: - super(DataTableResponseColumn, self).__init__(**kwargs) - self.column_name = column_name - self.data_type = data_type - self.column_type = column_type - - -class DataTableResponseObject(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_06_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: str=None, columns=None, rows=None, **kwargs) -> None: - super(DataTableResponseObject, self).__init__(**kwargs) - self.table_name = table_name - self.columns = columns - self.rows = rows - - -class DefaultErrorResponse(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_06_01.models.DefaultErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, - } - - def __init__(self, **kwargs) -> None: - super(DefaultErrorResponse, self).__init__(**kwargs) - self.error = None - - -class DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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_06_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=None, **kwargs) -> None: - super(DefaultErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = details - self.innererror = None - - -class DefaultErrorResponseErrorDetailsItem(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) -> None: - 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: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: - 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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, - 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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.deleted_site_kind = None - self.geo_region_name = 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 - :param end_time: End time. - :type end_time: 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: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: - 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 DeploymentLocations(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_06_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2020_06_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_06_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: - super(DeploymentLocations, self).__init__(**kwargs) - self.locations = locations - self.hosting_environments = hosting_environments - self.hosting_environment_deployment_infos = hosting_environment_deployment_infos - - -class DetectorAbnormalTimePeriod(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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_06_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_06_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2020_06_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': 'IssueType'}, - 'solutions': {'key': 'solutions', 'type': '[Solution]'}, - } - - def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(DetectorDefinition, self).__init__(kind=kind, **kwargs) - self.display_name = None - self.description = None - self.rank = None - self.is_enabled = None - - -class DetectorInfo(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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_06_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2020_06_01.models.DiagnosticData] - """ - - _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]'}, - } - - def __init__(self, *, kind: str=None, metadata=None, dataset=None, **kwargs) -> None: - super(DetectorResponse, self).__init__(kind=kind, **kwargs) - self.metadata = metadata - self.dataset = dataset - - -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 - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2020_06_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2020_06_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_06_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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) - self.description = None - - -class DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2020_06_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2020_06_01.models.Rendering - """ - - _attribute_map = { - 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, - 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, - } - - def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: - super(DiagnosticData, self).__init__(**kwargs) - self.table = table - self.rendering_properties = rendering_properties - - -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 - :param end_time: End time of the period - :type end_time: 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_06_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2020_06_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2020_06_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2020_06_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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: - 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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: - 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(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 - :param end_time: End time of the period - :type end_time: 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_06_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2020_06_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_06_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_06_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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_06_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2020_06_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2020_06_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_06_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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_06_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: - super(DomainAvailabilityCheckResult, self).__init__(**kwargs) - self.name = name - self.available = available - self.domain_type = domain_type - - -class DomainControlCenterSsoRequest(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) -> None: - 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: str=None, ownership_id: str=None, **kwargs) -> None: - super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) - self.ownership_id = ownership_id - - -class DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_06_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2020_06_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_06_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_06_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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_06_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2020_06_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2020_06_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_06_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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(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 - 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 - """ - - _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: - super(DomainPurchaseConsent, self).__init__(**kwargs) - self.agreement_keys = agreement_keys - self.agreed_by = agreed_by - self.agreed_at = agreed_at - - -class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: - super(DomainRecommendationSearchParameters, self).__init__(**kwargs) - self.keywords = keywords - self.max_domain_recommendations = max_domain_recommendations - - -class EnabledConfig(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: bool=None, **kwargs) -> None: - super(EnabledConfig, self).__init__(**kwargs) - self.enabled = enabled - - -class EndpointDependency(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_06_01.models.EndpointDetail] - """ - - _attribute_map = { - 'domain_name': {'key': 'domainName', 'type': 'str'}, - 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, - } - - def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: - super(EndpointDependency, self).__init__(**kwargs) - self.domain_name = domain_name - self.endpoint_details = endpoint_details - - -class EndpointDetail(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: str=None, port: int=None, latency: float=None, is_accessible: bool=None, **kwargs) -> None: - super(EndpointDetail, self).__init__(**kwargs) - self.ip_address = ip_address - self.port = port - self.latency = latency - self.is_accessible = is_accessible - - -class ErrorEntity(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_06_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: - 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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2020_06_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - 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_06_01.models.AppRegistration - :param graph_api_version: - :type graph_api_version: str - :param login: - :type login: ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, graph_api_version: str=None, login=None, **kwargs) -> None: - 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(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2020_06_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, *, level="Off", **kwargs) -> None: - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - - -class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - 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: str=None, directory: str=None, **kwargs) -> None: - 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_06_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': 'ForwardProxyConvention'}, - 'custom_host_header_name': {'key': 'properties.customHostHeaderName', 'type': 'str'}, - 'custom_proto_header_name': {'key': 'properties.customProtoHeaderName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, convention=None, custom_host_header_name: str=None, custom_proto_header_name: str=None, **kwargs) -> None: - 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 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: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: - 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 FunctionSecrets(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: str=None, trigger_url: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(GeoRegion, self).__init__(kind=kind, **kwargs) - self.description = None - self.display_name = None - self.org_domain = 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_06_01.models.ClientRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: - super(GitHub, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - - -class GlobalCsmSkuDescription(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_06_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_06_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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_06_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': 'UnauthenticatedClientActionV2'}, - 'redirect_to_provider': {'key': 'properties.redirectToProvider', 'type': 'str'}, - 'excluded_paths': {'key': 'properties.excludedPaths', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, require_authentication: bool=None, unauthenticated_client_action=None, redirect_to_provider: str=None, excluded_paths=None, **kwargs) -> None: - 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_06_01.models.ClientRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_06_01.models.LoginScopes - :param validation: - :type validation: - ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, registration=None, login=None, validation=None, **kwargs) -> None: - super(Google, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - self.validation = validation - - -class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: - super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) - self.name = name - self.location = location - - -class HostingEnvironmentDiagnostics(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: str=None, diagnostics_output: str=None, **kwargs) -> None: - super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) - self.name = name - self.diagnostics_output = diagnostics_output - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: - super(HostKeys, self).__init__(**kwargs) - self.master_key = master_key - self.function_keys = function_keys - self.system_keys = system_keys - - -class HostName(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_06_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_06_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_06_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: - 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_06_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_06_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2020_06_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2020_06_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: - 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 HostNameSslState(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_06_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 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_06_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2020_06_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2020_06_01.models.AzureBlobStorageHttpLogsConfig - """ - - _attribute_map = { - 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, - 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, - } - - def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: - 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_06_01.models.HttpSettingsRoutes - :param forward_proxy: - :type forward_proxy: ~azure.mgmt.web.v2020_06_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: str=None, require_https: bool=None, routes=None, forward_proxy=None, **kwargs) -> None: - 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: str=None, api_prefix: str=None, **kwargs) -> None: - 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, value: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.value = value - - -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_06_01.models.AzureActiveDirectory - :param facebook: - :type facebook: ~azure.mgmt.web.v2020_06_01.models.Facebook - :param git_hub: - :type git_hub: ~azure.mgmt.web.v2020_06_01.models.GitHub - :param google: - :type google: ~azure.mgmt.web.v2020_06_01.models.Google - :param twitter: - :type twitter: ~azure.mgmt.web.v2020_06_01.models.Twitter - :param custom_open_id_connect_providers: - :type custom_open_id_connect_providers: dict[str, - ~azure.mgmt.web.v2020_06_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'}, - 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, - 'custom_open_id_connect_providers': {'key': 'properties.customOpenIdConnectProviders', 'type': '{CustomOpenIdConnectProvider}'}, - } - - def __init__(self, *, kind: str=None, azure_active_directory=None, facebook=None, git_hub=None, google=None, twitter=None, custom_open_id_connect_providers=None, **kwargs) -> None: - 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.twitter = twitter - self.custom_open_id_connect_providers = custom_open_id_connect_providers - - -class InboundEnvironmentEndpoint(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: str=None, endpoints=None, ports=None, **kwargs) -> None: - super(InboundEnvironmentEndpoint, self).__init__(**kwargs) - self.description = description - self.endpoints = endpoints - self.ports = ports - - -class IpSecurityRestriction(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_06_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: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, headers=None, **kwargs) -> None: - 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: str=None, allowed_groups=None, allowed_client_applications=None, **kwargs) -> None: - super(JwtClaimChecks, self).__init__(kind=kind, **kwargs) - self.allowed_groups = allowed_groups - self.allowed_client_applications = allowed_client_applications - - -class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: - super(KeyInfo, self).__init__(**kwargs) - self.name = name - self.value = value - - -class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: - 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_06_01.models.LoginRoutes - :param token_store: - :type token_store: ~azure.mgmt.web.v2020_06_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_06_01.models.CookieExpiration - :param nonce: - :type nonce: ~azure.mgmt.web.v2020_06_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: str=None, routes=None, token_store=None, preserve_url_fragments_for_logins: bool=None, allowed_external_redirect_urls=None, cookie_expiration=None, nonce=None, **kwargs) -> None: - 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: str=None, logout_endpoint: str=None, **kwargs) -> None: - 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: str=None, scopes=None, **kwargs) -> None: - super(LoginScopes, self).__init__(kind=kind, **kwargs) - self.scopes = scopes - - -class LogSpecification(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: str=None, display_name: str=None, blob_duration: str=None, log_filter_pattern: str=None, **kwargs) -> None: - 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(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_06_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_06_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - self.user_assigned_identities = user_assigned_identities - - -class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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) -> None: - super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricSpecification(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_06_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2020_06_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: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2020_06_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: - 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_06_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': 'OperationStatus'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: - 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_06_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: str=None, **kwargs) -> None: - super(MSDeployLog, self).__init__(kind=kind, **kwargs) - self.entries = None - - -class MSDeployLogEntry(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2020_06_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': 'MSDeployLogEntryType'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - 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_06_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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: str=None, **kwargs) -> None: - 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(Model): - """Identifies an object. - - :param name: Name of the object. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(NameIdentifier, self).__init__(**kwargs) - self.name = name - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2020_06_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = action - self.description = description - self.order = order - self.remote_subnet = remote_subnet - - -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_06_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2020_06_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: str=None, **kwargs) -> None: - 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(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: str=None, status: str=None, message: str=None, **kwargs) -> None: - 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: str=None, validate_nonce: bool=None, nonce_expiration_interval: str=None, **kwargs) -> None: - 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 - :param method: Possible values include: 'ClientSecretPost' - :type method: str or - ~azure.mgmt.web.v2020_06_01.models.ClientCredentialMethod - :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'}, - 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, - 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, method=None, client_secret_setting_name: str=None, **kwargs) -> None: - super(OpenIdConnectClientCredential, self).__init__(kind=kind, **kwargs) - self.method = method - 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: str=None, authorization_endpoint: str=None, token_endpoint: str=None, issuer: str=None, certification_uri: str=None, well_known_open_id_configuration: str=None, **kwargs) -> None: - 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: str=None, name_claim_type: str=None, scopes=None, **kwargs) -> None: - 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_06_01.models.OpenIdConnectClientCredential - :param open_id_connect_configuration: - :type open_id_connect_configuration: - ~azure.mgmt.web.v2020_06_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: str=None, client_id: str=None, client_credential=None, open_id_connect_configuration=None, **kwargs) -> None: - 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(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_06_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2020_06_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: - 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(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_06_01.models.EndpointDependency] - """ - - _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, - } - - def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: - super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) - self.category = category - self.endpoints = endpoints - - -class PerfMonResponse(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_06_01.models.PerfMonSet - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'PerfMonSet'}, - } - - def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: - super(PerfMonResponse, self).__init__(**kwargs) - self.code = code - self.message = message - self.data = data - - -class PerfMonSample(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: - super(PerfMonSample, self).__init__(**kwargs) - self.time = time - self.instance_name = instance_name - self.value = value - - -class PerfMonSet(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 - :param end_time: End time of the period. - :type end_time: 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_06_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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: 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: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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: true if promotion code is - required; otherwise, 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_06_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': 'AppServicePlanRestrictions'}, - '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: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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 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: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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_06_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: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: - super(PrivateAccess, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.virtual_networks = virtual_networks - - -class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: - super(PrivateAccessSubnet, self).__init__(**kwargs) - self.name = name - self.key = key - - -class PrivateAccessVirtualNetwork(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_06_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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: - super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) - self.name = name - self.key = key - self.resource_id = resource_id - self.subnets = subnets - - -class PrivateEndpointConnectionResource(ProxyOnlyResource): - """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_06_01.models.ArmIdWrapper - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_06_01.models.PrivateLinkConnectionState - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateEndpointConnectionResource, 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 - - -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: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_06_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: str=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, **kwargs) - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateLinkConnectionState(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: str=None, description: str=None, actions_required: str=None, **kwargs) -> None: - super(PrivateLinkConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = actions_required - - -class PrivateLinkResource(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_06_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, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.properties = properties - - -class PrivateLinkResourceProperties(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) -> None: - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None - - -class PrivateLinkResourcesWrapper(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_06_01.models.PrivateLinkResource] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - 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_06_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_06_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 - :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 - :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: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: - 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 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: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: - 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 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 - :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: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: - 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 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_06_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': 'PublicCertificateLocation'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: - super(PublicCertificate, self).__init__(kind=kind, **kwargs) - self.blob = blob - self.public_certificate_location = public_certificate_location - self.thumbprint = None - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - \\nMinReroutePercentage or - MaxReroutePercentage. Site metrics are checked every N - minutes specified in ChangeIntervalInMinutes.\\nCustom - decision algorithm - can be provided in TiPCallback site extension which URL can be specified - in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 - :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_06_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_06_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_06_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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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 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_06_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_06_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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: - 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 Rendering(Model): - """Instructions for rendering the data. - - :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', - 'TimeSeries', 'TimeSeriesPerInstance' - :type type: str or ~azure.mgmt.web.v2020_06_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': 'RenderingType'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: - 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: - super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) - self.category = category - self.signal_availability = signal_availability - - -class ResourceMetricAvailability(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) -> None: - 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_06_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: str=None, **kwargs) -> None: - 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 ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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_06_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: bool=None, reason=None, message: str=None, **kwargs) -> None: - super(ResourceNameAvailability, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class ResourceNameAvailabilityRequest(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_06_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, is_fqdn: bool=None, **kwargs) -> None: - super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.is_fqdn = is_fqdn - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2020_06_01.models.DataSource - """ - - _attribute_map = { - 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, - } - - def __init__(self, *, data_source=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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_06_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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_06_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, - 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, - } - - def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: - 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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2020_06_01.models.MetricSpecification] - :param log_specifications: - :type log_specifications: - list[~azure.mgmt.web.v2020_06_01.models.LogSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :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_06_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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_06_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_06_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2020_06_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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_06_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2020_06_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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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_06_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: true if the app is a default - container; otherwise, 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_06_01.models.SlotSwapStatus - :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_06_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 identity: - :type identity: ~azure.mgmt.web.v2020_06_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.identity = identity - - -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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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_06_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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_06_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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested - as part of GitHub Login authentication. - This setting is optional - :type git_hub_oauth_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_oauth_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_oauth_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'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_oauth_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_oauth_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_oauth_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_oauth_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: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, aad_claims_authorization: str=None, google_client_id: str=None, google_client_secret: str=None, google_client_secret_setting_name: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_app_secret_setting_name: str=None, facebook_oauth_scopes=None, git_hub_client_id: str=None, git_hub_client_secret: str=None, git_hub_client_secret_setting_name: str=None, git_hub_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, twitter_consumer_secret_setting_name: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_client_secret_setting_name: str=None, microsoft_account_oauth_scopes=None, is_auth_from_file: str=None, auth_file_path: str=None, **kwargs) -> None: - super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.runtime_version = runtime_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_oauth_scopes = google_oauth_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_oauth_scopes = facebook_oauth_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_oauth_scopes = git_hub_oauth_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_oauth_scopes = microsoft_account_oauth_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_06_01.models.AuthPlatform - :param global_validation: - :type global_validation: - ~azure.mgmt.web.v2020_06_01.models.GlobalValidation - :param identity_providers: - :type identity_providers: - ~azure.mgmt.web.v2020_06_01.models.IdentityProviders - :param login: - :type login: ~azure.mgmt.web.v2020_06_01.models.Login - :param http_settings: - :type http_settings: ~azure.mgmt.web.v2020_06_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: str=None, platform=None, global_validation=None, identity_providers=None, login=None, http_settings=None, **kwargs) -> None: - 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(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_06_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2020_06_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_06_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2020_06_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, - } - - def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: - 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(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: str=None, description: str=None, **kwargs) -> None: - super(SiteCloneabilityCriterion, self).__init__(**kwargs) - self.name = name - self.description = description - - -class SiteConfig(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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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_06_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2020_06_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2020_06_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2020_06_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_06_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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_06_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2020_06_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2020_06_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2020_06_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2020_06_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2020_06_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_06_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2020_06_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2020_06_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2020_06_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2020_06_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2020_06_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. Default value: True . - :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_06_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_06_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_06_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: - 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.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.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.health_check_path = health_check_path - - -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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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_06_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2020_06_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2020_06_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2020_06_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_06_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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_06_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2020_06_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2020_06_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2020_06_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2020_06_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2020_06_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_06_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2020_06_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2020_06_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2020_06_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2020_06_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2020_06_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. Default value: True . - :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_06_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_06_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_06_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: - 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.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.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.health_check_path = health_check_path - - -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 - :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: str=None, **kwargs) -> None: - super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) - self.time = None - self.snapshot_id = 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_06_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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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': 'SiteExtensionType'}, - '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: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: - 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 SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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_06_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2020_06_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2020_06_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2020_06_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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: - 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - 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 - :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_06_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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_06_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_06_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2020_06_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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_06_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2020_06_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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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_06_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: true if the app is a default - container; otherwise, 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_06_01.models.SlotSwapStatus - :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_06_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 identity: - :type identity: ~azure.mgmt.web.v2020_06_01.models.ManagedServiceIdentity - """ - - _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'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: - super(SitePatchResource, self).__init__(kind=kind, **kwargs) - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.identity = identity - - -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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: - 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(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) -> None: - super(SiteSeal, self).__init__(**kwargs) - self.html = html - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: - 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param is_git_hub_action: true if this is deployed via GitHub - action. - :type is_git_hub_action: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - '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'}, - } - - def __init__(self, *, kind: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, is_git_hub_action: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: - 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 - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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_06_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_06_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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(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_06_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2020_06_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: str=None, sku=None, capacity=None, **kwargs) -> None: - super(SkuInfo, self).__init__(**kwargs) - self.resource_type = resource_type - self.sku = sku - self.capacity = capacity - - -class SkuInfos(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_06_01.models.GlobalCsmSkuDescription] - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, - } - - def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: - 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: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - 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: str=None, **kwargs) -> None: - super(Snapshot, self).__init__(kind=kind, **kwargs) - self.time = None - - -class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: - 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. - - 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 - :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_06_01.models.SnapshotRecoverySource - :param overwrite: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': 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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: - 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(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_06_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2020_06_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2020_06_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': 'SolutionType'}, - 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, - 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, - } - - def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: - 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 - """ - - _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: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: - 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 StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2020_06_01.models.StackMinorVersion] - :param application_insights: true if this supports - Application Insights; otherwise, false. - :type application_insights: bool - :param is_preview: true if this stack is in Preview, - otherwise false. - :type is_preview: bool - :param is_deprecated: true if this stack has been deprecated, - otherwise false. - :type is_deprecated: bool - :param is_hidden: true if this stack should be hidden for new - customers on portal, otherwise 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'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, - 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, - } - - def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, is_preview: bool=None, is_deprecated: bool=None, is_hidden: bool=None, **kwargs) -> None: - 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.is_preview = is_preview - self.is_deprecated = is_deprecated - self.is_hidden = is_hidden - - -class StackMinorVersion(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: - 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(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_06_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' - :type worker_size: str or - ~azure.mgmt.web.v2020_06_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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: - 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 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: Resource tags. - :type tags: dict[str, 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 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_06_01.models.StaticSiteBuildProperties - :param sku: - :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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}'}, - 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, sku=None, **kwargs) -> None: - super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.default_hostname = None - self.repository_url = repository_url - self.branch = branch - self.custom_domains = None - self.repository_token = repository_token - self.build_properties = build_properties - self.sku = sku - - -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 - :ivar last_updated_on: When this build was updated. - :vartype last_updated_on: 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_06_01.models.BuildStatus - """ - - _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}, - } - - _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'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 - - -class StaticSiteBuildProperties(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: The path of the app artifacts after - building. - :type app_artifact_location: str - """ - - _attribute_map = { - 'app_location': {'key': 'appLocation', 'type': 'str'}, - 'api_location': {'key': 'apiLocation', 'type': 'str'}, - 'app_artifact_location': {'key': 'appArtifactLocation', 'type': 'str'}, - } - - def __init__(self, *, app_location: str=None, api_location: str=None, app_artifact_location: str=None, **kwargs) -> None: - super(StaticSiteBuildProperties, self).__init__(**kwargs) - self.app_location = app_location - self.api_location = api_location - self.app_artifact_location = app_artifact_location - - -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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_name': {'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'}, - 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, - 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(StaticSiteCustomDomainOverviewARMResource, self).__init__(kind=kind, **kwargs) - self.domain_name = None - self.created_on = None - - -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_06_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: str=None, **kwargs) -> None: - super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, **kwargs) - self.function_name = None - self.trigger_type = 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 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_06_01.models.StaticSiteBuildProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - } - - def __init__(self, *, kind: str=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, **kwargs) -> None: - super(StaticSitePatchResource, self).__init__(kind=kind, **kwargs) - self.default_hostname = None - self.repository_url = repository_url - self.branch = branch - self.custom_domains = None - self.repository_token = repository_token - self.build_properties = build_properties - - -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: str=None, repository_token: str=None, should_update_repository: bool=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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_06_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: str=None, repository_url: str=None, branch: str=None, build_properties=None, **kwargs) -> None: - super(StaticSitesWorkflowPreviewRequest, self).__init__(kind=kind, **kwargs) - self.repository_url = repository_url - self.branch = branch - self.build_properties = build_properties - - -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: str=None, roles: str=None, **kwargs) -> None: - super(StaticSiteUserARMResource, self).__init__(kind=kind, **kwargs) - self.provider = None - self.user_id = None - self.display_name = None - self.roles = roles - - -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: str=None, domain: str=None, provider: str=None, user_details: str=None, roles: str=None, num_hours_to_expiration: int=None, **kwargs) -> None: - 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 - :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: str=None, **kwargs) -> None: - super(StaticSiteUserInvitationResponseResource, self).__init__(kind=kind, **kwargs) - self.expires_on = None - self.invitation_url = None - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, properties=None, **kwargs) -> None: - super(StringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -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: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: - super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) - self.subnet_resource_id = subnet_resource_id - self.swift_supported = swift_supported - - -class TldLegalAgreement(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: str=None, **kwargs) -> None: - super(TldLegalAgreement, self).__init__(**kwargs) - self.agreement_key = agreement_key - self.title = title - self.content = content - self.url = url - - -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_06_01.models.FileSystemTokenStore - :param azure_blob_storage: - :type azure_blob_storage: - ~azure.mgmt.web.v2020_06_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: str=None, enabled: bool=None, token_refresh_extension_hours: float=None, file_system=None, azure_blob_storage=None, **kwargs) -> None: - 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 true, then the top level domain supports - domain privacy; otherwise, 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: str=None, privacy: bool=None, **kwargs) -> None: - super(TopLevelDomain, self).__init__(kind=kind, **kwargs) - self.privacy = privacy - - -class TopLevelDomainAgreementOption(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - """ - - _attribute_map = { - 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, - 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, - } - - def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: - super(TopLevelDomainAgreementOption, self).__init__(**kwargs) - self.include_privacy = include_privacy - self.for_transfer = for_transfer - - -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_06_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: str=None, runs=None, **kwargs) -> None: - super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) - self.runs = runs - - -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_06_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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': 'TriggeredWebJobStatus'}, - '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: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: - 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_06_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_06_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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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_06_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: str=None, enabled: bool=None, registration=None, **kwargs) -> None: - 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: str=None, consumer_key: str=None, consumer_secret_setting_name: str=None, **kwargs) -> None: - 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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2020_06_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': 'ComputeModeOptions'}, - 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: - 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(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' - :type type: str or - ~azure.mgmt.web.v2020_06_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: 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 - """ - - _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'}, - } - - def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, container_registry_base_url: str=None, container_registry_username: str=None, container_registry_password: str=None, container_image_repository: str=None, container_image_tag: str=None, container_image_platform: str=None, **kwargs) -> None: - 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 - - -class ValidateResponse(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_06_01.models.ValidateResponseError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ValidateResponseError'}, - } - - def __init__(self, *, status: str=None, error=None, **kwargs) -> None: - super(ValidateResponse, self).__init__(**kwargs) - self.status = status - self.error = error - - -class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: - super(ValidateResponseError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2020_06_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -class VirtualIPMapping(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: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, service_name: str=None, **kwargs) -> None: - 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(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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=None, subnet: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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_06_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: - 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 - """ - - _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'}, - } - - def __init__(self, *, kind: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: - 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 - - -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_06_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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - 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 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_06_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'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, *, kind: str=None, failed: bool=None, failed_tests=None, **kwargs) -> None: - super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) - self.failed = failed - self.failed_tests = failed_tests - - -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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: - super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) - self.test_name = test_name - self.details = details - - -class WebAppCollection(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_06_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, **kwargs) -> None: - super(WebAppCollection, 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_06_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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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_06_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: - :type containers: dict[str, - ~azure.mgmt.web.v2020_06_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': 'SiteRuntimeState'}, - '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: str=None, state=None, status_url: str=None, detector_url: str=None, console_url: str=None, health_check_url: str=None, containers=None, **kwargs) -> None: - 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 WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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_06_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 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_06_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] - :param sku: - :type sku: ~azure.mgmt.web.v2020_06_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: - super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) - 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 - self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py deleted file mode 100644 index beed9cc177b..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_paged_models.py +++ /dev/null @@ -1,781 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AppServiceCertificateOrderPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) -class AppServiceCertificateResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) -class CsmOperationDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmOperationDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) -class DomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`Domain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Domain]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainPaged, self).__init__(*args, **kwargs) -class NameIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`NameIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(NameIdentifierPaged, self).__init__(*args, **kwargs) -class DomainOwnershipIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) -class TopLevelDomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`TopLevelDomain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} - } - - def __init__(self, *args, **kwargs): - - super(TopLevelDomainPaged, self).__init__(*args, **kwargs) -class TldLegalAgreementPaged(Paged): - """ - A paging container for iterating over a list of :class:`TldLegalAgreement ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} - } - - def __init__(self, *args, **kwargs): - - super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) -class CertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`Certificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Certificate]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificatePaged, self).__init__(*args, **kwargs) -class DeletedSitePaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSite ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSite]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSitePaged, self).__init__(*args, **kwargs) -class DetectorResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorResponsePaged, self).__init__(*args, **kwargs) -class DiagnosticCategoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiagnosticCategory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} - } - - def __init__(self, *args, **kwargs): - - super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) -class AnalysisDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`AnalysisDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) -class DetectorDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) -class ApplicationStackResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationStackResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationStackResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationStackResourcePaged, self).__init__(*args, **kwargs) -class RecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Recommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Recommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendationPaged, self).__init__(*args, **kwargs) -class SourceControlPaged(Paged): - """ - A paging container for iterating over a list of :class:`SourceControl ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SourceControl]'} - } - - def __init__(self, *args, **kwargs): - - super(SourceControlPaged, self).__init__(*args, **kwargs) -class BillingMeterPaged(Paged): - """ - A paging container for iterating over a list of :class:`BillingMeter ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BillingMeter]'} - } - - def __init__(self, *args, **kwargs): - - super(BillingMeterPaged, self).__init__(*args, **kwargs) -class GeoRegionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoRegion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoRegion]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoRegionPaged, self).__init__(*args, **kwargs) -class IdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`Identifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Identifier]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentifierPaged, self).__init__(*args, **kwargs) -class PremierAddOnOfferPaged(Paged): - """ - A paging container for iterating over a list of :class:`PremierAddOnOffer ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} - } - - def __init__(self, *args, **kwargs): - - super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) -class SitePaged(Paged): - """ - A paging container for iterating over a list of :class:`Site ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Site]'} - } - - def __init__(self, *args, **kwargs): - - super(SitePaged, self).__init__(*args, **kwargs) -class BackupItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupItem]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupItemPaged, self).__init__(*args, **kwargs) -class SiteConfigResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) -class SiteConfigurationSnapshotInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) -class ContinuousWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`ContinuousWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) -class DeploymentPaged(Paged): - """ - A paging container for iterating over a list of :class:`Deployment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Deployment]'} - } - - def __init__(self, *args, **kwargs): - - super(DeploymentPaged, self).__init__(*args, **kwargs) -class FunctionEnvelopePaged(Paged): - """ - A paging container for iterating over a list of :class:`FunctionEnvelope ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} - } - - def __init__(self, *args, **kwargs): - - super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) -class HostNameBindingPaged(Paged): - """ - A paging container for iterating over a list of :class:`HostNameBinding ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} - } - - def __init__(self, *args, **kwargs): - - super(HostNameBindingPaged, self).__init__(*args, **kwargs) -class WebSiteInstanceStatusPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebSiteInstanceStatus ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebSiteInstanceStatus]'} - } - - def __init__(self, *args, **kwargs): - - super(WebSiteInstanceStatusPaged, self).__init__(*args, **kwargs) -class ProcessInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessInfoPaged, self).__init__(*args, **kwargs) -class ProcessModuleInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessModuleInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) -class ProcessThreadInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessThreadInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) -class PerfMonResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`PerfMonResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(PerfMonResponsePaged, self).__init__(*args, **kwargs) -class PublicCertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`PublicCertificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} - } - - def __init__(self, *args, **kwargs): - - super(PublicCertificatePaged, self).__init__(*args, **kwargs) -class SiteExtensionInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteExtensionInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) -class SlotDifferencePaged(Paged): - """ - A paging container for iterating over a list of :class:`SlotDifference ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SlotDifference]'} - } - - def __init__(self, *args, **kwargs): - - super(SlotDifferencePaged, self).__init__(*args, **kwargs) -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) -class TriggeredWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) -class TriggeredJobHistoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredJobHistory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) -class CsmUsageQuotaPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmUsageQuota ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) -class WebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(WebJobPaged, self).__init__(*args, **kwargs) -class StaticSiteARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteUserARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteUserARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteUserARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteUserARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteBuildARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteBuildARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteBuildARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteFunctionOverviewARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteFunctionOverviewARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteFunctionOverviewARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteCustomDomainOverviewARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteCustomDomainOverviewARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteCustomDomainOverviewARMResourcePaged, self).__init__(*args, **kwargs) -class AppServiceEnvironmentResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) -class StampCapacityPaged(Paged): - """ - A paging container for iterating over a list of :class:`StampCapacity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StampCapacity]'} - } - - def __init__(self, *args, **kwargs): - - super(StampCapacityPaged, self).__init__(*args, **kwargs) -class InboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class WorkerPoolResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkerPoolResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) -class ResourceMetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) -class SkuInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SkuInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SkuInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SkuInfoPaged, self).__init__(*args, **kwargs) -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) -class OutboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class AppServicePlanPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServicePlan ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServicePlanPaged, self).__init__(*args, **kwargs) -class StrPaged(Paged): - """ - A paging container for iterating over a list of str object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } - - def __init__(self, *args, **kwargs): - - super(StrPaged, self).__init__(*args, **kwargs) -class HybridConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`HybridConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HybridConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(HybridConnectionPaged, self).__init__(*args, **kwargs) -class ResourceHealthMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py deleted file mode 100644 index 08e3271c0e8..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,620 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class KeyVaultSecretStatus(str, Enum): - - 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 CertificateProductType(str, Enum): - - standard_domain_validated_ssl = "StandardDomainValidatedSsl" - standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class CertificateOrderStatus(str, Enum): - - pendingissuance = "Pendingissuance" - issued = "Issued" - revoked = "Revoked" - canceled = "Canceled" - denied = "Denied" - pendingrevocation = "Pendingrevocation" - pending_rekey = "PendingRekey" - unused = "Unused" - expired = "Expired" - not_submitted = "NotSubmitted" - - -class CertificateOrderActionType(str, Enum): - - 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 RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned, UserAssigned" - none = "None" - - -class IpFilterTag(str, Enum): - - default = "Default" - xff_proxy = "XffProxy" - service_tag = "ServiceTag" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 ScmType(str, Enum): - - 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 ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class FtpsState(str, Enum): - - all_allowed = "AllAllowed" - ftps_only = "FtpsOnly" - disabled = "Disabled" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class ClientCertMode(str, Enum): - - required = "Required" - optional = "Optional" - - -class RedundancyMode(str, Enum): - - none = "None" - manual = "Manual" - failover = "Failover" - active_active = "ActiveActive" - geo_redundant = "GeoRedundant" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class DomainStatus(str, Enum): - - 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 AzureResourceType(str, Enum): - - website = "Website" - traffic_manager = "TrafficManager" - - -class CustomHostNameDnsRecordType(str, Enum): - - cname = "CName" - a = "A" - - -class HostNameType(str, Enum): - - verified = "Verified" - managed = "Managed" - - -class DnsType(str, Enum): - - azure_dns = "AzureDns" - default_domain_registrar_dns = "DefaultDomainRegistrarDns" - - -class DomainType(str, Enum): - - regular = "Regular" - soft_deleted = "SoftDeleted" - - -class HostingEnvironmentStatus(str, Enum): - - preparing = "Preparing" - ready = "Ready" - scaling = "Scaling" - deleting = "Deleting" - - -class LoadBalancingMode(str, Enum): - - none = "None" - web = "Web" - publishing = "Publishing" - web_publishing = "Web,Publishing" - - -class ComputeModeOptions(str, Enum): - - shared = "Shared" - dedicated = "Dedicated" - dynamic = "Dynamic" - - -class WorkerSizeOptions(str, Enum): - - small = "Small" - medium = "Medium" - large = "Large" - d1 = "D1" - d2 = "D2" - d3 = "D3" - nested_small = "NestedSmall" - default = "Default" - - -class AccessControlEntryAction(str, Enum): - - permit = "Permit" - deny = "Deny" - - -class OperationStatus(str, Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" - - -class IssueType(str, Enum): - - 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 SolutionType(str, Enum): - - quick_solution = "QuickSolution" - deep_investigation = "DeepInvestigation" - best_practices = "BestPractices" - - -class RenderingType(str, Enum): - - no_graph = "NoGraph" - table = "Table" - time_series = "TimeSeries" - time_series_per_instance = "TimeSeriesPerInstance" - - -class ResourceScopeType(str, Enum): - - server_farm = "ServerFarm" - subscription = "Subscription" - web_site = "WebSite" - - -class NotificationLevel(str, Enum): - - critical = "Critical" - warning = "Warning" - information = "Information" - non_urgent_suggestion = "NonUrgentSuggestion" - - -class Channels(str, Enum): - - notification = "Notification" - api = "Api" - email = "Email" - webhook = "Webhook" - all = "All" - - -class AppServicePlanRestrictions(str, Enum): - - none = "None" - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - - -class InAvailabilityReasonType(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" - - -class CheckNameResourceTypes(str, Enum): - - site = "Site" - slot = "Slot" - hosting_environment = "HostingEnvironment" - publishing_user = "PublishingUser" - microsoft_websites = "Microsoft.Web/sites" - microsoft_websitesslots = "Microsoft.Web/sites/slots" - microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" - microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" - - -class ValidateResourceTypes(str, Enum): - - server_farm = "ServerFarm" - site = "Site" - - -class LogLevel(str, Enum): - - off = "Off" - verbose = "Verbose" - information = "Information" - warning = "Warning" - error = "Error" - - -class AzureStorageType(str, Enum): - - azure_files = "AzureFiles" - azure_blob = "AzureBlob" - - -class AzureStorageState(str, Enum): - - ok = "Ok" - invalid_credentials = "InvalidCredentials" - invalid_share = "InvalidShare" - - -class BackupItemStatus(str, Enum): - - 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 DatabaseType(str, Enum): - - sql_azure = "SqlAzure" - my_sql = "MySql" - local_my_sql = "LocalMySql" - postgre_sql = "PostgreSql" - - -class FrequencyUnit(str, Enum): - - day = "Day" - hour = "Hour" - - -class ContinuousWebJobStatus(str, Enum): - - initializing = "Initializing" - starting = "Starting" - running = "Running" - pending_restart = "PendingRestart" - stopped = "Stopped" - - -class WebJobType(str, Enum): - - continuous = "Continuous" - triggered = "Triggered" - - -class CookieExpirationConvention(str, Enum): - - fixed_time = "FixedTime" - identity_provider_derived = "IdentityProviderDerived" - - -class PublishingProfileFormat(str, Enum): - - file_zilla3 = "FileZilla3" - web_deploy = "WebDeploy" - ftp = "Ftp" - - -class DnsVerificationTestResult(str, Enum): - - passed = "Passed" - failed = "Failed" - skipped = "Skipped" - - -class ClientCredentialMethod(str, Enum): - - client_secret_post = "ClientSecretPost" - - -class ForwardProxyConvention(str, Enum): - - no_proxy = "NoProxy" - standard = "Standard" - custom = "Custom" - - -class UnauthenticatedClientActionV2(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - return401 = "Return401" - return403 = "Return403" - - -class MSDeployLogEntryType(str, Enum): - - message = "Message" - warning = "Warning" - error = "Error" - - -class MSDeployProvisioningState(str, Enum): - - accepted = "accepted" - running = "running" - succeeded = "succeeded" - failed = "failed" - canceled = "canceled" - - -class MySqlMigrationType(str, Enum): - - local_to_remote = "LocalToRemote" - remote_to_local = "RemoteToLocal" - - -class PublicCertificateLocation(str, Enum): - - current_user_my = "CurrentUserMy" - local_machine_my = "LocalMachineMy" - unknown = "Unknown" - - -class BackupRestoreOperationType(str, Enum): - - default = "Default" - clone = "Clone" - relocation = "Relocation" - snapshot = "Snapshot" - cloud_fs = "CloudFS" - - -class UnauthenticatedClientAction(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - - -class BuiltInAuthenticationProvider(str, Enum): - - azure_active_directory = "AzureActiveDirectory" - facebook = "Facebook" - google = "Google" - microsoft_account = "MicrosoftAccount" - twitter = "Twitter" - github = "Github" - - -class CloneAbilityResult(str, Enum): - - cloneable = "Cloneable" - partially_cloneable = "PartiallyCloneable" - not_cloneable = "NotCloneable" - - -class SiteExtensionType(str, Enum): - - gallery = "Gallery" - web_root = "WebRoot" - - -class TriggeredWebJobStatus(str, Enum): - - success = "Success" - failed = "Failed" - error = "Error" - - -class SiteRuntimeState(str, Enum): - - ready = "READY" - stopped = "STOPPED" - unknown = "UNKNOWN" - - -class BuildStatus(str, Enum): - - waiting_for_deployment = "WaitingForDeployment" - uploading = "Uploading" - deploying = "Deploying" - ready = "Ready" - failed = "Failed" - deleting = "Deleting" - detached = "Detached" - - -class TriggerTypes(str, Enum): - - http_trigger = "HttpTrigger" - unknown = "Unknown" - - -class SkuName(str, Enum): - - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - dynamic = "Dynamic" - isolated = "Isolated" - premium_v2 = "PremiumV2" - elastic_premium = "ElasticPremium" - elastic_isolated = "ElasticIsolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py deleted file mode 100644 index b6a3c15dcb7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations -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 ._provider_operations import ProviderOperations -from ._recommendations_operations import RecommendationsOperations -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 -from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin - -__all__ = [ - 'AppServiceCertificateOrdersOperations', - 'CertificateRegistrationProviderOperations', - 'DomainsOperations', - 'TopLevelDomainsOperations', - 'DomainRegistrationProviderOperations', - 'CertificatesOperations', - 'DeletedWebAppsOperations', - 'DiagnosticsOperations', - 'ProviderOperations', - 'RecommendationsOperations', - 'WebAppsOperations', - 'StaticSitesOperations', - 'AppServiceEnvironmentsOperations', - 'AppServicePlansOperations', - 'ResourceHealthMetadataOperations', - 'WebSiteManagementClientOperationsMixin', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_certificate_orders_operations.py deleted file mode 100644 index e6f37c318ec..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_certificate_orders_operations.py +++ /dev/null @@ -1,1423 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceCertificateOrdersOperations(object): - """AppServiceCertificateOrdersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all certificate orders in a subscription. - - Description for List all certificate orders in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def validate_purchase_information( - self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate_purchase_information.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def get( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - - def _create_or_update_initial( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateOrder or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def delete( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.AppServiceCertificateOrderPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def list_certificates( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_certificates.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} - - def get_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - - def _create_or_update_certificate_initial( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.AppServiceCertificateResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def delete_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.AppServiceCertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def reissue( - self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.ReissueCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reissue.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} - - def renew( - self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.RenewCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} - - def resend_email( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.resend_email.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} - - def resend_request_emails( - self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): - """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: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.resend_request_emails.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} - - def retrieve_site_seal( - self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): - """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 light_theme: If 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSeal or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSeal or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) - - # Construct URL - url = self.retrieve_site_seal.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSeal', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} - - def verify_domain_ownership( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_domain_ownership.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} - - def retrieve_certificate_actions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2020_06_01.models.CertificateOrderAction] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_actions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateOrderAction]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} - - def retrieve_certificate_email_history( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.CertificateEmail] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_email_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateEmail]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_environments_operations.py deleted file mode 100644 index a8bac4ca995..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_environments_operations.py +++ /dev/null @@ -1,2858 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceEnvironmentsOperations(object): - """AppServiceEnvironmentsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all App Service Environments for a subscription. - - Description for Get all App Service Environments for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.AppServiceEnvironmentResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceEnvironmentResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - hosting_environment_envelope=hosting_environment_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _delete_initial( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if force_delete is not None: - query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 true to force the deletion - even if the App Service Environment contains resources. The default is - false. - :type force_delete: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - force_delete=force_delete, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.AppServiceEnvironmentPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def list_capacities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StampCapacity - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StampCapacityPaged[~azure.mgmt.web.v2020_06_01.models.StampCapacity] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_capacities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} - - def get_vip_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AddressResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.AddressResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vip_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AddressResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} - - - def _change_vnet_initial( - self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): - vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) - - # Construct URL - url = self.change_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def change_vnet( - self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 id: Resource id of the Virtual Network. - :type id: str - :param subnet: Subnet within the Virtual Network. - :type subnet: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._change_vnet_initial( - resource_group_name=resource_group_name, - name=name, - id=id, - subnet=subnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} - - def list_diagnostics( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2020_06_01.models.HostingEnvironmentDiagnostics] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_diagnostics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} - - def get_diagnostics_item( - self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostingEnvironmentDiagnostics or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.HostingEnvironmentDiagnostics or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostics_item.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} - - def get_inbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of InboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2020_06_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_06_01.models.InboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_inbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} - - def list_multi_role_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} - - def get_multi_role_pool( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - - def _create_or_update_multi_role_pool_initial( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def list_multi_role_pool_instance_metric_definitions( - self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} - - def list_multi_role_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} - - def list_multi_role_pool_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_06_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} - - def list_multi_role_usages( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2020_06_01.models.UsagePaged[~azure.mgmt.web.v2020_06_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} - - def list_operations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.Operation] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_operations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Operation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} - - def get_outbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2020_06_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_06_01.models.OutboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_outbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} - - def reboot( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reboot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} - - - def _resume_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.resume.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def resume( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._resume_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} - - def list_app_service_plans( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_app_service_plans.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} - - def list_web_apps( - self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} - - - def _suspend_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.suspend.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def suspend( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._suspend_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} - - def list_worker_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} - - def get_worker_pool( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - - def _create_or_update_worker_pool_initial( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def list_worker_pool_instance_metric_definitions( - self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} - - def list_web_worker_metric_definitions( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} - - def list_worker_pool_skus( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_06_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} - - def list_web_worker_usages( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2020_06_01.models.UsagePaged[~azure.mgmt.web.v2020_06_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_plans_operations.py deleted file mode 100644 index 5707a72568a..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_app_service_plans_operations.py +++ /dev/null @@ -1,1946 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServicePlansOperations(object): - """AppServicePlansOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, detailed=None, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans for a subscription. - - Description for Get all App Service plans for a subscription. - - :param detailed: Specify true to return all App Service - plan properties. The default is false, which returns a - subset of the properties. - Retrieval of all properties may increase the API latency. - :type detailed: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlan') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.AppServicePlan - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AppServicePlan or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.AppServicePlan]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - app_service_plan=app_service_plan, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.AppServicePlanPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def list_capabilities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.Capability] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_capabilities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Capability]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connection_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_web_apps_by_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of str - :rtype: ~azure.mgmt.web.v2020_06_01.models.StrPaged[str] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps_by_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} - - def get_hybrid_connection_plan_limit( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionLimits or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnectionLimits or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_plan_limit.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionLimits', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HybridConnection - :rtype: - ~azure.mgmt.web.v2020_06_01.models.HybridConnectionPaged[~azure.mgmt.web.v2020_06_01.models.HybridConnection] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} - - def restart_web_apps( - self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): - """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 true to perform a soft - restart, applies the configuration settings and restarts the apps if - necessary. The default is false, which always restarts - and reprovisions the apps - :type soft_restart: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if soft_restart is not None: - query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} - - def list_web_apps( - self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} - - def get_server_farm_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_server_farm_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} - - def list_vnets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} - - def get_vnet_from_server_farm( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_from_server_farm.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_routes_for_vnet( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_routes_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} - - def get_route_for_vnet( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_route_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def create_or_update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def delete_vnet_route( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def reboot_worker( - self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reboot_worker.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificate_registration_provider_operations.py deleted file mode 100644 index 1245a328aac..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificate_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificateRegistrationProviderOperations(object): - """CertificateRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificates_operations.py deleted file mode 100644 index 367a6e54712..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_certificates_operations.py +++ /dev/null @@ -1,437 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificatesOperations(object): - """CertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all certificates for a subscription. - - Description for Get all certificates for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CertificatePaged[~azure.mgmt.web.v2020_06_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CertificatePaged[~azure.mgmt.web.v2020_06_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def create_or_update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.Certificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'Certificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.CertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_deleted_web_apps_operations.py deleted file mode 100644 index 265707b3b47..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_deleted_web_apps_operations.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DeletedWebAppsOperations(object): - """DeletedWebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all deleted apps for a subscription. - - Description for Get all deleted apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_06_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_06_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} - - def get_deleted_web_app_by_location( - self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeletedSite or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DeletedSite or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deleted_web_app_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeletedSite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_diagnostics_operations.py deleted file mode 100644 index 3e6c03e73ab..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_diagnostics_operations.py +++ /dev/null @@ -1,1713 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DiagnosticsOperations(object): - """DiagnosticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list_hosting_environment_detector_responses( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hosting_environment_detector_responses.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} - - def get_hosting_environment_detector_response( - self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hosting_environment_detector_response.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} - - def list_site_detector_responses( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} - - def get_site_detector_response( - self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} - - def list_site_diagnostic_categories( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} - - def get_site_diagnostic_category( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AnalysisDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.AnalysisDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AnalysisDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector( - self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector( - self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} - - def list_site_detector_responses_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} - - def get_site_detector_response_slot( - self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} - - def list_site_diagnostic_categories_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} - - def get_site_diagnostic_category_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AnalysisDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.AnalysisDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AnalysisDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_06_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector_slot( - self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DetectorDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector_slot( - self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domain_registration_provider_operations.py deleted file mode 100644 index ab4755dec83..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domain_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DomainRegistrationProviderOperations(object): - """DomainRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py deleted file mode 100644 index 5f5e6513c8d..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_domains_operations.py +++ /dev/null @@ -1,1090 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DomainsOperations(object): - """DomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def check_availability( - self, name=None, custom_headers=None, raw=False, **operation_config): - """Check if a domain is available for registration. - - Description for Check if a domain is available for registration. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainAvailabilityCheckResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DomainAvailabilityCheckResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.check_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainAvailabilityCheckResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all domains in a subscription. - - Description for Get all domains in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DomainPaged[~azure.mgmt.web.v2020_06_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} - - def get_control_center_sso_request( - self, custom_headers=None, raw=False, **operation_config): - """Generate a single sign-on request for the domain management portal. - - Description for Generate a single sign-on request for the domain - management portal. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainControlCenterSsoRequest or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DomainControlCenterSsoRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_control_center_sso_request.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainControlCenterSsoRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} - - def list_recommendations( - self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): - """Get domain name recommendations based on keywords. - - Description for Get domain name recommendations based on keywords. - - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NameIdentifier - :rtype: - ~azure.mgmt.web.v2020_06_01.models.NameIdentifierPaged[~azure.mgmt.web.v2020_06_01.models.NameIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommendations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DomainPaged[~azure.mgmt.web.v2020_06_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} - - def get( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - - def _create_or_update_initial( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'Domain') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.Domain - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.Domain]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - domain=domain, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def delete( - self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): - """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 true to delete - the domain immediately. The default is false which - deletes the domain after 24 hours. - :type force_hard_delete_domain: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.DomainPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'DomainPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def list_ownership_identifiers( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DomainOwnershipIdentifier - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_ownership_identifiers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} - - def get_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def create_or_update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.create_or_update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def delete_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def renew( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_provider_operations.py deleted file mode 100644 index 0eab3098d88..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_provider_operations.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProviderOperations(object): - """ProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def get_available_stacks( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Description for Get available application frameworks and their - versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStackResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_06_01.models.ApplicationStackResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks.metadata['url'] - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} - - def get_available_stacks_on_prem( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Description for Get available application frameworks and their - versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStackResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_06_01.models.ApplicationStackResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks_on_prem.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_recommendations_operations.py deleted file mode 100644 index 66530d2ec58..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_recommendations_operations.py +++ /dev/null @@ -1,1070 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class RecommendationsOperations(object): - """RecommendationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """List all recommendations for a subscription. - - Description for List all recommendations for a subscription. - - :param featured: Specify true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} - - def reset_all_filters( - self, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for a subscription. - - Description for Reset all recommendation opt-out settings for a - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} - - def disable_recommendation_for_subscription( - self, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_subscription.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} - - def list_history_for_hosting_environment( - self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} - - def list_recommended_rules_for_hosting_environment( - self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} - - def disable_all_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_all_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} - - def reset_all_filters_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} - - def get_rule_details_by_hosting_environment( - self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} - - def disable_recommendation_for_hosting_environment( - self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_hosting_environment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} - - def list_history_for_web_app( - self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} - - def list_recommended_rules_for_web_app( - self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RecommendationPaged[~azure.mgmt.web.v2020_06_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} - - def disable_all_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_all_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} - - def reset_all_filters_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} - - def get_rule_details_by_web_app( - self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} - - def disable_recommendation_for_site( - self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_site.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_resource_health_metadata_operations.py deleted file mode 100644 index 1d6b14d1334..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_resource_health_metadata_operations.py +++ /dev/null @@ -1,468 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourceHealthMetadataOperations(object): - """ResourceHealthMetadataOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the subscription. - - Description for List all ResourceHealthMetadata for all sites in the - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} - - def get_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} - - def list_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} - - def get_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_static_sites_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_static_sites_operations.py deleted file mode 100644 index 35a49a30db2..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_static_sites_operations.py +++ /dev/null @@ -1,1887 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class StaticSitesOperations(object): - """StaticSitesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def preview_workflow( - self, location, static_sites_workflow_preview_request, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.StaticSitesWorkflowPreviewRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSitesWorkflowPreview or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSitesWorkflowPreview - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.preview_workflow.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSitesWorkflowPreview', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all Static Sites for a subscription. - - Description for Get all Static Sites for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteARMResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} - - def get_static_sites_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteARMResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_static_sites_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} - - def get_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def create_or_update_static_site( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.StaticSiteARMResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def delete_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def update_static_site( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.StaticSitePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def list_static_site_users( - self, resource_group_name, name, authprovider, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteUserARMResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteUserARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteUserARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_users.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteUserARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} - - def delete_static_site_user( - self, resource_group_name, name, authprovider, userid, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} - - def update_static_site_user( - self, resource_group_name, name, authprovider, userid, kind=None, roles=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param roles: The roles for the static site user, in free-form string - format - :type roles: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteUserARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - static_site_user_envelope = models.StaticSiteUserARMResource(kind=kind, roles=roles) - - # Construct URL - url = self.update_static_site_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} - - def get_static_site_builds( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteBuildARMResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteBuildARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteBuildARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_static_site_builds.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteBuildARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} - - def get_static_site_build( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteBuildARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StaticSiteBuildARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteBuildARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} - - def delete_static_site_build( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} - - def create_or_update_static_site_build_function_app_settings( - self, resource_group_name, name, pr_id, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings'} - - def list_static_site_build_functions( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteFunctionOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_build_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} - - def list_static_site_build_function_app_settings( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 - :param pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_build_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} - - def create_or_update_static_site_function_app_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.create_or_update_static_site_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} - - def create_user_roles_invitation_link( - self, resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.StaticSiteUserInvitationRequestResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserInvitationResponseResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteUserInvitationResponseResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_user_roles_invitation_link.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} - - def list_static_site_custom_domains( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteCustomDomainOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteCustomDomainOverviewARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteCustomDomainOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_custom_domains.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteCustomDomainOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} - - def create_or_update_static_site_custom_domain( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteCustomDomainOverviewARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteCustomDomainOverviewARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - def delete_static_site_custom_domain( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - def validate_custom_domain_can_be_added_to_static_site( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate_custom_domain_can_be_added_to_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} - - def detach_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.detach_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} - - def list_static_site_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteFunctionOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} - - def list_static_site_function_app_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} - - def list_static_site_secrets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} - - def reset_static_site_api_key( - self, resource_group_name, name, reset_properties_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.StaticSiteResetPropertiesARMResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_static_site_api_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_top_level_domains_operations.py deleted file mode 100644 index 27e30ae664f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_top_level_domains_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TopLevelDomainsOperations(object): - """TopLevelDomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all top-level domains supported for registration. - - Description for Get all top-level domains supported for registration. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TopLevelDomain - :rtype: - ~azure.mgmt.web.v2020_06_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2020_06_01.models.TopLevelDomain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} - - def get( - self, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TopLevelDomain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.TopLevelDomain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TopLevelDomain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} - - def list_agreements( - self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): - """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 include_privacy: If true, then the list of - agreements will include agreements for domain privacy as well; - otherwise, false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TldLegalAgreement - :rtype: - ~azure.mgmt.web.v2020_06_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2020_06_01.models.TldLegalAgreement] - :raises: - :class:`DefaultErrorResponseException` - """ - agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_agreements.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_apps_operations.py deleted file mode 100644 index 3280739d993..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_apps_operations.py +++ /dev/null @@ -1,27494 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class WebAppsOperations(object): - """WebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all apps for a subscription. - - Description for Get all apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} - - def list_by_resource_group( - self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - if include_slots is not None: - query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.Site - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def delete( - self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SitePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def analyze_custom_hostname( - self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} - - def apply_slot_config_to_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_config_to_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} - - def backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} - - def list_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_06_01.models.BackupItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} - - def get_backup_status( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def delete_backup( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def list_backup_status_secrets( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} - - - def _restore_initial( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} - - def get_basic_publishing_credentials_policies( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesCollection or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesCollection - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_basic_publishing_credentials_policies.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} - - def get_ftp_allowed( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ftp_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} - - def update_ftp_allowed( - self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): - """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 allow: true to allow access to a publishing - method; otherwise, false. - :type allow: bool - :param kind: Kind of resource. - :type kind: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) - - # Construct URL - url = self.update_ftp_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} - - def get_scm_allowed( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_scm_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} - - def update_scm_allowed( - self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): - """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 allow: true to allow access to a publishing - method; otherwise, false. - :type allow: bool - :param kind: Kind of resource. - :type kind: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) - - # Construct URL - url = self.update_scm_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} - - def list_configurations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} - - def update_application_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} - - def list_application_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} - - def update_auth_settings( - self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteAuthSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} - - def get_auth_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} - - def update_auth_settings_v2( - self, resource_group_name, name, site_auth_settings_v2, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteAuthSettingsV2 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} - - def get_auth_settings_v2( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} - - def update_azure_storage_accounts( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2020_06_01.models.AzureStorageInfoValue] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) - - # Construct URL - url = self.update_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} - - def list_azure_storage_accounts( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} - - def update_backup_configuration( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def delete_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def get_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} - - def update_connection_strings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2020_06_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} - - def list_connection_strings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_diagnostic_logs_config( - self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteLogsConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_metadata( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} - - def list_metadata( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} - - - def _list_publishing_credentials_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} - - def update_site_push_settings( - self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PushSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} - - def list_site_push_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} - - def list_slot_configuration_names( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def update_slot_configuration_names( - self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SlotConfigNamesResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def get_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def create_or_update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def list_configuration_snapshot_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} - - def get_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.recover_site_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} - - def get_container_logs_zip( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} - - def list_continuous_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_06_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} - - def get_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DeploymentPaged[~azure.mgmt.web.v2020_06_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} - - def get_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def create_deployment( - self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def delete_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def list_deployment_log( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} - - def discover_backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} - - def list_domain_ownership_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_06_01.models.IdentifierPaged[~azure.mgmt.web.v2020_06_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_initial( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_ms_deploy_operation_initial( - resource_group_name=resource_group_name, - name=name, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - def get_ms_deploy_log( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} - - def list_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} - - def get_functions_admin_token( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} - - def get_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - - def _create_function_initial( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_function( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_function_initial( - resource_group_name=resource_group_name, - name=name, - function_name=function_name, - function_envelope=function_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def delete_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def create_or_update_function_secret( - self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def delete_function_secret( - self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} - - def list_function_secrets( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} - - def list_host_keys( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} - - def list_sync_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} - - def sync_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} - - def create_or_update_host_secret( - self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def delete_host_secret( - self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2020_06_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_06_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} - - def get_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding( - self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.HostNameBinding - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def delete_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} - - def list_relay_service_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} - - def get_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def delete_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def list_instance_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebSiteInstanceStatus - :rtype: - ~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatus] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} - - def get_instance_info( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebSiteInstanceStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebSiteInstanceStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} - - def get_instance_ms_deploy_status( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - - def _create_instance_ms_deploy_operation_initial( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} - - def list_instance_processes( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} - - def get_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} - - def list_instance_process_modules( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module( - self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} - - def list_instance_process_threads( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} - - def is_cloneable( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} - - def list_site_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_06_01.models.BackupItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} - - def list_sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} - - - def _migrate_storage_initial( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_storage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_storage( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.StorageMigrationOptions - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StorageMigrationResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.StorageMigrationResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.StorageMigrationResponse]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_storage_initial( - subscription_name=subscription_name, - resource_group_name=resource_group_name, - name=name, - migration_options=migration_options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} - - - def _migrate_my_sql_initial( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_my_sql.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_my_sql( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.MigrateMySqlRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Operation or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.Operation] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.Operation]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_my_sql_initial( - resource_group_name=resource_group_name, - name=name, - migration_request_envelope=migration_request_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} - - def get_migrate_my_sql_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} - - def get_swift_virtual_network_connection( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def create_or_update_swift_virtual_network_connection( - self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_swift_virtual_network.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def update_swift_virtual_network_connection( - self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def list_network_features( - self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): - """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. This can either be "summary" or - "detailed". - :type view: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_network_features.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} - - def get_network_trace_operation( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} - - def stop_web_site_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} - - def get_network_traces( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} - - def get_network_trace_operation_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} - - def get_network_traces_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.generate_new_site_publishing_password.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} - - def list_perf_mon_counters( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2020_06_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_06_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} - - def get_site_php_error_log_flag( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} - - def list_premier_add_ons( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} - - def get_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PremierAddOn - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PremierAddOnPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def get_private_access( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def put_private_access_vnet( - self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PrivateAccess - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def list_processes( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} - - def get_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def delete_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def get_process_dump( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} - - def list_process_modules( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} - - def get_process_module( - self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} - - def list_public_certificates( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2020_06_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_06_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} - - def get_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate( - self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PublicCertificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets( - self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """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 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_06_01.models.PublishingProfileFormat - :param include_disaster_recovery_endpoints: Include the - DisasterRecover endpoint if true - :type include_disaster_recovery_endpoints: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} - - def reset_production_slot_config( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_production_slot_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} - - def restart( - self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} - - - def _restore_from_backup_blob_initial( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob( - self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_backup_blob_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.DeletedAppRestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_deleted_app_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} - - - def _restore_snapshot_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.SnapshotRestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_snapshot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} - - def list_site_extensions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} - - def get_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_initial( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._install_site_extension_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def delete_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _copy_production_slot_initial( - self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, **operation_config): - copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) - - # Construct URL - url = self.copy_production_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def copy_production_slot( - self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): - """Copies a deployment slot to another deployment slot of an app. - - Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. - :type target_slot: str - :param site_config: The site object which will be merged with the - source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2020_06_01.models.SiteConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._copy_production_slot_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - site_config=site_config, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} - - def list_slots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SitePaged[~azure.mgmt.web.v2020_06_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} - - def get_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - - def _create_or_update_slot_initial( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.Site - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def delete_slot( - self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """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 true if the App Service plan - will be empty after app deletion and you want to delete the empty App - Service plan. By default, the empty App Service plan is not deleted. - :type delete_empty_server_farm: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SitePatchResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def analyze_custom_hostname_slot( - self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} - - def apply_slot_configuration_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} - - def backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} - - def list_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_06_01.models.BackupItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} - - def get_backup_status_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def delete_backup_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def list_backup_status_secrets_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.BackupRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} - - - def _restore_slot_initial( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_slot_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} - - def list_configurations_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} - - def update_application_settings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} - - def list_application_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} - - def update_auth_settings_slot( - self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteAuthSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} - - def get_auth_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} - - def update_auth_settings_v2_slot( - self, resource_group_name, name, site_auth_settings_v2, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteAuthSettingsV2 - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_v2_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} - - def get_auth_settings_v2_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_v2_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} - - def update_azure_storage_accounts_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2020_06_01.models.AzureStorageInfoValue] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) - - # Construct URL - url = self.update_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} - - def list_azure_storage_accounts_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} - - def update_backup_configuration_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def delete_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def get_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} - - def update_connection_strings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2020_06_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} - - def list_connection_strings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_diagnostic_logs_config_slot( - self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteLogsConfig - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_metadata_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} - - def list_metadata_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} - - - def _list_publishing_credentials_slot_initial( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} - - def update_site_push_settings_slot( - self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PushSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} - - def list_site_push_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} - - def get_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def create_or_update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def list_configuration_snapshot_info_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} - - def get_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.recover_site_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} - - def get_container_logs_zip_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} - - def list_continuous_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_06_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} - - def get_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2020_06_01.models.DeploymentPaged[~azure.mgmt.web.v2020_06_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} - - def get_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def create_deployment_slot( - self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def delete_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def list_deployment_log_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} - - def discover_backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} - - def list_domain_ownership_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_06_01.models.IdentifierPaged[~azure.mgmt.web.v2020_06_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation_slot( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_ms_deploy_operation_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - def get_ms_deploy_log_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} - - def list_instance_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} - - def get_functions_admin_token_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} - - def get_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - - def _create_instance_function_slot_initial( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_function_slot( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def delete_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def create_or_update_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} - - def list_function_secrets_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} - - def list_host_keys_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} - - def list_sync_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} - - def sync_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} - - def create_or_update_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2020_06_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_06_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} - - def get_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding_slot( - self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.HostNameBinding - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def delete_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def get_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} - - def list_relay_service_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} - - def get_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def delete_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def list_instance_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebSiteInstanceStatus - :rtype: - ~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatus] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} - - def get_instance_info_slot( - self, resource_group_name, name, instance_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebSiteInstanceStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.WebSiteInstanceStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebSiteInstanceStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} - - def get_instance_ms_deploy_status_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - - def _create_instance_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation_slot( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_processes_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} - - def get_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_process_modules_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def list_instance_process_threads_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} - - def is_cloneable_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} - - def list_site_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_06_01.models.BackupItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} - - def list_sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} - - def get_migrate_my_sql_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} - - def get_swift_virtual_network_connection_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def create_or_update_swift_virtual_network_connection_slot( - self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_swift_virtual_network_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def update_swift_virtual_network_connection_slot( - self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def list_network_features_slot( - self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): - """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. This can either be "summary" or - "detailed". - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_network_features_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} - - def get_network_trace_operation_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} - - def stop_web_site_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} - - def get_network_traces_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} - - def get_network_trace_operation_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def get_network_traces_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.generate_new_site_publishing_password_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} - - def list_perf_mon_counters_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2020_06_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_06_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} - - def get_site_php_error_log_flag_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} - - def list_premier_add_ons_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} - - def get_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PremierAddOn - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PremierAddOnPatchResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def get_private_access_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def put_private_access_vnet_slot( - self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PrivateAccess - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def get_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """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: - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.PrivateEndpointConnectionResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _approve_or_reject_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.approve_or_reject_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - if response.status_code == 202: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def approve_or_reject_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_06_01.models.PrivateLinkConnectionState - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnectionResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.PrivateEndpointConnectionResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.PrivateEndpointConnectionResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - kind=kind, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 202: - deserialized = self._deserialize('object', response) - if response.status_code == 204: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_private_endpoint_connection_initial( - resource_group_name=resource_group_name, - name=name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def get_private_link_resources( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PrivateLinkResourcesWrapper - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_link_resources.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} - - def list_processes_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} - - def get_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def delete_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def get_process_dump_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} - - def list_process_modules_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} - - def get_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} - - def list_public_certificates_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2020_06_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_06_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} - - def get_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate_slot( - self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.PublicCertificate - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets_slot( - self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """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 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_06_01.models.PublishingProfileFormat - :param include_disaster_recovery_endpoints: Include the - DisasterRecover endpoint if true - :type include_disaster_recovery_endpoints: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} - - def reset_slot_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} - - def restart_slot( - self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} - - - def _restore_from_backup_blob_slot_initial( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_backup_blob_slot_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.DeletedAppRestoreRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_deleted_app_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} - - - def _restore_snapshot_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.SnapshotRestoreRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_snapshot_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} - - def list_site_extensions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} - - def get_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_slot_initial( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._install_site_extension_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def delete_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _copy_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, **operation_config): - copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) - - # Construct URL - url = self.copy_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def copy_slot_slot( - self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): - """Copies a deployment slot to another deployment slot of an app. - - Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. - :type target_slot: str - :param site_config: The site object which will be merged with the - source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2020_06_01.models.SiteConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._copy_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - site_config=site_config, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - copy_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} - - def list_slot_differences_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_06_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} - - - def _swap_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._swap_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} - - def list_snapshots_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SnapshotPaged[~azure.mgmt.web.v2020_06_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} - - def list_snapshots_from_dr_secondary_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SnapshotPaged[~azure.mgmt.web.v2020_06_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} - - def get_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - - def _create_or_update_source_control_slot_initial( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def delete_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def start_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} - - - def _start_network_trace_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} - - def stop_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} - - def stop_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} - - def sync_repository_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_repository_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} - - def sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} - - def list_triggered_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2020_06_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} - - def get_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def run_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.run_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} - - def list_usages_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} - - def list_vnet_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} - - def get_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2020_06_01.models.WebJobPaged[~azure.mgmt.web.v2020_06_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} - - def get_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} - - def list_slot_differences_from_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_06_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_from_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} - - - def _swap_slot_with_production_initial( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_with_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_with_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._swap_slot_with_production_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} - - def list_snapshots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SnapshotPaged[~azure.mgmt.web.v2020_06_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} - - def list_snapshots_from_dr_secondary( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SnapshotPaged[~azure.mgmt.web.v2020_06_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} - - def get_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - - def _create_or_update_source_control_initial( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): - """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_06_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def delete_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def start( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} - - - def _start_network_trace_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} - - def stop( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} - - def stop_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} - - def sync_repository( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_repository.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} - - def sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} - - def list_triggered_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2020_06_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} - - def get_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history( - self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} - - def run_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.run_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} - - def list_vnet_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_06_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} - - def get_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2020_06_01.models.WebJobPaged[~azure.mgmt.web.v2020_06_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} - - def get_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_site_management_client_operations.py deleted file mode 100644 index da3d3526107..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/operations/_web_site_management_client_operations.py +++ /dev/null @@ -1,1061 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -from .. import models -import uuid - - -class WebSiteManagementClientOperationsMixin(object): - - def get_publishing_user( - self, custom_headers=None, raw=False, **operation_config): - """Gets publishing user. - - Description for Gets publishing user. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def update_publishing_user( - self, user_details, custom_headers=None, raw=False, **operation_config): - """Updates publishing user. - - Description for Updates publishing user. - - :param user_details: Details of publishing user - :type user_details: ~azure.mgmt.web.v2020_06_01.models.User - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(user_details, 'User') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def list_source_controls( - self, custom_headers=None, raw=False, **operation_config): - """Gets the source controls available for Azure websites. - - Description for Gets the source controls available for Azure websites. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SourceControl - :rtype: - ~azure.mgmt.web.v2020_06_01.models.SourceControlPaged[~azure.mgmt.web.v2020_06_01.models.SourceControl] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_source_controls.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} - - def get_source_control( - self, source_control_type, custom_headers=None, raw=False, **operation_config): - """Gets source control token. - - Description for Gets source control token. - - :param source_control_type: Type of source control - :type source_control_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def update_source_control( - self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.SourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_message, 'SourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def list_billing_meters( - self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BillingMeter - :rtype: - ~azure.mgmt.web.v2020_06_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeter] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_billing_meters.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} - - def check_name_availability( - self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): - """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. 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_06_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. - :type is_fqdn: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) - - # Construct URL - url = self.check_name_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceNameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} - - def get_subscription_deployment_locations( - self, custom_headers=None, raw=False, **operation_config): - """Gets list of available geo regions plus ministamps. - - Description for Gets list of available geo regions plus ministamps. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_subscription_deployment_locations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeploymentLocations', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} - - def list_geo_regions( - self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values - include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' - :type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName - :param linux_workers_enabled: Specify true if you want to - filter to only regions that support Linux workers. - :type linux_workers_enabled: bool - :param xenon_workers_enabled: Specify true if you want to - filter to only regions that support Xenon workers. - :type xenon_workers_enabled: bool - :param linux_dynamic_workers_enabled: Specify true if you - want to filter to only regions that support Linux Consumption Workers. - :type linux_dynamic_workers_enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GeoRegion - :rtype: - ~azure.mgmt.web.v2020_06_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegion] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_geo_regions.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} - - def list_site_identifiers_assigned_to_host_name( - self, name=None, custom_headers=None, raw=False, **operation_config): - """List all apps that are assigned to a hostname. - - Description for List all apps that are assigned to a hostname. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_06_01.models.IdentifierPaged[~azure.mgmt.web.v2020_06_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} - - def list_premier_add_on_offers( - self, custom_headers=None, raw=False, **operation_config): - """List all premier add-on offers. - - Description for List all premier add-on offers. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PremierAddOnOffer - :rtype: - ~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOffer] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_premier_add_on_offers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} - - def list_skus( - self, custom_headers=None, raw=False, **operation_config): - """List all SKUs. - - Description for List all SKUs. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_skus.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SkuInfos', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} - - def verify_hosting_environment_vnet( - self, parameters, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.VnetParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetValidationFailureDetails or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_hosting_environment_vnet.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VnetParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetValidationFailureDetails', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} - - def move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} - - def validate( - self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): - """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_06_01.models.ValidateRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_request, 'ValidateRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidateResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} - - def validate_move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.validate_move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_06_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_web_site_management_client.py deleted file mode 100644 index 5b6463b1e27..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/_web_site_management_client.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import WebSiteManagementClientOperationsMixin -from .operations import AppServiceCertificateOrdersOperations -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 ProviderOperations -from .operations import RecommendationsOperations -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, SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar app_service_certificate_orders: AppServiceCertificateOrders operations - :vartype app_service_certificate_orders: azure.mgmt.web.v2020_09_01.operations.AppServiceCertificateOrdersOperations - :ivar certificate_registration_provider: CertificateRegistrationProvider operations - :vartype certificate_registration_provider: azure.mgmt.web.v2020_09_01.operations.CertificateRegistrationProviderOperations - :ivar domains: Domains operations - :vartype domains: azure.mgmt.web.v2020_09_01.operations.DomainsOperations - :ivar top_level_domains: TopLevelDomains operations - :vartype top_level_domains: azure.mgmt.web.v2020_09_01.operations.TopLevelDomainsOperations - :ivar domain_registration_provider: DomainRegistrationProvider operations - :vartype domain_registration_provider: azure.mgmt.web.v2020_09_01.operations.DomainRegistrationProviderOperations - :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.web.v2020_09_01.operations.CertificatesOperations - :ivar deleted_web_apps: DeletedWebApps operations - :vartype deleted_web_apps: azure.mgmt.web.v2020_09_01.operations.DeletedWebAppsOperations - :ivar diagnostics: Diagnostics operations - :vartype diagnostics: azure.mgmt.web.v2020_09_01.operations.DiagnosticsOperations - :ivar provider: Provider operations - :vartype provider: azure.mgmt.web.v2020_09_01.operations.ProviderOperations - :ivar recommendations: Recommendations operations - :vartype recommendations: azure.mgmt.web.v2020_09_01.operations.RecommendationsOperations - :ivar web_apps: WebApps operations - :vartype web_apps: azure.mgmt.web.v2020_09_01.operations.WebAppsOperations - :ivar static_sites: StaticSites operations - :vartype static_sites: azure.mgmt.web.v2020_09_01.operations.StaticSitesOperations - :ivar app_service_environments: AppServiceEnvironments operations - :vartype app_service_environments: azure.mgmt.web.v2020_09_01.operations.AppServiceEnvironmentsOperations - :ivar app_service_plans: AppServicePlans operations - :vartype app_service_plans: azure.mgmt.web.v2020_09_01.operations.AppServicePlansOperations - :ivar resource_health_metadata: ResourceHealthMetadata operations - :vartype resource_health_metadata: azure.mgmt.web.v2020_09_01.operations.ResourceHealthMetadataOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-09-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( - 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.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) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/__init__.py deleted file mode 100644 index 363b29d7ec4..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/__init__.py +++ /dev/null @@ -1,1146 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -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 ApiManagementConfig - from ._models_py3 import ApplicationLogsConfig - from ._models_py3 import ApplicationStack - from ._models_py3 import ApplicationStackResource - from ._models_py3 import AppRegistration - from ._models_py3 import AppServiceCertificate - from ._models_py3 import AppServiceCertificateOrder - from ._models_py3 import AppServiceCertificateOrderPatchResource - from ._models_py3 import AppServiceCertificatePatchResource - from ._models_py3 import AppServiceCertificateResource - from ._models_py3 import AppServiceEnvironment - from ._models_py3 import AppServiceEnvironmentPatchResource - from ._models_py3 import AppServiceEnvironmentResource - from ._models_py3 import AppserviceGithubToken - from ._models_py3 import AppserviceGithubTokenRequest - from ._models_py3 import AppServicePlan - from ._models_py3 import AppServicePlanPatchResource - from ._models_py3 import ArmIdWrapper - 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 AzureStorageInfoValue - from ._models_py3 import AzureStoragePropertyDictionaryResource - from ._models_py3 import AzureTableStorageApplicationLogsConfig - from ._models_py3 import BackupItem - from ._models_py3 import BackupRequest - from ._models_py3 import BackupSchedule - from ._models_py3 import BillingMeter - from ._models_py3 import BlobStorageTokenStore - from ._models_py3 import Capability - from ._models_py3 import Certificate - from ._models_py3 import CertificateDetails - from ._models_py3 import CertificateEmail - from ._models_py3 import CertificateOrderAction - from ._models_py3 import CertificatePatchResource - from ._models_py3 import ClientRegistration - from ._models_py3 import CloningInfo - from ._models_py3 import ConnectionStringDictionary - from ._models_py3 import ConnStringInfo - from ._models_py3 import ConnStringValueTypePair - 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 CookieExpiration - from ._models_py3 import CorsSettings - from ._models_py3 import CsmCopySlotEntity - from ._models_py3 import CsmMoveResourceEnvelope - 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 CustomHostnameAnalysisResult - from ._models_py3 import CustomOpenIdConnectProvider - from ._models_py3 import DatabaseBackupSetting - from ._models_py3 import DataSource - from ._models_py3 import DataTableResponseColumn - from ._models_py3 import DataTableResponseObject - from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException - from ._models_py3 import DefaultErrorResponseError - from ._models_py3 import DefaultErrorResponseErrorDetailsItem - from ._models_py3 import DeletedAppRestoreRequest - from ._models_py3 import DeletedSite - from ._models_py3 import Deployment - 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 DiagnosticAnalysis - from ._models_py3 import DiagnosticCategory - from ._models_py3 import DiagnosticData - 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 DomainControlCenterSsoRequest - from ._models_py3 import DomainOwnershipIdentifier - 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 FunctionEnvelope - from ._models_py3 import FunctionSecrets - from ._models_py3 import GeoRegion - from ._models_py3 import GitHub - from ._models_py3 import GlobalCsmSkuDescription - from ._models_py3 import GlobalValidation - from ._models_py3 import Google - from ._models_py3 import HandlerMapping - from ._models_py3 import HostingEnvironmentDeploymentInfo - from ._models_py3 import HostingEnvironmentDiagnostics - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostKeys - from ._models_py3 import HostName - from ._models_py3 import HostNameBinding - from ._models_py3 import HostNameSslState - from ._models_py3 import HttpLogsConfig - from ._models_py3 import HttpSettings - from ._models_py3 import HttpSettingsRoutes - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import HybridConnectionLimits - from ._models_py3 import Identifier - from ._models_py3 import IdentityProviders - from ._models_py3 import InboundEnvironmentEndpoint - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import JwtClaimChecks - from ._models_py3 import KeyInfo - from ._models_py3 import LocalizableString - from ._models_py3 import Login - from ._models_py3 import LoginRoutes - from ._models_py3 import LoginScopes - from ._models_py3 import LogSpecification - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models_py3 import MetricAvailability - from ._models_py3 import MetricSpecification - from ._models_py3 import MigrateMySqlRequest - from ._models_py3 import MigrateMySqlStatus - from ._models_py3 import MSDeploy - from ._models_py3 import MSDeployLog - from ._models_py3 import MSDeployLogEntry - from ._models_py3 import MSDeployStatus - from ._models_py3 import NameIdentifier - from ._models_py3 import NameValuePair - from ._models_py3 import NetworkAccessControlEntry - 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 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 PremierAddOnPatchResource - from ._models_py3 import PrivateAccess - from ._models_py3 import PrivateAccessSubnet - from ._models_py3 import PrivateAccessVirtualNetwork - from ._models_py3 import PrivateEndpointConnectionResource - 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 ProcessModuleInfo - from ._models_py3 import ProcessThreadInfo - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PublicCertificate - from ._models_py3 import PushSettings - from ._models_py3 import RampUpRule - from ._models_py3 import Recommendation - from ._models_py3 import RecommendationRule - from ._models_py3 import ReissueCertificateOrderRequest - from ._models_py3 import RelayServiceConnectionEntity - from ._models_py3 import Rendering - from ._models_py3 import RenewCertificateOrderRequest - from ._models_py3 import RequestsBasedTrigger - from ._models_py3 import Resource - from ._models_py3 import ResourceHealthMetadata - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - from ._models_py3 import ResourceNameAvailability - from ._models_py3 import ResourceNameAvailabilityRequest - from ._models_py3 import ResponseMetaData - from ._models_py3 import RestoreRequest - 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 SiteConfigResource - from ._models_py3 import SiteConfigurationSnapshotInfo - from ._models_py3 import SiteExtensionInfo - 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 SkuInfos - from ._models_py3 import SlotConfigNamesResource - from ._models_py3 import SlotDifference - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import Snapshot - from ._models_py3 import SnapshotRecoverySource - from ._models_py3 import SnapshotRestoreRequest - from ._models_py3 import Solution - from ._models_py3 import SourceControl - from ._models_py3 import StackMajorVersion - from ._models_py3 import StackMinorVersion - from ._models_py3 import StampCapacity - from ._models_py3 import StaticSiteARMResource - from ._models_py3 import StaticSiteBuildARMResource - from ._models_py3 import StaticSiteBuildProperties - from ._models_py3 import StaticSiteCustomDomainOverviewARMResource - from ._models_py3 import StaticSiteFunctionOverviewARMResource - from ._models_py3 import StaticSitePatchResource - from ._models_py3 import StaticSiteResetPropertiesARMResource - from ._models_py3 import StaticSitesWorkflowPreview - from ._models_py3 import StaticSitesWorkflowPreviewRequest - from ._models_py3 import StaticSiteUserARMResource - from ._models_py3 import StaticSiteUserInvitationRequestResource - from ._models_py3 import StaticSiteUserInvitationResponseResource - from ._models_py3 import StatusCodesBasedTrigger - from ._models_py3 import StorageMigrationOptions - from ._models_py3 import StorageMigrationResponse - from ._models_py3 import StringDictionary - from ._models_py3 import SwiftVirtualNetwork - from ._models_py3 import SystemData - from ._models_py3 import TldLegalAgreement - from ._models_py3 import TokenStore - from ._models_py3 import TopLevelDomain - from ._models_py3 import TopLevelDomainAgreementOption - from ._models_py3 import TriggeredJobHistory - from ._models_py3 import TriggeredJobRun - from ._models_py3 import TriggeredWebJob - from ._models_py3 import Twitter - from ._models_py3 import TwitterRegistration - from ._models_py3 import Usage - 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 WebJob - from ._models_py3 import WebSiteInstanceStatus - from ._models_py3 import WorkerPool - from ._models_py3 import WorkerPoolResource -except (SyntaxError, ImportError): - from ._models import AbnormalTimePeriod - from ._models import Address - from ._models import AddressResponse - from ._models import AllowedAudiencesValidation - from ._models import AnalysisData - from ._models import AnalysisDefinition - from ._models import ApiDefinitionInfo - from ._models import ApiManagementConfig - from ._models import ApplicationLogsConfig - from ._models import ApplicationStack - from ._models import ApplicationStackResource - from ._models import AppRegistration - from ._models import AppServiceCertificate - from ._models import AppServiceCertificateOrder - from ._models import AppServiceCertificateOrderPatchResource - from ._models import AppServiceCertificatePatchResource - from ._models import AppServiceCertificateResource - from ._models import AppServiceEnvironment - from ._models import AppServiceEnvironmentPatchResource - from ._models import AppServiceEnvironmentResource - from ._models import AppserviceGithubToken - from ._models import AppserviceGithubTokenRequest - from ._models import AppServicePlan - from ._models import AppServicePlanPatchResource - from ._models import ArmIdWrapper - from ._models import AuthPlatform - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import AzureActiveDirectory - from ._models import AzureActiveDirectoryLogin - from ._models import AzureActiveDirectoryRegistration - from ._models import AzureActiveDirectoryValidation - from ._models import AzureBlobStorageApplicationLogsConfig - from ._models import AzureBlobStorageHttpLogsConfig - from ._models import AzureStorageInfoValue - from ._models import AzureStoragePropertyDictionaryResource - from ._models import AzureTableStorageApplicationLogsConfig - from ._models import BackupItem - from ._models import BackupRequest - from ._models import BackupSchedule - from ._models import BillingMeter - from ._models import BlobStorageTokenStore - from ._models import Capability - from ._models import Certificate - from ._models import CertificateDetails - from ._models import CertificateEmail - from ._models import CertificateOrderAction - from ._models import CertificatePatchResource - from ._models import ClientRegistration - from ._models import CloningInfo - from ._models import ConnectionStringDictionary - from ._models import ConnStringInfo - from ._models import ConnStringValueTypePair - from ._models import Contact - from ._models import ContainerCpuStatistics - from ._models import ContainerCpuUsage - from ._models import ContainerInfo - from ._models import ContainerMemoryStatistics - from ._models import ContainerNetworkInterfaceStatistics - from ._models import ContainerThrottlingData - from ._models import ContinuousWebJob - from ._models import CookieExpiration - from ._models import CorsSettings - from ._models import CsmCopySlotEntity - from ._models import CsmMoveResourceEnvelope - from ._models import CsmOperationDescription - from ._models import CsmOperationDescriptionProperties - from ._models import CsmOperationDisplay - from ._models import CsmPublishingCredentialsPoliciesCollection - from ._models import CsmPublishingCredentialsPoliciesEntity - from ._models import CsmPublishingProfileOptions - from ._models import CsmSlotEntity - from ._models import CsmUsageQuota - from ._models import CustomHostnameAnalysisResult - from ._models import CustomOpenIdConnectProvider - from ._models import DatabaseBackupSetting - from ._models import DataSource - from ._models import DataTableResponseColumn - from ._models import DataTableResponseObject - from ._models import DefaultErrorResponse, DefaultErrorResponseException - from ._models import DefaultErrorResponseError - from ._models import DefaultErrorResponseErrorDetailsItem - from ._models import DeletedAppRestoreRequest - from ._models import DeletedSite - from ._models import Deployment - from ._models import DeploymentLocations - from ._models import DetectorAbnormalTimePeriod - from ._models import DetectorDefinition - from ._models import DetectorInfo - from ._models import DetectorResponse - from ._models import DiagnosticAnalysis - from ._models import DiagnosticCategory - from ._models import DiagnosticData - from ._models import DiagnosticDetectorResponse - from ._models import DiagnosticMetricSample - from ._models import DiagnosticMetricSet - from ._models import Dimension - from ._models import Domain - from ._models import DomainAvailabilityCheckResult - from ._models import DomainControlCenterSsoRequest - from ._models import DomainOwnershipIdentifier - from ._models import DomainPatchResource - from ._models import DomainPurchaseConsent - from ._models import DomainRecommendationSearchParameters - from ._models import EnabledConfig - from ._models import EndpointDependency - from ._models import EndpointDetail - from ._models import ErrorEntity - from ._models import Experiments - from ._models import Facebook - from ._models import FileSystemApplicationLogsConfig - from ._models import FileSystemHttpLogsConfig - from ._models import FileSystemTokenStore - from ._models import ForwardProxy - from ._models import FunctionEnvelope - from ._models import FunctionSecrets - from ._models import GeoRegion - from ._models import GitHub - from ._models import GlobalCsmSkuDescription - from ._models import GlobalValidation - from ._models import Google - from ._models import HandlerMapping - from ._models import HostingEnvironmentDeploymentInfo - from ._models import HostingEnvironmentDiagnostics - from ._models import HostingEnvironmentProfile - from ._models import HostKeys - from ._models import HostName - from ._models import HostNameBinding - from ._models import HostNameSslState - from ._models import HttpLogsConfig - from ._models import HttpSettings - from ._models import HttpSettingsRoutes - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import HybridConnectionLimits - from ._models import Identifier - from ._models import IdentityProviders - from ._models import InboundEnvironmentEndpoint - from ._models import IpSecurityRestriction - from ._models import JwtClaimChecks - from ._models import KeyInfo - from ._models import LocalizableString - from ._models import Login - from ._models import LoginRoutes - from ._models import LoginScopes - from ._models import LogSpecification - from ._models import ManagedServiceIdentity - from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models import MetricAvailability - from ._models import MetricSpecification - from ._models import MigrateMySqlRequest - from ._models import MigrateMySqlStatus - from ._models import MSDeploy - from ._models import MSDeployLog - from ._models import MSDeployLogEntry - from ._models import MSDeployStatus - from ._models import NameIdentifier - from ._models import NameValuePair - from ._models import NetworkAccessControlEntry - from ._models import NetworkFeatures - from ._models import NetworkTrace - from ._models import Nonce - from ._models import OpenIdConnectClientCredential - from ._models import OpenIdConnectConfig - from ._models import OpenIdConnectLogin - from ._models import OpenIdConnectRegistration - from ._models import Operation - from ._models import OutboundEnvironmentEndpoint - from ._models import PerfMonResponse - from ._models import PerfMonSample - from ._models import PerfMonSet - from ._models import PremierAddOn - from ._models import PremierAddOnOffer - from ._models import PremierAddOnPatchResource - from ._models import PrivateAccess - from ._models import PrivateAccessSubnet - from ._models import PrivateAccessVirtualNetwork - from ._models import PrivateEndpointConnectionResource - from ._models import PrivateLinkConnectionApprovalRequestResource - from ._models import PrivateLinkConnectionState - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourceProperties - from ._models import PrivateLinkResourcesWrapper - from ._models import ProcessInfo - from ._models import ProcessModuleInfo - from ._models import ProcessThreadInfo - from ._models import ProxyOnlyResource - from ._models import PublicCertificate - from ._models import PushSettings - from ._models import RampUpRule - from ._models import Recommendation - from ._models import RecommendationRule - from ._models import ReissueCertificateOrderRequest - from ._models import RelayServiceConnectionEntity - from ._models import Rendering - from ._models import RenewCertificateOrderRequest - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceHealthMetadata - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceNameAvailability - from ._models import ResourceNameAvailabilityRequest - from ._models import ResponseMetaData - from ._models import RestoreRequest - from ._models import ServiceSpecification - from ._models import Site - from ._models import SiteAuthSettings - from ._models import SiteAuthSettingsV2 - from ._models import SiteCloneability - from ._models import SiteCloneabilityCriterion - from ._models import SiteConfig - from ._models import SiteConfigResource - from ._models import SiteConfigurationSnapshotInfo - from ._models import SiteExtensionInfo - from ._models import SiteLimits - from ._models import SiteLogsConfig - from ._models import SiteMachineKey - from ._models import SitePatchResource - from ._models import SitePhpErrorLogFlag - from ._models import SiteSeal - from ._models import SiteSealRequest - from ._models import SiteSourceControl - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SkuInfo - from ._models import SkuInfos - from ._models import SlotConfigNamesResource - from ._models import SlotDifference - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import Snapshot - from ._models import SnapshotRecoverySource - from ._models import SnapshotRestoreRequest - from ._models import Solution - from ._models import SourceControl - from ._models import StackMajorVersion - from ._models import StackMinorVersion - from ._models import StampCapacity - from ._models import StaticSiteARMResource - from ._models import StaticSiteBuildARMResource - from ._models import StaticSiteBuildProperties - from ._models import StaticSiteCustomDomainOverviewARMResource - from ._models import StaticSiteFunctionOverviewARMResource - from ._models import StaticSitePatchResource - from ._models import StaticSiteResetPropertiesARMResource - from ._models import StaticSitesWorkflowPreview - from ._models import StaticSitesWorkflowPreviewRequest - from ._models import StaticSiteUserARMResource - from ._models import StaticSiteUserInvitationRequestResource - from ._models import StaticSiteUserInvitationResponseResource - from ._models import StatusCodesBasedTrigger - from ._models import StorageMigrationOptions - from ._models import StorageMigrationResponse - from ._models import StringDictionary - from ._models import SwiftVirtualNetwork - from ._models import SystemData - from ._models import TldLegalAgreement - from ._models import TokenStore - from ._models import TopLevelDomain - from ._models import TopLevelDomainAgreementOption - from ._models import TriggeredJobHistory - from ._models import TriggeredJobRun - from ._models import TriggeredWebJob - from ._models import Twitter - from ._models import TwitterRegistration - from ._models import Usage - from ._models import User - from ._models import ValidateRequest - from ._models import ValidateResponse - from ._models import ValidateResponseError - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VirtualIPMapping - from ._models import VirtualNetworkProfile - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetParameters - from ._models import VnetRoute - from ._models import VnetValidationFailureDetails - from ._models import VnetValidationTestFailure - from ._models import WebAppCollection - from ._models import WebJob - from ._models import WebSiteInstanceStatus - from ._models import WorkerPool - from ._models import WorkerPoolResource -from ._paged_models import AnalysisDefinitionPaged -from ._paged_models import ApplicationStackResourcePaged -from ._paged_models import AppServiceCertificateOrderPaged -from ._paged_models import AppServiceCertificateResourcePaged -from ._paged_models import AppServiceEnvironmentResourcePaged -from ._paged_models import AppServicePlanPaged -from ._paged_models import BackupItemPaged -from ._paged_models import BillingMeterPaged -from ._paged_models import CertificatePaged -from ._paged_models import ContinuousWebJobPaged -from ._paged_models import CsmOperationDescriptionPaged -from ._paged_models import CsmUsageQuotaPaged -from ._paged_models import DeletedSitePaged -from ._paged_models import DeploymentPaged -from ._paged_models import DetectorDefinitionPaged -from ._paged_models import DetectorResponsePaged -from ._paged_models import DiagnosticCategoryPaged -from ._paged_models import DomainOwnershipIdentifierPaged -from ._paged_models import DomainPaged -from ._paged_models import FunctionEnvelopePaged -from ._paged_models import GeoRegionPaged -from ._paged_models import HostNameBindingPaged -from ._paged_models import HybridConnectionPaged -from ._paged_models import IdentifierPaged -from ._paged_models import InboundEnvironmentEndpointPaged -from ._paged_models import NameIdentifierPaged -from ._paged_models import OutboundEnvironmentEndpointPaged -from ._paged_models import PerfMonResponsePaged -from ._paged_models import PremierAddOnOfferPaged -from ._paged_models import ProcessInfoPaged -from ._paged_models import ProcessModuleInfoPaged -from ._paged_models import ProcessThreadInfoPaged -from ._paged_models import PublicCertificatePaged -from ._paged_models import RecommendationPaged -from ._paged_models import ResourceHealthMetadataPaged -from ._paged_models import ResourceMetricDefinitionPaged -from ._paged_models import SiteConfigResourcePaged -from ._paged_models import SiteConfigurationSnapshotInfoPaged -from ._paged_models import SiteExtensionInfoPaged -from ._paged_models import SitePaged -from ._paged_models import SkuInfoPaged -from ._paged_models import SlotDifferencePaged -from ._paged_models import SnapshotPaged -from ._paged_models import SourceControlPaged -from ._paged_models import StampCapacityPaged -from ._paged_models import StaticSiteARMResourcePaged -from ._paged_models import StaticSiteBuildARMResourcePaged -from ._paged_models import StaticSiteCustomDomainOverviewARMResourcePaged -from ._paged_models import StaticSiteFunctionOverviewARMResourcePaged -from ._paged_models import StaticSiteUserARMResourcePaged -from ._paged_models import StrPaged -from ._paged_models import TldLegalAgreementPaged -from ._paged_models import TopLevelDomainPaged -from ._paged_models import TriggeredJobHistoryPaged -from ._paged_models import TriggeredWebJobPaged -from ._paged_models import UsagePaged -from ._paged_models import WebJobPaged -from ._paged_models import WebSiteInstanceStatusPaged -from ._paged_models import WorkerPoolResourcePaged -from ._web_site_management_client_enums import ( - KeyVaultSecretStatus, - CertificateProductType, - ProvisioningState, - CertificateOrderStatus, - CertificateOrderActionType, - CreatedByType, - RouteType, - ManagedServiceIdentityType, - IpFilterTag, - AutoHealActionType, - ConnectionStringType, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - FtpsState, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - ClientCertMode, - RedundancyMode, - StatusOptions, - DomainStatus, - AzureResourceType, - CustomHostNameDnsRecordType, - HostNameType, - DnsType, - DomainType, - HostingEnvironmentStatus, - LoadBalancingMode, - ComputeModeOptions, - WorkerSizeOptions, - AccessControlEntryAction, - OperationStatus, - IssueType, - SolutionType, - RenderingType, - ResourceScopeType, - NotificationLevel, - Channels, - AppServicePlanRestrictions, - InAvailabilityReasonType, - CheckNameResourceTypes, - ValidateResourceTypes, - LogLevel, - AzureStorageType, - AzureStorageState, - BackupItemStatus, - DatabaseType, - FrequencyUnit, - ContinuousWebJobStatus, - WebJobType, - CookieExpirationConvention, - PublishingProfileFormat, - DnsVerificationTestResult, - ClientCredentialMethod, - ForwardProxyConvention, - UnauthenticatedClientActionV2, - MSDeployLogEntryType, - MSDeployProvisioningState, - MySqlMigrationType, - PublicCertificateLocation, - BackupRestoreOperationType, - UnauthenticatedClientAction, - BuiltInAuthenticationProvider, - CloneAbilityResult, - SiteExtensionType, - TriggeredWebJobStatus, - SiteRuntimeState, - BuildStatus, - TriggerTypes, - SkuName, -) - -__all__ = [ - 'AbnormalTimePeriod', - 'Address', - 'AddressResponse', - 'AllowedAudiencesValidation', - 'AnalysisData', - 'AnalysisDefinition', - 'ApiDefinitionInfo', - 'ApiManagementConfig', - 'ApplicationLogsConfig', - 'ApplicationStack', - 'ApplicationStackResource', - 'AppRegistration', - 'AppServiceCertificate', - 'AppServiceCertificateOrder', - 'AppServiceCertificateOrderPatchResource', - 'AppServiceCertificatePatchResource', - 'AppServiceCertificateResource', - 'AppServiceEnvironment', - 'AppServiceEnvironmentPatchResource', - 'AppServiceEnvironmentResource', - 'AppserviceGithubToken', - 'AppserviceGithubTokenRequest', - 'AppServicePlan', - 'AppServicePlanPatchResource', - 'ArmIdWrapper', - 'AuthPlatform', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'AzureActiveDirectory', - 'AzureActiveDirectoryLogin', - 'AzureActiveDirectoryRegistration', - 'AzureActiveDirectoryValidation', - 'AzureBlobStorageApplicationLogsConfig', - 'AzureBlobStorageHttpLogsConfig', - 'AzureStorageInfoValue', - 'AzureStoragePropertyDictionaryResource', - 'AzureTableStorageApplicationLogsConfig', - 'BackupItem', - 'BackupRequest', - 'BackupSchedule', - 'BillingMeter', - 'BlobStorageTokenStore', - 'Capability', - 'Certificate', - 'CertificateDetails', - 'CertificateEmail', - 'CertificateOrderAction', - 'CertificatePatchResource', - 'ClientRegistration', - 'CloningInfo', - 'ConnectionStringDictionary', - 'ConnStringInfo', - 'ConnStringValueTypePair', - 'Contact', - 'ContainerCpuStatistics', - 'ContainerCpuUsage', - 'ContainerInfo', - 'ContainerMemoryStatistics', - 'ContainerNetworkInterfaceStatistics', - 'ContainerThrottlingData', - 'ContinuousWebJob', - 'CookieExpiration', - 'CorsSettings', - 'CsmCopySlotEntity', - 'CsmMoveResourceEnvelope', - 'CsmOperationDescription', - 'CsmOperationDescriptionProperties', - 'CsmOperationDisplay', - 'CsmPublishingCredentialsPoliciesCollection', - 'CsmPublishingCredentialsPoliciesEntity', - 'CsmPublishingProfileOptions', - 'CsmSlotEntity', - 'CsmUsageQuota', - 'CustomHostnameAnalysisResult', - 'CustomOpenIdConnectProvider', - 'DatabaseBackupSetting', - 'DataSource', - 'DataTableResponseColumn', - 'DataTableResponseObject', - 'DefaultErrorResponse', 'DefaultErrorResponseException', - 'DefaultErrorResponseError', - 'DefaultErrorResponseErrorDetailsItem', - 'DeletedAppRestoreRequest', - 'DeletedSite', - 'Deployment', - 'DeploymentLocations', - 'DetectorAbnormalTimePeriod', - 'DetectorDefinition', - 'DetectorInfo', - 'DetectorResponse', - 'DiagnosticAnalysis', - 'DiagnosticCategory', - 'DiagnosticData', - 'DiagnosticDetectorResponse', - 'DiagnosticMetricSample', - 'DiagnosticMetricSet', - 'Dimension', - 'Domain', - 'DomainAvailabilityCheckResult', - 'DomainControlCenterSsoRequest', - 'DomainOwnershipIdentifier', - 'DomainPatchResource', - 'DomainPurchaseConsent', - 'DomainRecommendationSearchParameters', - 'EnabledConfig', - 'EndpointDependency', - 'EndpointDetail', - 'ErrorEntity', - 'Experiments', - 'Facebook', - 'FileSystemApplicationLogsConfig', - 'FileSystemHttpLogsConfig', - 'FileSystemTokenStore', - 'ForwardProxy', - 'FunctionEnvelope', - 'FunctionSecrets', - 'GeoRegion', - 'GitHub', - 'GlobalCsmSkuDescription', - 'GlobalValidation', - 'Google', - 'HandlerMapping', - 'HostingEnvironmentDeploymentInfo', - 'HostingEnvironmentDiagnostics', - 'HostingEnvironmentProfile', - 'HostKeys', - 'HostName', - 'HostNameBinding', - 'HostNameSslState', - 'HttpLogsConfig', - 'HttpSettings', - 'HttpSettingsRoutes', - 'HybridConnection', - 'HybridConnectionKey', - 'HybridConnectionLimits', - 'Identifier', - 'IdentityProviders', - 'InboundEnvironmentEndpoint', - 'IpSecurityRestriction', - 'JwtClaimChecks', - 'KeyInfo', - 'LocalizableString', - 'Login', - 'LoginRoutes', - 'LoginScopes', - 'LogSpecification', - 'ManagedServiceIdentity', - 'ManagedServiceIdentityUserAssignedIdentitiesValue', - 'MetricAvailability', - 'MetricSpecification', - 'MigrateMySqlRequest', - 'MigrateMySqlStatus', - 'MSDeploy', - 'MSDeployLog', - 'MSDeployLogEntry', - 'MSDeployStatus', - 'NameIdentifier', - 'NameValuePair', - 'NetworkAccessControlEntry', - 'NetworkFeatures', - 'NetworkTrace', - 'Nonce', - 'OpenIdConnectClientCredential', - 'OpenIdConnectConfig', - 'OpenIdConnectLogin', - 'OpenIdConnectRegistration', - 'Operation', - 'OutboundEnvironmentEndpoint', - 'PerfMonResponse', - 'PerfMonSample', - 'PerfMonSet', - 'PremierAddOn', - 'PremierAddOnOffer', - 'PremierAddOnPatchResource', - 'PrivateAccess', - 'PrivateAccessSubnet', - 'PrivateAccessVirtualNetwork', - 'PrivateEndpointConnectionResource', - 'PrivateLinkConnectionApprovalRequestResource', - 'PrivateLinkConnectionState', - 'PrivateLinkResource', - 'PrivateLinkResourceProperties', - 'PrivateLinkResourcesWrapper', - 'ProcessInfo', - 'ProcessModuleInfo', - 'ProcessThreadInfo', - 'ProxyOnlyResource', - 'PublicCertificate', - 'PushSettings', - 'RampUpRule', - 'Recommendation', - 'RecommendationRule', - 'ReissueCertificateOrderRequest', - 'RelayServiceConnectionEntity', - 'Rendering', - 'RenewCertificateOrderRequest', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceHealthMetadata', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceNameAvailability', - 'ResourceNameAvailabilityRequest', - 'ResponseMetaData', - 'RestoreRequest', - 'ServiceSpecification', - 'Site', - 'SiteAuthSettings', - 'SiteAuthSettingsV2', - 'SiteCloneability', - 'SiteCloneabilityCriterion', - 'SiteConfig', - 'SiteConfigResource', - 'SiteConfigurationSnapshotInfo', - 'SiteExtensionInfo', - 'SiteLimits', - 'SiteLogsConfig', - 'SiteMachineKey', - 'SitePatchResource', - 'SitePhpErrorLogFlag', - 'SiteSeal', - 'SiteSealRequest', - 'SiteSourceControl', - 'SkuCapacity', - 'SkuDescription', - 'SkuInfo', - 'SkuInfos', - 'SlotConfigNamesResource', - 'SlotDifference', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'Snapshot', - 'SnapshotRecoverySource', - 'SnapshotRestoreRequest', - 'Solution', - 'SourceControl', - 'StackMajorVersion', - 'StackMinorVersion', - 'StampCapacity', - 'StaticSiteARMResource', - 'StaticSiteBuildARMResource', - 'StaticSiteBuildProperties', - 'StaticSiteCustomDomainOverviewARMResource', - 'StaticSiteFunctionOverviewARMResource', - 'StaticSitePatchResource', - 'StaticSiteResetPropertiesARMResource', - 'StaticSitesWorkflowPreview', - 'StaticSitesWorkflowPreviewRequest', - 'StaticSiteUserARMResource', - 'StaticSiteUserInvitationRequestResource', - 'StaticSiteUserInvitationResponseResource', - 'StatusCodesBasedTrigger', - 'StorageMigrationOptions', - 'StorageMigrationResponse', - 'StringDictionary', - 'SwiftVirtualNetwork', - 'SystemData', - 'TldLegalAgreement', - 'TokenStore', - 'TopLevelDomain', - 'TopLevelDomainAgreementOption', - 'TriggeredJobHistory', - 'TriggeredJobRun', - 'TriggeredWebJob', - 'Twitter', - 'TwitterRegistration', - 'Usage', - 'User', - 'ValidateRequest', - 'ValidateResponse', - 'ValidateResponseError', - 'VirtualApplication', - 'VirtualDirectory', - 'VirtualIPMapping', - 'VirtualNetworkProfile', - 'VnetGateway', - 'VnetInfo', - 'VnetParameters', - 'VnetRoute', - 'VnetValidationFailureDetails', - 'VnetValidationTestFailure', - 'WebAppCollection', - 'WebJob', - 'WebSiteInstanceStatus', - 'WorkerPool', - 'WorkerPoolResource', - 'AppServiceCertificateOrderPaged', - 'AppServiceCertificateResourcePaged', - 'CsmOperationDescriptionPaged', - 'DomainPaged', - 'NameIdentifierPaged', - 'DomainOwnershipIdentifierPaged', - 'TopLevelDomainPaged', - 'TldLegalAgreementPaged', - 'CertificatePaged', - 'DeletedSitePaged', - 'DetectorResponsePaged', - 'DiagnosticCategoryPaged', - 'AnalysisDefinitionPaged', - 'DetectorDefinitionPaged', - 'ApplicationStackResourcePaged', - 'RecommendationPaged', - 'SourceControlPaged', - 'BillingMeterPaged', - 'GeoRegionPaged', - 'IdentifierPaged', - 'PremierAddOnOfferPaged', - 'SitePaged', - 'BackupItemPaged', - 'SiteConfigResourcePaged', - 'SiteConfigurationSnapshotInfoPaged', - 'ContinuousWebJobPaged', - 'DeploymentPaged', - 'FunctionEnvelopePaged', - 'HostNameBindingPaged', - 'WebSiteInstanceStatusPaged', - 'ProcessInfoPaged', - 'ProcessModuleInfoPaged', - 'ProcessThreadInfoPaged', - 'PerfMonResponsePaged', - 'PublicCertificatePaged', - 'SiteExtensionInfoPaged', - 'SlotDifferencePaged', - 'SnapshotPaged', - 'TriggeredWebJobPaged', - 'TriggeredJobHistoryPaged', - 'CsmUsageQuotaPaged', - 'WebJobPaged', - 'StaticSiteARMResourcePaged', - 'StaticSiteUserARMResourcePaged', - 'StaticSiteBuildARMResourcePaged', - 'StaticSiteFunctionOverviewARMResourcePaged', - 'StaticSiteCustomDomainOverviewARMResourcePaged', - 'AppServiceEnvironmentResourcePaged', - 'StampCapacityPaged', - 'InboundEnvironmentEndpointPaged', - 'WorkerPoolResourcePaged', - 'ResourceMetricDefinitionPaged', - 'SkuInfoPaged', - 'UsagePaged', - 'OutboundEnvironmentEndpointPaged', - 'AppServicePlanPaged', - 'StrPaged', - 'HybridConnectionPaged', - 'ResourceHealthMetadataPaged', - 'KeyVaultSecretStatus', - 'CertificateProductType', - 'ProvisioningState', - 'CertificateOrderStatus', - 'CertificateOrderActionType', - 'CreatedByType', - 'RouteType', - 'ManagedServiceIdentityType', - 'IpFilterTag', - 'AutoHealActionType', - 'ConnectionStringType', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'FtpsState', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'ClientCertMode', - 'RedundancyMode', - 'StatusOptions', - 'DomainStatus', - 'AzureResourceType', - 'CustomHostNameDnsRecordType', - 'HostNameType', - 'DnsType', - 'DomainType', - 'HostingEnvironmentStatus', - 'LoadBalancingMode', - 'ComputeModeOptions', - 'WorkerSizeOptions', - 'AccessControlEntryAction', - 'OperationStatus', - 'IssueType', - 'SolutionType', - 'RenderingType', - 'ResourceScopeType', - 'NotificationLevel', - 'Channels', - 'AppServicePlanRestrictions', - 'InAvailabilityReasonType', - 'CheckNameResourceTypes', - 'ValidateResourceTypes', - 'LogLevel', - 'AzureStorageType', - 'AzureStorageState', - 'BackupItemStatus', - 'DatabaseType', - 'FrequencyUnit', - 'ContinuousWebJobStatus', - 'WebJobType', - 'CookieExpirationConvention', - 'PublishingProfileFormat', - 'DnsVerificationTestResult', - 'ClientCredentialMethod', - 'ForwardProxyConvention', - 'UnauthenticatedClientActionV2', - 'MSDeployLogEntryType', - 'MSDeployProvisioningState', - 'MySqlMigrationType', - 'PublicCertificateLocation', - 'BackupRestoreOperationType', - 'UnauthenticatedClientAction', - 'BuiltInAuthenticationProvider', - 'CloneAbilityResult', - 'SiteExtensionType', - 'TriggeredWebJobStatus', - 'SiteRuntimeState', - 'BuildStatus', - 'TriggerTypes', - 'SkuName', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models.py deleted file mode 100644 index e17874ce6fc..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models.py +++ /dev/null @@ -1,15503 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2020_09_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2020_09_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(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.get('address1', None) - self.address2 = kwargs.get('address2', None) - self.city = kwargs.get('city', None) - self.country = kwargs.get('country', None) - self.postal_code = kwargs.get('postal_code', None) - self.state = kwargs.get('state', None) - - -class ProxyOnlyResource(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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - } - - def __init__(self, **kwargs): - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kwargs.get('kind', None) - self.type = None - self.system_data = kwargs.get('system_data', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2020_09_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2020_09_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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AnalysisDefinition, self).__init__(**kwargs) - self.description = None - - -class ApiDefinitionInfo(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 ApiManagementConfig(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 ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2020_09_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2020_09_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2020_09_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(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_09_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2020_09_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]'}, - } - - 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) - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param application_stack_resource_name: Application stack name. - :type application_stack_resource_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_09_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'application_stack_resource_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]'}, - } - - def __init__(self, **kwargs): - super(ApplicationStackResource, self).__init__(**kwargs) - self.application_stack_resource_name = kwargs.get('application_stack_resource_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) - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_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': 'KeyVaultSecretStatus'}, - } - - 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 Resource(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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - """ - - _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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kwargs.get('kind', None) - self.location = kwargs.get('location', None) - self.type = None - self.tags = kwargs.get('tags', None) - self.system_data = kwargs.get('system_data', 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2020_09_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_09_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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_09_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_09_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2020_09_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_09_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2020_09_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2020_09_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_09_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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_09_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_09_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2020_09_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_09_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2020_09_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - 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 - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, - 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, - } - - 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, - 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, - } - - 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(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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_09_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_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', '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'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, - 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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_09_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_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'app_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) - self.app_service_environment_patch_resource_name = kwargs.get('app_service_environment_patch_resource_name', None) - self.location = kwargs.get('location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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_09_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_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppServiceEnvironmentResource, self).__init__(**kwargs) - self.app_service_environment_resource_name = kwargs.get('app_service_environment_resource_name', None) - self.app_service_environment_resource_location = kwargs.get('app_service_environment_resource_location', None) - self.provisioning_state = None - self.status = None - self.vnet_name = kwargs.get('vnet_name', None) - self.vnet_resource_group_name = kwargs.get('vnet_resource_group_name', None) - self.vnet_subnet_name = kwargs.get('vnet_subnet_name', 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 = kwargs.get('multi_role_count', None) - self.worker_pools = kwargs.get('worker_pools', None) - self.ipssl_address_count = kwargs.get('ipssl_address_count', None) - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = kwargs.get('dns_suffix', None) - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = kwargs.get('network_access_control_list', None) - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) - self.default_front_end_scale_factor = None - self.api_management_account_id = kwargs.get('api_management_account_id', None) - self.suspended = kwargs.get('suspended', None) - self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', 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 = kwargs.get('has_linux_workers', None) - self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) - self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) - - -class AppserviceGithubToken(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(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.get('code', None) - self.state = kwargs.get('state', None) - - -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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_09_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription - """ - - _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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, 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.sku = kwargs.get('sku', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: This needs to set to true when creating a - Linux App Service Plan, along with kind set to - Linux. It should be false otherwise. Default - value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_09_01.models.ProvisioningState - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - } - - 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 - - -class ArmIdWrapper(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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2020_09_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': 'AutoHealActionType'}, - '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(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(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_09_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2020_09_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(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2020_09_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_09_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2020_09_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', '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.slow_requests = kwargs.get('slow_requests', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: - ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectoryRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectoryLogin - :param validation: - :type validation: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param jwt_claim_checks: - :type jwt_claim_checks: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_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': 'LogLevel'}, - '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(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 AzureStorageInfoValue(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_09_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' - :vartype state: str or - ~azure.mgmt.web.v2020_09_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': '{AzureStorageInfoValue}'}, - } - - def __init__(self, **kwargs): - super(AzureStoragePropertyDictionaryResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class AzureTableStorageApplicationLogsConfig(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_09_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': 'LogLevel'}, - '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.get('sas_url', None) - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 backup_item_name: Name of this backup. - :vartype backup_item_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_09_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 - :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_09_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'backup_id': {'key': 'properties.id', 'type': 'int'}, - 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, - 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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.backup_item_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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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: Required. 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_09_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2020_09_01.models.DatabaseBackupSetting] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account_url': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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). Default value: 7 . - :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_09_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - } - - 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) - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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_09_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_09_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 - """ - - _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}, - 'password': {'required': 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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', '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) - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param email_id: Email id. - :type email_id: str - :param time_stamp: Time stamp. - :type time_stamp: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.CertificateOrderActionType - :ivar created_at: Time at which the certificate action was performed. - :vartype created_at: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'action_type': {'key': 'properties.actionType', 'type': 'CertificateOrderActionType'}, - '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 CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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_09_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_09_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 - """ - - _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}, - 'password': {'required': 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', '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) - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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.get('source_web_app_id', None) - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': '{ConnStringValueTypePair}'}, - } - - def __init__(self, **kwargs): - super(ConnectionStringDictionary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ConnStringInfo(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_09_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - 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(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_09_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, **kwargs): - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) - - -class Contact(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_09_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.get('email', None) - self.fax = kwargs.get('fax', None) - self.job_title = kwargs.get('job_title', None) - self.name_first = kwargs.get('name_first', None) - self.name_last = kwargs.get('name_last', None) - self.name_middle = kwargs.get('name_middle', None) - self.organization = kwargs.get('organization', None) - self.phone = kwargs.get('phone', None) - - -class ContainerCpuStatistics(Model): - """ContainerCpuStatistics. - - :param cpu_usage: - :type cpu_usage: ~azure.mgmt.web.v2020_09_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_09_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(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(Model): - """ContainerInfo. - - :param current_time_stamp: - :type current_time_stamp: datetime - :param previous_time_stamp: - :type previous_time_stamp: datetime - :param current_cpu_stats: - :type current_cpu_stats: - ~azure.mgmt.web.v2020_09_01.models.ContainerCpuStatistics - :param previous_cpu_stats: - :type previous_cpu_stats: - ~azure.mgmt.web.v2020_09_01.models.ContainerCpuStatistics - :param memory_stats: - :type memory_stats: - ~azure.mgmt.web.v2020_09_01.models.ContainerMemoryStatistics - :param name: - :type name: str - :param id: - :type id: str - :param eth0: - :type eth0: - ~azure.mgmt.web.v2020_09_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(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(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(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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param status: Job status. Possible values include: 'Initializing', - 'Starting', 'Running', 'PendingRestart', 'Stopped' - :type status: str or - ~azure.mgmt.web.v2020_09_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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param convention: Possible values include: 'FixedTime', - 'IdentityProviderDerived' - :type convention: str or - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'convention': {'key': 'properties.convention', 'type': 'CookieExpirationConvention'}, - '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(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 CsmCopySlotEntity(Model): - """Copy deployment slot parameters. - - All required parameters must be populated in order to send to Azure. - - :param target_slot: Required. Destination deployment slot during copy - operation. - :type target_slot: str - :param site_config: Required. The site object which will be merged with - the source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2020_09_01.models.SiteConfig - """ - - _validation = { - 'target_slot': {'required': True}, - 'site_config': {'required': True}, - } - - _attribute_map = { - 'target_slot': {'key': 'targetSlot', 'type': 'str'}, - 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, - } - - def __init__(self, **kwargs): - super(CsmCopySlotEntity, self).__init__(**kwargs) - self.target_slot = kwargs.get('target_slot', None) - self.site_config = kwargs.get('site_config', None) - - -class CsmMoveResourceEnvelope(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 CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2020_09_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2020_09_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(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2020_09_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(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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param ftp: Required. Whether FTP is allowed. - :type ftp: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity - :param scm: Required. Whether Scm Basic Auth is allowed. - :type scm: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ftp': {'required': True}, - 'scm': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param allow: Required. true to allow access to a publishing - method; otherwise, false. - :type allow: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allow': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'allow': {'key': 'properties.allow', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CsmPublishingCredentialsPoliciesEntity, self).__init__(**kwargs) - self.allow = kwargs.get('allow', None) - - -class CsmPublishingProfileOptions(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_09_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(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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.get('target_slot', None) - self.preserve_vnet = kwargs.get('preserve_vnet', None) - - -class CsmUsageQuota(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 - :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_09_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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar is_hostname_already_verified: true if hostname is - already verified; otherwise, 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_09_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_09_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'is_hostname_already_verified': {'key': 'properties.isHostnameAlreadyVerified', 'type': 'bool'}, - 'custom_domain_verification_test': {'key': 'properties.customDomainVerificationTest', 'type': 'DnsVerificationTestResult'}, - '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_cname_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_cname_records = kwargs.get('alternate_cname_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: - ~azure.mgmt.web.v2020_09_01.models.OpenIdConnectRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_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.get('database_type', None) - 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 DataSource(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_09_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(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(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_09_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(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_09_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 DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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_09_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(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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - 'deleted_site_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.deleted_site_kind = None - self.geo_region_name = 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :param end_time: End time. - :type end_time: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 DeploymentLocations(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_09_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2020_09_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_09_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(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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_09_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_09_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2020_09_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': 'IssueType'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param metadata: metadata for the detector - :type metadata: ~azure.mgmt.web.v2020_09_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2020_09_01.models.DiagnosticData] - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'metadata': {'key': 'properties.metadata', 'type': 'DetectorInfo'}, - 'dataset': {'key': 'properties.dataset', 'type': '[DiagnosticData]'}, - } - - def __init__(self, **kwargs): - super(DetectorResponse, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.dataset = kwargs.get('dataset', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param start_time: Start time of the period - :type start_time: datetime - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2020_09_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2020_09_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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiagnosticCategory, self).__init__(**kwargs) - self.description = None - - -class DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2020_09_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2020_09_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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param start_time: Start time of the period - :type start_time: datetime - :param end_time: End time of the period - :type end_time: 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_09_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2020_09_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2020_09_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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(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 - :param end_time: End time of the period - :type end_time: 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_09_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(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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2020_09_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_09_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_09_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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_09_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2020_09_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2020_09_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_09_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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_09_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - 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 DomainControlCenterSsoRequest(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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2020_09_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_09_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_09_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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_09_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2020_09_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2020_09_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_09_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(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 - 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 - """ - - _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(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(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(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_09_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(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(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_09_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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2020_09_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: ~azure.mgmt.web.v2020_09_01.models.AppRegistration - :param graph_api_version: - :type graph_api_version: str - :param login: - :type login: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2020_09_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, **kwargs): - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = kwargs.get('level', "Off") - - -class FileSystemHttpLogsConfig(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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param convention: Possible values include: 'NoProxy', 'Standard', - 'Custom' - :type convention: str or - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'convention': {'key': 'properties.convention', 'type': 'ForwardProxyConvention'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 FunctionSecrets(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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: ~azure.mgmt.web.v2020_09_01.models.ClientRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 GlobalCsmSkuDescription(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_09_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_09_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'require_authentication': {'key': 'properties.requireAuthentication', 'type': 'bool'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientActionV2'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: ~azure.mgmt.web.v2020_09_01.models.ClientRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_09_01.models.LoginScopes - :param validation: - :type validation: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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(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(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(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(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(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_09_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_09_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_09_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2020_09_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - '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 HostNameSslState(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_09_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 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_09_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2020_09_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2020_09_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param require_https: - :type require_https: bool - :param routes: - :type routes: ~azure.mgmt.web.v2020_09_01.models.HttpSettingsRoutes - :param forward_proxy: - :type forward_proxy: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'value': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Identifier, self).__init__(**kwargs) - self.value = kwargs.get('value', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param azure_active_directory: - :type azure_active_directory: - ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectory - :param facebook: - :type facebook: ~azure.mgmt.web.v2020_09_01.models.Facebook - :param git_hub: - :type git_hub: ~azure.mgmt.web.v2020_09_01.models.GitHub - :param google: - :type google: ~azure.mgmt.web.v2020_09_01.models.Google - :param twitter: - :type twitter: ~azure.mgmt.web.v2020_09_01.models.Twitter - :param custom_open_id_connect_providers: - :type custom_open_id_connect_providers: dict[str, - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, - '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.twitter = kwargs.get('twitter', None) - self.custom_open_id_connect_providers = kwargs.get('custom_open_id_connect_providers', None) - - -class InboundEnvironmentEndpoint(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 IpSecurityRestriction(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_09_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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 LocalizableString(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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param routes: - :type routes: ~azure.mgmt.web.v2020_09_01.models.LoginRoutes - :param token_store: - :type token_store: ~azure.mgmt.web.v2020_09_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_09_01.models.CookieExpiration - :param nonce: - :type nonce: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(LoginScopes, self).__init__(**kwargs) - self.scopes = kwargs.get('scopes', None) - - -class LogSpecification(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(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_09_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_09_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailability(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(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_09_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2020_09_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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2020_09_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, - 'migration_type': {'key': 'properties.migrationType', 'type': 'MySqlMigrationType'}, - } - - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'migration_operation_status': {'key': 'properties.migrationOperationStatus', 'type': 'OperationStatus'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar entries: List of log entry messages - :vartype entries: - list[~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'entries': {'key': 'properties.entries', 'type': '[MSDeployLogEntry]'}, - } - - def __init__(self, **kwargs): - super(MSDeployLog, self).__init__(**kwargs) - self.entries = None - - -class MSDeployLogEntry(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2020_09_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': 'MSDeployLogEntryType'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'deployer': {'key': 'properties.deployer', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'MSDeployProvisioningState'}, - '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(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 NameValuePair(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 NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2020_09_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = kwargs.get('action', None) - self.description = kwargs.get('description', None) - self.order = kwargs.get('order', None) - self.remote_subnet = kwargs.get('remote_subnet', 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param method: Possible values include: 'ClientSecretPost' - :type method: str or - ~azure.mgmt.web.v2020_09_01.models.ClientCredentialMethod - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, - 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OpenIdConnectClientCredential, self).__init__(**kwargs) - self.method = kwargs.get('method', None) - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param client_id: - :type client_id: str - :param client_credential: - :type client_credential: - ~azure.mgmt.web.v2020_09_01.models.OpenIdConnectClientCredential - :param open_id_connect_configuration: - :type open_id_connect_configuration: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2020_09_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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(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_09_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 PerfMonResponse(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_09_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(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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(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 - :param end_time: End time of the period. - :type end_time: 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_09_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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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: true if promotion code is - required; otherwise, 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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'AppServicePlanRestrictions'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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(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_09_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 PrivateEndpointConnectionResource(ProxyOnlyResource): - """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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar provisioning_state: - :vartype provisioning_state: str - :param private_endpoint: PrivateEndpoint of a remote private endpoint - connection - :type private_endpoint: ~azure.mgmt.web.v2020_09_01.models.ArmIdWrapper - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_09_01.models.PrivateLinkConnectionState - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'ArmIdWrapper'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionResource, 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) - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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(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_09_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.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.properties = kwargs.get('properties', None) - - -class PrivateLinkResourceProperties(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(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_09_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.get('value', None) - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_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 - :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 - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'blob': {'key': 'properties.blob', 'type': 'bytearray'}, - 'public_certificate_location': {'key': 'properties.publicCertificateLocation', 'type': 'PublicCertificateLocation'}, - '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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - \\nMinReroutePercentage or - MaxReroutePercentage. Site metrics are checked every N - minutes specified in ChangeIntervalInMinutes.\\nCustom - decision algorithm - can be provided in TiPCallback site extension which URL can be specified - in 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param creation_time: Timestamp when this instance was created. - :type creation_time: 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_09_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_09_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_09_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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 Rendering(Model): - """Instructions for rendering the data. - - :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', - 'TimeSeries', 'TimeSeriesPerInstance' - :type type: str or ~azure.mgmt.web.v2020_09_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': 'RenderingType'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 ResourceMetricAvailability(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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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_09_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(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_09_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.get('name', None) - self.type = kwargs.get('type', None) - self.is_fqdn = kwargs.get('is_fqdn', None) - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2020_09_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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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_09_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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_09_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'BackupRestoreOperationType'}, - '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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2020_09_01.models.MetricSpecification] - :param log_specifications: - :type log_specifications: - list[~azure.mgmt.web.v2020_09_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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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_09_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_09_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2020_09_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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_09_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2020_09_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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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_09_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: true if the app is a default - container; otherwise, 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_09_01.models.SlotSwapStatus - :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_09_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 identity: - :type identity: ~azure.mgmt.web.v2020_09_01.models.ManagedServiceIdentity - """ - - _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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.identity = kwargs.get('identity', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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_09_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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_09_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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested - as part of GitHub Login authentication. - This setting is optional - :type git_hub_oauth_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_oauth_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_oauth_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_oauth_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_oauth_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_oauth_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_oauth_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.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_oauth_scopes = kwargs.get('google_oauth_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_oauth_scopes = kwargs.get('facebook_oauth_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_oauth_scopes = kwargs.get('git_hub_oauth_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_oauth_scopes = kwargs.get('microsoft_account_oauth_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param platform: - :type platform: ~azure.mgmt.web.v2020_09_01.models.AuthPlatform - :param global_validation: - :type global_validation: - ~azure.mgmt.web.v2020_09_01.models.GlobalValidation - :param identity_providers: - :type identity_providers: - ~azure.mgmt.web.v2020_09_01.models.IdentityProviders - :param login: - :type login: ~azure.mgmt.web.v2020_09_01.models.Login - :param http_settings: - :type http_settings: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2020_09_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_09_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2020_09_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - '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(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(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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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_09_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2020_09_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2020_09_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2020_09_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_09_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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_09_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2020_09_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2020_09_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2020_09_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2020_09_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2020_09_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_09_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2020_09_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2020_09_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2020_09_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2020_09_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2020_09_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. Default value: True . - :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_09_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_09_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_09_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, - } - - 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.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.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.health_check_path = kwargs.get('health_check_path', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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_09_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2020_09_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2020_09_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2020_09_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_09_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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_09_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2020_09_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2020_09_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2020_09_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2020_09_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2020_09_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_09_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2020_09_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2020_09_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2020_09_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2020_09_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2020_09_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. Default value: True . - :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_09_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_09_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_09_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, 'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, - } - - 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.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.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.health_check_path = kwargs.get('health_check_path', 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar time: The time the snapshot was taken. - :vartype time: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'extension_id': {'key': 'properties.extension_id', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'extension_type': {'key': 'properties.extension_type', 'type': 'SiteExtensionType'}, - '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 SiteLimits(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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param application_logs: Application logs configuration. - :type application_logs: - ~azure.mgmt.web.v2020_09_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2020_09_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2020_09_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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_09_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_09_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2020_09_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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_09_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2020_09_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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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_09_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: true if the app is a default - container; otherwise, 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_09_01.models.SlotSwapStatus - :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_09_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 identity: - :type identity: ~azure.mgmt.web.v2020_09_01.models.ManagedServiceIdentity - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(SitePatchResource, self).__init__(**kwargs) - 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.https_only = kwargs.get('https_only', None) - self.redundancy_mode = kwargs.get('redundancy_mode', None) - self.in_progress_operation_id = None - self.identity = kwargs.get('identity', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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.get('html', None) - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param is_git_hub_action: true if this is deployed via GitHub - action. - :type is_git_hub_action: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - } - - 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) - - -class SkuCapacity(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 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'}, - '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.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class SkuDescription(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_09_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_09_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(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_09_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2020_09_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 SkuInfos(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_09_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 SlotSwapStatus(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 - :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(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - '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.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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'time': {'key': 'properties.time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Snapshot, self).__init__(**kwargs) - self.time = None - - -class SnapshotRecoverySource(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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.SnapshotRecoverySource - :param overwrite: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2020_09_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': 'SolutionType'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2020_09_01.models.StackMinorVersion] - :param application_insights: true if this supports - Application Insights; otherwise, false. - :type application_insights: bool - :param is_preview: true if this stack is in Preview, - otherwise false. - :type is_preview: bool - :param is_deprecated: true if this stack has been deprecated, - otherwise false. - :type is_deprecated: bool - :param is_hidden: true if this stack should be hidden for new - customers on portal, otherwise 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'}, - '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.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(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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(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_09_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' - :type worker_size: str or - ~azure.mgmt.web.v2020_09_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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 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_09_01.models.StaticSiteBuildProperties - :param sku: - :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(StaticSiteARMResource, self).__init__(**kwargs) - self.default_hostname = None - self.repository_url = kwargs.get('repository_url', None) - self.branch = kwargs.get('branch', None) - self.custom_domains = None - self.repository_token = kwargs.get('repository_token', None) - self.build_properties = kwargs.get('build_properties', None) - self.sku = kwargs.get('sku', 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :ivar last_updated_on: When this build was updated. - :vartype last_updated_on: 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_09_01.models.BuildStatus - """ - - _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}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - } - - 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 - - -class StaticSiteBuildProperties(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: The path of the app artifacts after - building. - :type app_artifact_location: str - """ - - _attribute_map = { - 'app_location': {'key': 'appLocation', 'type': 'str'}, - 'api_location': {'key': 'apiLocation', 'type': 'str'}, - 'app_artifact_location': {'key': 'appArtifactLocation', '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) - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_name': {'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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, - 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StaticSiteCustomDomainOverviewARMResource, self).__init__(**kwargs) - self.domain_name = None - self.created_on = None - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 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_09_01.models.StaticSiteBuildProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - } - - 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.custom_domains = None - self.repository_token = kwargs.get('repository_token', None) - self.build_properties = kwargs.get('build_properties', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar expires_on: The expiration time of the invitation - :vartype expires_on: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 StatusCodesBasedTrigger(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 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'}, - '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.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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(StringDictionary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.web.v2020_09_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.web.v2020_09_01.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC) - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) - - -class TldLegalAgreement(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.get('agreement_key', None) - self.title = kwargs.get('title', None) - self.content = kwargs.get('content', None) - self.url = kwargs.get('url', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.FileSystemTokenStore - :param azure_blob_storage: - :type azure_blob_storage: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param privacy: If true, then the top level domain supports - domain privacy; otherwise, 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(TopLevelDomain, self).__init__(**kwargs) - self.privacy = kwargs.get('privacy', None) - - -class TopLevelDomainAgreementOption(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - 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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param runs: List of triggered web job runs. - :type runs: list[~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'runs': {'key': 'properties.runs', 'type': '[TriggeredJobRun]'}, - } - - def __init__(self, **kwargs): - super(TriggeredJobHistory, self).__init__(**kwargs) - self.runs = kwargs.get('runs', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'TriggeredWebJobStatus'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param latest_run: Latest job run information. - :type latest_run: ~azure.mgmt.web.v2020_09_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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'WebJobType'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'ComputeModeOptions'}, - '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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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' - :type type: str or - ~azure.mgmt.web.v2020_09_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: 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 - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(ValidateRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.location = kwargs.get('location', None) - 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) - - -class ValidateResponse(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_09_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(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(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2020_09_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(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(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(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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.get('id', None) - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'vnet_resource_group': {'key': 'properties.vnetResourceGroup', 'type': 'str'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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) - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, **kwargs): - super(VnetValidationFailureDetails, self).__init__(**kwargs) - self.failed = kwargs.get('failed', None) - self.failed_tests = kwargs.get('failed_tests', 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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(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_09_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.get('value', None) - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'WebJobType'}, - '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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param state: Possible values include: 'READY', 'STOPPED', 'UNKNOWN' - :type state: str or ~azure.mgmt.web.v2020_09_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: - :type containers: dict[str, - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'state': {'key': 'properties.state', 'type': 'SiteRuntimeState'}, - '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 WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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_09_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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] - :param sku: - :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(WorkerPoolResource, self).__init__(**kwargs) - 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 - self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models_py3.py deleted file mode 100644 index 3a12370285b..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_models_py3.py +++ /dev/null @@ -1,15503 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: datetime - :param events: List of Possible Cause of downtime - :type events: - list[~azure.mgmt.web.v2020_09_01.models.DetectorAbnormalTimePeriod] - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2020_09_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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: - super(AbnormalTimePeriod, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.events = events - self.solutions = solutions - - -class Address(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: str=None, **kwargs) -> None: - 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(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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(ProxyOnlyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.type = None - self.system_data = system_data - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: - super(AddressResponse, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, allowed_audiences=None, **kwargs) -> None: - super(AllowedAudiencesValidation, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.allowed_audiences = allowed_audiences - - -class AnalysisData(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_09_01.models.DetectorDefinition - :param metrics: Source Metrics - :type metrics: - list[~azure.mgmt.web.v2020_09_01.models.DiagnosticMetricSet] - :param data: Additional Source Data - :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] - :param detector_meta_data: Detector Meta Data - :type detector_meta_data: - ~azure.mgmt.web.v2020_09_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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(AnalysisDefinition, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.description = None - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - super(ApiDefinitionInfo, self).__init__(**kwargs) - self.url = url - - -class ApiManagementConfig(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: str=None, **kwargs) -> None: - super(ApiManagementConfig, self).__init__(**kwargs) - self.id = id - - -class ApplicationLogsConfig(Model): - """Application logs configuration. - - :param file_system: Application logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2020_09_01.models.FileSystemApplicationLogsConfig - :param azure_table_storage: Application logs to azure table storage - configuration. - :type azure_table_storage: - ~azure.mgmt.web.v2020_09_01.models.AzureTableStorageApplicationLogsConfig - :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2020_09_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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: - 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(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_09_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2020_09_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]'}, - } - - def __init__(self, *, name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: - super(ApplicationStack, self).__init__(**kwargs) - self.name = name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param application_stack_resource_name: Application stack name. - :type application_stack_resource_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_09_01.models.StackMajorVersion] - :param frameworks: List of frameworks associated with application stack. - :type frameworks: - list[~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'application_stack_resource_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]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, application_stack_resource_name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, **kwargs) -> None: - super(ApplicationStackResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.application_stack_resource_name = application_stack_resource_name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'app_id': {'key': 'properties.appId', 'type': 'str'}, - 'app_secret_setting_name': {'key': 'properties.appSecretSettingName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, app_id: str=None, app_secret_setting_name: str=None, **kwargs) -> None: - super(AppRegistration, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.app_id = app_id - self.app_secret_setting_name = app_secret_setting_name - - -class AppServiceCertificate(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_09_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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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 Resource(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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - """ - - _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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.kind = kind - self.location = location - self.type = None - self.tags = tags - self.system_data = system_data - - -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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2020_09_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_09_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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_09_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_09_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2020_09_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_09_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2020_09_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, location: str, product_type, kind: str=None, tags=None, system_data=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - super(AppServiceCertificateOrder, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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 - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param certificates: State of the Key Vault secret. - :type certificates: dict[str, - ~azure.mgmt.web.v2020_09_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 between 1 and 3). - Default value: 1 . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_09_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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_09_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_09_01.models.CertificateOrderStatus - :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: - ~azure.mgmt.web.v2020_09_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_09_01.models.CertificateDetails - :ivar root: Root certificate. - :vartype root: ~azure.mgmt.web.v2020_09_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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_verification_token': {'readonly': True}, - 'validity_in_years': {'maximum': 3, 'minimum': 1}, - 'product_type': {'required': 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}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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'}, - } - - def __init__(self, *, product_type, kind: str=None, system_data=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - super(AppServiceCertificateOrderPatchResource, self).__init__(kind=kind, system_data=system_data, **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 - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, - 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, kind: str=None, system_data=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceCertificatePatchResource, self).__init__(kind=kind, system_data=system_data, **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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, - 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceCertificateResource, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **kwargs) - self.key_vault_id = key_vault_id - self.key_vault_secret_name = key_vault_secret_name - self.provisioning_state = None - - -class AppServiceEnvironment(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. - - :param name: Required. Name of the App Service Environment. - :type name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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_09_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_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'vnetSubnetName', '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'}, - 'worker_pools': {'key': 'workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, - 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, - 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, - 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, - 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironment, self).__init__(**kwargs) - self.name = name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param app_service_environment_patch_resource_name: Required. Name of the - App Service Environment. - :type app_service_environment_patch_resource_name: str - :param location: Required. Location of the App Service Environment, e.g. - "West US". - :type location: 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_09_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_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'app_service_environment_patch_resource_name': {'required': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'app_service_environment_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, system_data=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name - self.location = location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param app_service_environment_resource_name: Required. Name of the App - Service Environment. - :type app_service_environment_resource_name: str - :param app_service_environment_resource_location: Required. Location of - the App Service Environment, e.g. "West US". - :type app_service_environment_resource_location: 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_09_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_09_01.models.HostingEnvironmentStatus - :param vnet_name: Name of the Virtual Network for the App Service - Environment. - :type vnet_name: str - :param vnet_resource_group_name: Resource group of the Virtual Network. - :type vnet_resource_group_name: str - :param vnet_subnet_name: Subnet of the Virtual Network. - :type vnet_subnet_name: str - :param virtual_network: Required. Description of the Virtual Network. - :type virtual_network: - ~azure.mgmt.web.v2020_09_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_09_01.models.LoadBalancingMode - :param multi_size: Front-end VM size, e.g. "Medium", "Large". - :type multi_size: str - :param multi_role_count: Number of front-end instances. - :type multi_role_count: int - :param worker_pools: Required. Description of worker pools with worker - size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list[~azure.mgmt.web.v2020_09_01.models.WorkerPool] - :param ipssl_address_count: Number of IP SSL addresses reserved for the - App Service Environment. - :type ipssl_address_count: int - :ivar database_edition: Edition of the metadata database for the App - Service Environment, e.g. "Standard". - :vartype database_edition: str - :ivar database_service_objective: Service objective of the metadata - database for the App Service Environment, e.g. "S0". - :vartype database_service_objective: str - :ivar upgrade_domains: Number of upgrade domains of the App Service - Environment. - :vartype upgrade_domains: int - :ivar subscription_id: Subscription of the App Service Environment. - :vartype subscription_id: str - :param dns_suffix: DNS suffix of the App Service Environment. - :type dns_suffix: str - :ivar last_action: Last deployment action on the App Service Environment. - :vartype last_action: str - :ivar last_action_result: Result of the last deployment action on the App - Service Environment. - :vartype last_action_result: str - :ivar allowed_multi_sizes: List of comma separated strings describing - which VM sizes are allowed for front-ends. - :vartype allowed_multi_sizes: str - :ivar allowed_worker_sizes: List of comma separated strings describing - which VM sizes are allowed for workers. - :vartype allowed_worker_sizes: str - :ivar maximum_number_of_machines: Maximum number of VMs in the App Service - Environment. - :vartype maximum_number_of_machines: int - :ivar vip_mappings: Description of IP SSL mapping for the App Service - Environment. - :vartype vip_mappings: - list[~azure.mgmt.web.v2020_09_01.models.VirtualIPMapping] - :ivar environment_capacities: Current total, used, and available worker - capacities. - :vartype environment_capacities: - list[~azure.mgmt.web.v2020_09_01.models.StampCapacity] - :param network_access_control_list: Access control list for controlling - traffic to the App Service Environment. - :type network_access_control_list: - list[~azure.mgmt.web.v2020_09_01.models.NetworkAccessControlEntry] - :ivar environment_is_healthy: True/false indicating whether the App - Service Environment is healthy. - :vartype environment_is_healthy: bool - :ivar environment_status: Detailed message about with results of the last - check of the App Service Environment. - :vartype environment_status: str - :ivar resource_group: Resource group of the App Service Environment. - :vartype resource_group: str - :param front_end_scale_factor: Scale factor for front-ends. - :type front_end_scale_factor: int - :ivar default_front_end_scale_factor: Default Scale Factor for FrontEnds. - :vartype default_front_end_scale_factor: int - :param api_management_account_id: API Management Account associated with - the App Service Environment. - :type api_management_account_id: str - :param suspended: true if the App Service Environment is - suspended; otherwise, false. The environment can be - suspended, e.g. when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type suspended: bool - :param dynamic_cache_enabled: True/false indicating whether the App - Service Environment is suspended. The environment can be suspended e.g. - when the management endpoint is no longer available - (most likely because NSG blocked the incoming traffic). - :type dynamic_cache_enabled: bool - :param cluster_settings: Custom settings for changing the behavior of the - App Service Environment. - :type cluster_settings: - list[~azure.mgmt.web.v2020_09_01.models.NameValuePair] - :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on - ASE db - :type user_whitelisted_ip_ranges: list[str] - :param has_linux_workers: Flag that displays whether an ASE has linux - workers or not - :type has_linux_workers: bool - :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment - default SSL certificate - :type ssl_cert_key_vault_id: str - :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App - Service Environment default SSL certificate - :type ssl_cert_key_vault_secret_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'app_service_environment_resource_name': {'required': True}, - 'app_service_environment_resource_location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'virtual_network': {'required': True}, - 'worker_pools': {'required': True}, - 'database_edition': {'readonly': True}, - 'database_service_objective': {'readonly': True}, - 'upgrade_domains': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'last_action': {'readonly': True}, - 'last_action_result': {'readonly': True}, - 'allowed_multi_sizes': {'readonly': True}, - 'allowed_worker_sizes': {'readonly': True}, - 'maximum_number_of_machines': {'readonly': True}, - 'vip_mappings': {'readonly': True}, - 'environment_capacities': {'readonly': True}, - 'environment_is_healthy': {'readonly': True}, - 'environment_status': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'default_front_end_scale_factor': {'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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'app_service_environment_resource_name': {'key': 'properties.name', 'type': 'str'}, - 'app_service_environment_resource_location': {'key': 'properties.location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_resource_group_name': {'key': 'properties.vnetResourceGroupName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', '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'}, - 'worker_pools': {'key': 'properties.workerPools', 'type': '[WorkerPool]'}, - 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'database_service_objective': {'key': 'properties.databaseServiceObjective', 'type': 'str'}, - 'upgrade_domains': {'key': 'properties.upgradeDomains', 'type': 'int'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, - 'last_action': {'key': 'properties.lastAction', 'type': 'str'}, - 'last_action_result': {'key': 'properties.lastActionResult', 'type': 'str'}, - 'allowed_multi_sizes': {'key': 'properties.allowedMultiSizes', 'type': 'str'}, - 'allowed_worker_sizes': {'key': 'properties.allowedWorkerSizes', 'type': 'str'}, - 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, - 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, - 'environment_capacities': {'key': 'properties.environmentCapacities', 'type': '[StampCapacity]'}, - 'network_access_control_list': {'key': 'properties.networkAccessControlList', 'type': '[NetworkAccessControlEntry]'}, - 'environment_is_healthy': {'key': 'properties.environmentIsHealthy', 'type': 'bool'}, - 'environment_status': {'key': 'properties.environmentStatus', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, - 'default_front_end_scale_factor': {'key': 'properties.defaultFrontEndScaleFactor', 'type': 'int'}, - 'api_management_account_id': {'key': 'properties.apiManagementAccountId', 'type': 'str'}, - 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, - 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', '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'}, - 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, - 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, - } - - def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, system_data=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: - super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **kwargs) - self.app_service_environment_resource_name = app_service_environment_resource_name - self.app_service_environment_resource_location = app_service_environment_resource_location - self.provisioning_state = None - self.status = None - self.vnet_name = vnet_name - self.vnet_resource_group_name = vnet_resource_group_name - self.vnet_subnet_name = vnet_subnet_name - self.virtual_network = virtual_network - self.internal_load_balancing_mode = internal_load_balancing_mode - self.multi_size = multi_size - self.multi_role_count = multi_role_count - self.worker_pools = worker_pools - self.ipssl_address_count = ipssl_address_count - self.database_edition = None - self.database_service_objective = None - self.upgrade_domains = None - self.subscription_id = None - self.dns_suffix = dns_suffix - self.last_action = None - self.last_action_result = None - self.allowed_multi_sizes = None - self.allowed_worker_sizes = None - self.maximum_number_of_machines = None - self.vip_mappings = None - self.environment_capacities = None - self.network_access_control_list = network_access_control_list - self.environment_is_healthy = None - self.environment_status = None - self.resource_group = None - self.front_end_scale_factor = front_end_scale_factor - self.default_front_end_scale_factor = None - self.api_management_account_id = api_management_account_id - self.suspended = suspended - self.dynamic_cache_enabled = dynamic_cache_enabled - self.cluster_settings = cluster_settings - self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges - self.has_linux_workers = has_linux_workers - self.ssl_cert_key_vault_id = ssl_cert_key_vault_id - self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name - - -class AppserviceGithubToken(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: str=None, scope: str=None, token_type: str=None, got_token: bool=None, error_message: str=None, **kwargs) -> None: - 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(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) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_09_01.models.ProvisioningState - :param sku: - :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription - """ - - _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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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.sku = sku - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: This needs to set to true when creating a - Linux App Service Plan, along with kind set to - Linux. It should be false otherwise. Default - value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'InProgress', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_09_01.models.ProvisioningState - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - } - - def __init__(self, *, kind: str=None, system_data=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: - super(AppServicePlanPatchResource, self).__init__(kind=kind, system_data=system_data, **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 - - -class ArmIdWrapper(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) -> None: - super(ArmIdWrapper, self).__init__(**kwargs) - self.id = 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, enabled: bool=None, runtime_version: str=None, config_file_path: str=None, **kwargs) -> None: - super(AuthPlatform, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.enabled = enabled - self.runtime_version = runtime_version - self.config_file_path = config_file_path - - -class AutoHealActions(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_09_01.models.AutoHealActionType - :param custom_action: Custom action to be taken. - :type custom_action: - ~azure.mgmt.web.v2020_09_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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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_09_01.models.AutoHealTriggers - :param actions: Actions to be executed when a rule is triggered. - :type actions: ~azure.mgmt.web.v2020_09_01.models.AutoHealActions - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, - 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, - } - - def __init__(self, *, triggers=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(Model): - """Triggers for auto-heal. - - :param requests: A rule based on total requests. - :type requests: ~azure.mgmt.web.v2020_09_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_09_01.models.StatusCodesBasedTrigger] - :param slow_requests: A rule based on request execution time. - :type slow_requests: - ~azure.mgmt.web.v2020_09_01.models.SlowRequestsBasedTrigger - """ - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, - 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, - 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, - 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, - } - - def __init__(self, *, requests=None, private_bytes_in_kb: int=None, status_codes=None, slow_requests=None, **kwargs) -> None: - super(AutoHealTriggers, self).__init__(**kwargs) - self.requests = requests - self.private_bytes_in_kb = private_bytes_in_kb - self.status_codes = status_codes - self.slow_requests = slow_requests - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: - ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectoryRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectoryLogin - :param validation: - :type validation: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, enabled: bool=None, registration=None, login=None, validation=None, is_auto_provisioned: bool=None, **kwargs) -> None: - super(AzureActiveDirectory, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'disable_www_authenticate': {'key': 'properties.disableWWWAuthenticate', 'type': 'bool'}, - 'login_parameters': {'key': 'properties.loginParameters', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, disable_www_authenticate: bool=None, login_parameters=None, **kwargs) -> None: - super(AzureActiveDirectoryLogin, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, open_id_issuer: str=None, client_id: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, **kwargs) -> None: - super(AzureActiveDirectoryRegistration, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param jwt_claim_checks: - :type jwt_claim_checks: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'jwt_claim_checks': {'key': 'properties.jwtClaimChecks', 'type': 'JwtClaimChecks'}, - 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, jwt_claim_checks=None, allowed_audiences=None, **kwargs) -> None: - super(AzureActiveDirectoryValidation, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.jwt_claim_checks = jwt_claim_checks - self.allowed_audiences = allowed_audiences - - -class AzureBlobStorageApplicationLogsConfig(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_09_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, - } - - def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: - super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - self.sas_url = sas_url - self.retention_in_days = retention_in_days - - -class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) - self.sas_url = sas_url - self.retention_in_days = retention_in_days - self.enabled = enabled - - -class AzureStorageInfoValue(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_09_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' - :vartype state: str or - ~azure.mgmt.web.v2020_09_01.models.AzureStorageState - """ - - _validation = { - 'state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': '{AzureStorageInfoValue}'}, - } - - def __init__(self, *, kind: str=None, system_data=None, properties=None, **kwargs) -> None: - super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.properties = properties - - -class AzureTableStorageApplicationLogsConfig(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_09_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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - } - - def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 backup_item_name: Name of this backup. - :vartype backup_item_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_09_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 - :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_09_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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'backup_id': {'key': 'properties.id', 'type': 'int'}, - 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, - 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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: str=None, system_data=None, **kwargs) -> None: - super(BackupItem, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.backup_id = None - self.storage_account_url = None - self.blob_name = None - self.backup_item_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 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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: Required. 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_09_01.models.BackupSchedule - :param databases: Databases included in the backup. - :type databases: - list[~azure.mgmt.web.v2020_09_01.models.DatabaseBackupSetting] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account_url': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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, *, storage_account_url: str, kind: str=None, system_data=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: - super(BackupRequest, self).__init__(kind=kind, system_data=system_data, **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(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). Default value: 7 . - :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_09_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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - } - - def __init__(self, *, kind: str=None, system_data=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: - super(BillingMeter, self).__init__(kind=kind, system_data=system_data, **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 - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'sas_url_setting_name': {'key': 'properties.sasUrlSettingName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, sas_url_setting_name: str=None, **kwargs) -> None: - super(BlobStorageTokenStore, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.sas_url_setting_name = sas_url_setting_name - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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_09_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_09_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 - """ - - _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}, - 'password': {'required': 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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, - } - - def __init__(self, *, location: str, password: str, kind: str=None, tags=None, system_data=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: - super(Certificate, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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 - - -class CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param email_id: Email id. - :type email_id: str - :param time_stamp: Time stamp. - :type time_stamp: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'email_id': {'key': 'properties.emailId', 'type': 'str'}, - 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, system_data=None, email_id: str=None, time_stamp=None, **kwargs) -> None: - super(CertificateEmail, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.CertificateOrderActionType - :ivar created_at: Time at which the certificate action was performed. - :vartype created_at: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'action_type': {'key': 'properties.actionType', 'type': 'CertificateOrderActionType'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(CertificateOrderAction, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.action_type = None - self.created_at = None - - -class CertificatePatchResource(ProxyOnlyResource): - """ARM resource for a certificate. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: datetime - :param password: Required. 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_09_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_09_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 - """ - - _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}, - 'password': {'required': 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'KeyVaultSecretStatus'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, - } - - def __init__(self, *, password: str, kind: str=None, system_data=None, host_names=None, pfx_blob: bytearray=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, **kwargs) -> None: - super(CertificatePatchResource, self).__init__(kind=kind, system_data=system_data, **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 - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, client_id: str=None, client_secret_setting_name: str=None, **kwargs) -> None: - super(ClientRegistration, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.client_id = client_id - self.client_secret_setting_name = client_secret_setting_name - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': '{ConnStringValueTypePair}'}, - } - - def __init__(self, *, kind: str=None, system_data=None, properties=None, **kwargs) -> None: - super(ConnectionStringDictionary, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.properties = properties - - -class ConnStringInfo(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_09_01.models.ConnectionStringType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class ConnStringValueTypePair(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_09_01.models.ConnectionStringType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ConnectionStringType'}, - } - - def __init__(self, *, value: str, type, **kwargs) -> None: - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = value - self.type = type - - -class Contact(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_09_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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: - 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(Model): - """ContainerCpuStatistics. - - :param cpu_usage: - :type cpu_usage: ~azure.mgmt.web.v2020_09_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_09_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=None, system_cpu_usage: int=None, online_cpu_count: int=None, throttling_data=None, **kwargs) -> None: - 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(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: int=None, per_cpu_usage=None, kernel_mode_usage: int=None, user_mode_usage: int=None, **kwargs) -> None: - 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(Model): - """ContainerInfo. - - :param current_time_stamp: - :type current_time_stamp: datetime - :param previous_time_stamp: - :type previous_time_stamp: datetime - :param current_cpu_stats: - :type current_cpu_stats: - ~azure.mgmt.web.v2020_09_01.models.ContainerCpuStatistics - :param previous_cpu_stats: - :type previous_cpu_stats: - ~azure.mgmt.web.v2020_09_01.models.ContainerCpuStatistics - :param memory_stats: - :type memory_stats: - ~azure.mgmt.web.v2020_09_01.models.ContainerMemoryStatistics - :param name: - :type name: str - :param id: - :type id: str - :param eth0: - :type eth0: - ~azure.mgmt.web.v2020_09_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=None, previous_time_stamp=None, current_cpu_stats=None, previous_cpu_stats=None, memory_stats=None, name: str=None, id: str=None, eth0=None, **kwargs) -> None: - 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(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: int=None, max_usage: int=None, limit: int=None, **kwargs) -> None: - super(ContainerMemoryStatistics, self).__init__(**kwargs) - self.usage = usage - self.max_usage = max_usage - self.limit = limit - - -class ContainerNetworkInterfaceStatistics(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: int=None, rx_packets: int=None, rx_errors: int=None, rx_dropped: int=None, tx_bytes: int=None, tx_packets: int=None, tx_errors: int=None, tx_dropped: int=None, **kwargs) -> None: - 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(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: int=None, throttled_periods: int=None, throttled_time: int=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param status: Job status. Possible values include: 'Initializing', - 'Starting', 'Running', 'PendingRestart', 'Stopped' - :type status: str or - ~azure.mgmt.web.v2020_09_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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, system_data=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - super(ContinuousWebJob, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param convention: Possible values include: 'FixedTime', - 'IdentityProviderDerived' - :type convention: str or - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'convention': {'key': 'properties.convention', 'type': 'CookieExpirationConvention'}, - 'time_to_expiration': {'key': 'properties.timeToExpiration', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, convention=None, time_to_expiration: str=None, **kwargs) -> None: - super(CookieExpiration, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.convention = convention - self.time_to_expiration = time_to_expiration - - -class CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.support_credentials = support_credentials - - -class CsmCopySlotEntity(Model): - """Copy deployment slot parameters. - - All required parameters must be populated in order to send to Azure. - - :param target_slot: Required. Destination deployment slot during copy - operation. - :type target_slot: str - :param site_config: Required. The site object which will be merged with - the source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2020_09_01.models.SiteConfig - """ - - _validation = { - 'target_slot': {'required': True}, - 'site_config': {'required': True}, - } - - _attribute_map = { - 'target_slot': {'key': 'targetSlot', 'type': 'str'}, - 'site_config': {'key': 'siteConfig', 'type': 'SiteConfig'}, - } - - def __init__(self, *, target_slot: str, site_config, **kwargs) -> None: - super(CsmCopySlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.site_config = site_config - - -class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: - super(CsmMoveResourceEnvelope, self).__init__(**kwargs) - self.target_resource_group = target_resource_group - self.resources = resources - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2020_09_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :type properties: - ~azure.mgmt.web.v2020_09_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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(CsmOperationDescription, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class CsmOperationDescriptionProperties(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2020_09_01.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(CsmOperationDescriptionProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param ftp: Required. Whether FTP is allowed. - :type ftp: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity - :param scm: Required. Whether Scm Basic Auth is allowed. - :type scm: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ftp': {'required': True}, - 'scm': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'ftp': {'key': 'properties.ftp', 'type': 'CsmPublishingCredentialsPoliciesEntity'}, - 'scm': {'key': 'properties.scm', 'type': 'CsmPublishingCredentialsPoliciesEntity'}, - } - - def __init__(self, *, ftp, scm, kind: str=None, system_data=None, **kwargs) -> None: - super(CsmPublishingCredentialsPoliciesCollection, self).__init__(kind=kind, system_data=system_data, **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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param allow: Required. true to allow access to a publishing - method; otherwise, false. - :type allow: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allow': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'allow': {'key': 'properties.allow', 'type': 'bool'}, - } - - def __init__(self, *, allow: bool, kind: str=None, system_data=None, **kwargs) -> None: - super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.allow = allow - - -class CsmPublishingProfileOptions(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_09_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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: - super(CsmPublishingProfileOptions, self).__init__(**kwargs) - self.format = format - self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints - - -class CsmSlotEntity(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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) -> None: - super(CsmSlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.preserve_vnet = preserve_vnet - - -class CsmUsageQuota(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 - :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_09_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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - 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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar is_hostname_already_verified: true if hostname is - already verified; otherwise, 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_09_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_09_01.models.ErrorEntity - :ivar has_conflict_on_scale_unit: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'is_hostname_already_verified': {'key': 'properties.isHostnameAlreadyVerified', 'type': 'bool'}, - 'custom_domain_verification_test': {'key': 'properties.customDomainVerificationTest', 'type': 'DnsVerificationTestResult'}, - '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, - 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: - super(CustomHostnameAnalysisResult, self).__init__(kind=kind, system_data=system_data, **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_cname_records = alternate_cname_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: - ~azure.mgmt.web.v2020_09_01.models.OpenIdConnectRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'registration': {'key': 'properties.registration', 'type': 'OpenIdConnectRegistration'}, - 'login': {'key': 'properties.login', 'type': 'OpenIdConnectLogin'}, - } - - def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: - super(CustomOpenIdConnectProvider, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - - -class DatabaseBackupSetting(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_09_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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: - 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 DataSource(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_09_01.models.NameValuePair] - """ - - _attribute_map = { - 'instructions': {'key': 'instructions', 'type': '[str]'}, - 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, - } - - def __init__(self, *, instructions=None, data_source_uri=None, **kwargs) -> None: - super(DataSource, self).__init__(**kwargs) - self.instructions = instructions - self.data_source_uri = data_source_uri - - -class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: - super(DataTableResponseColumn, self).__init__(**kwargs) - self.column_name = column_name - self.data_type = data_type - self.column_type = column_type - - -class DataTableResponseObject(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_09_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: str=None, columns=None, rows=None, **kwargs) -> None: - super(DataTableResponseObject, self).__init__(**kwargs) - self.table_name = table_name - self.columns = columns - self.rows = rows - - -class DefaultErrorResponse(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_09_01.models.DefaultErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, - } - - def __init__(self, **kwargs) -> None: - super(DefaultErrorResponse, self).__init__(**kwargs) - self.error = None - - -class DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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_09_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=None, **kwargs) -> None: - super(DefaultErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = details - self.innererror = None - - -class DefaultErrorResponseErrorDetailsItem(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) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: - super(DeletedAppRestoreRequest, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, - 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(DeletedSite, self).__init__(kind=kind, system_data=system_data, **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.deleted_site_kind = None - self.geo_region_name = 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :param end_time: End time. - :type end_time: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: - super(Deployment, self).__init__(kind=kind, system_data=system_data, **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 DeploymentLocations(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_09_01.models.GeoRegion] - :param hosting_environments: Available App Service Environments with full - descriptions of the environments. - :type hosting_environments: - list[~azure.mgmt.web.v2020_09_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_09_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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: - super(DeploymentLocations, self).__init__(**kwargs) - self.locations = locations - self.hosting_environments = hosting_environments - self.hosting_environment_deployment_infos = hosting_environment_deployment_infos - - -class DetectorAbnormalTimePeriod(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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_09_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_09_01.models.IssueType - :param solutions: List of proposed solutions - :type solutions: list[~azure.mgmt.web.v2020_09_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': 'IssueType'}, - 'solutions': {'key': 'solutions', 'type': '[Solution]'}, - } - - def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, **kwargs) -> None: - super(DetectorDefinition, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.display_name = None - self.description = None - self.rank = None - self.is_enabled = None - - -class DetectorInfo(Model): - """Definition of Detector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar description: Short description of the detector and its purpose - :vartype description: str - :ivar category: Support Category - :vartype category: str - :ivar sub_category: Support Sub Category - :vartype sub_category: str - :ivar support_topic_id: Support Topic Id - :vartype support_topic_id: str - """ - - _validation = { - 'description': {'readonly': True}, - 'category': {'readonly': True}, - 'sub_category': {'readonly': True}, - 'support_topic_id': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'sub_category': {'key': 'subCategory', 'type': 'str'}, - 'support_topic_id': {'key': 'supportTopicId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DetectorInfo, self).__init__(**kwargs) - self.description = None - self.category = None - self.sub_category = None - self.support_topic_id = 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param metadata: metadata for the detector - :type metadata: ~azure.mgmt.web.v2020_09_01.models.DetectorInfo - :param dataset: Data Set - :type dataset: list[~azure.mgmt.web.v2020_09_01.models.DiagnosticData] - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'metadata': {'key': 'properties.metadata', 'type': 'DetectorInfo'}, - 'dataset': {'key': 'properties.dataset', 'type': '[DiagnosticData]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, metadata=None, dataset=None, **kwargs) -> None: - super(DetectorResponse, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.metadata = metadata - self.dataset = dataset - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param start_time: Start time of the period - :type start_time: datetime - :param end_time: End time of the period - :type end_time: datetime - :param abnormal_time_periods: List of time periods. - :type abnormal_time_periods: - list[~azure.mgmt.web.v2020_09_01.models.AbnormalTimePeriod] - :param payload: Data by each detector - :type payload: list[~azure.mgmt.web.v2020_09_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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: - super(DiagnosticAnalysis, self).__init__(kind=kind, system_data=system_data, **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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(DiagnosticCategory, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.description = None - - -class DiagnosticData(Model): - """Set of data with rendering instructions. - - :param table: Data in table form - :type table: ~azure.mgmt.web.v2020_09_01.models.DataTableResponseObject - :param rendering_properties: Properties that describe how the table should - be rendered - :type rendering_properties: ~azure.mgmt.web.v2020_09_01.models.Rendering - """ - - _attribute_map = { - 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, - 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, - } - - def __init__(self, *, table=None, rendering_properties=None, **kwargs) -> None: - super(DiagnosticData, self).__init__(**kwargs) - self.table = table - self.rendering_properties = rendering_properties - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param start_time: Start time of the period - :type start_time: datetime - :param end_time: End time of the period - :type end_time: 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_09_01.models.DetectorDefinition - :param metrics: Metrics provided by the detector - :type metrics: - list[~azure.mgmt.web.v2020_09_01.models.DiagnosticMetricSet] - :param abnormal_time_periods: List of Correlated events found by the - detector - :type abnormal_time_periods: - list[~azure.mgmt.web.v2020_09_01.models.DetectorAbnormalTimePeriod] - :param data: Additional Data that detector wants to send. - :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] - :param response_meta_data: Meta Data - :type response_meta_data: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: - super(DiagnosticDetectorResponse, self).__init__(kind=kind, system_data=system_data, **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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: - 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(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 - :param end_time: End time of the period - :type end_time: 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_09_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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2020_09_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_09_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_09_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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_09_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2020_09_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2020_09_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_09_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, system_data=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - super(Domain, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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_09_01.models.DomainType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'available': {'key': 'available', 'type': 'bool'}, - 'domain_type': {'key': 'domainType', 'type': 'DomainType'}, - } - - def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: - super(DomainAvailabilityCheckResult, self).__init__(**kwargs) - self.name = name - self.available = available - self.domain_type = domain_type - - -class DomainControlCenterSsoRequest(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) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'ownership_id': {'key': 'properties.ownershipId', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, ownership_id: str=None, **kwargs) -> None: - super(DomainOwnershipIdentifier, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.ownership_id = ownership_id - - -class DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_09_01.models.Contact - :param contact_tech: Required. Technical contact. - :type contact_tech: ~azure.mgmt.web.v2020_09_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_09_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_09_01.models.ProvisioningState - :ivar name_servers: Name servers. - :vartype name_servers: list[str] - :param privacy: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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_09_01.models.HostName] - :param consent: Required. Legal agreement consent. - :type consent: ~azure.mgmt.web.v2020_09_01.models.DomainPurchaseConsent - :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list[str] - :param dns_type: Current DNS type. Possible values include: 'AzureDns', - 'DefaultDomainRegistrarDns' - :type dns_type: str or ~azure.mgmt.web.v2020_09_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_09_01.models.DnsType - :param auth_code: - :type auth_code: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, system_data=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - super(DomainPatchResource, self).__init__(kind=kind, system_data=system_data, **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(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 - 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 - """ - - _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: - super(DomainPurchaseConsent, self).__init__(**kwargs) - self.agreement_keys = agreement_keys - self.agreed_by = agreed_by - self.agreed_at = agreed_at - - -class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: - super(DomainRecommendationSearchParameters, self).__init__(**kwargs) - self.keywords = keywords - self.max_domain_recommendations = max_domain_recommendations - - -class EnabledConfig(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: bool=None, **kwargs) -> None: - super(EnabledConfig, self).__init__(**kwargs) - self.enabled = enabled - - -class EndpointDependency(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_09_01.models.EndpointDetail] - """ - - _attribute_map = { - 'domain_name': {'key': 'domainName', 'type': 'str'}, - 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, - } - - def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: - super(EndpointDependency, self).__init__(**kwargs) - self.domain_name = domain_name - self.endpoint_details = endpoint_details - - -class EndpointDetail(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: str=None, port: int=None, latency: float=None, is_accessible: bool=None, **kwargs) -> None: - super(EndpointDetail, self).__init__(**kwargs) - self.ip_address = ip_address - self.port = port - self.latency = latency - self.is_accessible = is_accessible - - -class ErrorEntity(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_09_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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: - 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(Model): - """Routing rules in production experiments. - - :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list[~azure.mgmt.web.v2020_09_01.models.RampUpRule] - """ - - _attribute_map = { - 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, - } - - def __init__(self, *, ramp_up_rules=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: ~azure.mgmt.web.v2020_09_01.models.AppRegistration - :param graph_api_version: - :type graph_api_version: str - :param login: - :type login: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, enabled: bool=None, registration=None, graph_api_version: str=None, login=None, **kwargs) -> None: - super(Facebook, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.enabled = enabled - self.registration = registration - self.graph_api_version = graph_api_version - self.login = login - - -class FileSystemApplicationLogsConfig(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2020_09_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, *, level="Off", **kwargs) -> None: - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - - -class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'directory': {'key': 'properties.directory', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, directory: str=None, **kwargs) -> None: - super(FileSystemTokenStore, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param convention: Possible values include: 'NoProxy', 'Standard', - 'Custom' - :type convention: str or - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'convention': {'key': 'properties.convention', 'type': 'ForwardProxyConvention'}, - 'custom_host_header_name': {'key': 'properties.customHostHeaderName', 'type': 'str'}, - 'custom_proto_header_name': {'key': 'properties.customProtoHeaderName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, convention=None, custom_host_header_name: str=None, custom_proto_header_name: str=None, **kwargs) -> None: - super(ForwardProxy, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.convention = convention - self.custom_host_header_name = custom_host_header_name - self.custom_proto_header_name = custom_proto_header_name - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: - super(FunctionEnvelope, self).__init__(kind=kind, system_data=system_data, **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 FunctionSecrets(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: str=None, trigger_url: str=None, **kwargs) -> None: - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'org_domain': {'key': 'properties.orgDomain', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(GeoRegion, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.description = None - self.display_name = None - self.org_domain = 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: ~azure.mgmt.web.v2020_09_01.models.ClientRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'registration': {'key': 'properties.registration', 'type': 'ClientRegistration'}, - 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, - } - - def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: - super(GitHub, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - - -class GlobalCsmSkuDescription(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_09_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_09_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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'require_authentication': {'key': 'properties.requireAuthentication', 'type': 'bool'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientActionV2'}, - 'redirect_to_provider': {'key': 'properties.redirectToProvider', 'type': 'str'}, - 'excluded_paths': {'key': 'properties.excludedPaths', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, require_authentication: bool=None, unauthenticated_client_action=None, redirect_to_provider: str=None, excluded_paths=None, **kwargs) -> None: - super(GlobalValidation, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: ~azure.mgmt.web.v2020_09_01.models.ClientRegistration - :param login: - :type login: ~azure.mgmt.web.v2020_09_01.models.LoginScopes - :param validation: - :type validation: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, enabled: bool=None, registration=None, login=None, validation=None, **kwargs) -> None: - super(Google, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - self.validation = validation - - -class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: - super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) - self.name = name - self.location = location - - -class HostingEnvironmentDiagnostics(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: str=None, diagnostics_output: str=None, **kwargs) -> None: - super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) - self.name = name - self.diagnostics_output = diagnostics_output - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: - super(HostKeys, self).__init__(**kwargs) - self.master_key = master_key - self.function_keys = function_keys - self.system_keys = system_keys - - -class HostName(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_09_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_09_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_09_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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_01.models.CustomHostNameDnsRecordType - :param host_name_type: Hostname type. Possible values include: 'Verified', - 'Managed' - :type host_name_type: str or - ~azure.mgmt.web.v2020_09_01.models.HostNameType - :param ssl_state: SSL type. Possible values include: 'Disabled', - 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: - super(HostNameBinding, self).__init__(kind=kind, system_data=system_data, **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 HostNameSslState(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_09_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 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_09_01.models.HostType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'ssl_state': {'key': 'sslState', 'type': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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(Model): - """Http logs configuration. - - :param file_system: Http logs to file system configuration. - :type file_system: - ~azure.mgmt.web.v2020_09_01.models.FileSystemHttpLogsConfig - :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: - ~azure.mgmt.web.v2020_09_01.models.AzureBlobStorageHttpLogsConfig - """ - - _attribute_map = { - 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, - 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, - } - - def __init__(self, *, file_system=None, azure_blob_storage=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param require_https: - :type require_https: bool - :param routes: - :type routes: ~azure.mgmt.web.v2020_09_01.models.HttpSettingsRoutes - :param forward_proxy: - :type forward_proxy: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'require_https': {'key': 'properties.requireHttps', 'type': 'bool'}, - 'routes': {'key': 'properties.routes', 'type': 'HttpSettingsRoutes'}, - 'forward_proxy': {'key': 'properties.forwardProxy', 'type': 'ForwardProxy'}, - } - - def __init__(self, *, kind: str=None, system_data=None, require_https: bool=None, routes=None, forward_proxy=None, **kwargs) -> None: - super(HttpSettings, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'api_prefix': {'key': 'properties.apiPrefix', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, api_prefix: str=None, **kwargs) -> None: - super(HttpSettingsRoutes, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - super(HybridConnection, self).__init__(kind=kind, system_data=system_data, **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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'send_key_name': {'key': 'properties.sendKeyName', 'type': 'str'}, - 'send_key_value': {'key': 'properties.sendKeyValue', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(HybridConnectionKey, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'current': {'key': 'properties.current', 'type': 'int'}, - 'maximum': {'key': 'properties.maximum', 'type': 'int'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(HybridConnectionLimits, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'value': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, value: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.value = value - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param azure_active_directory: - :type azure_active_directory: - ~azure.mgmt.web.v2020_09_01.models.AzureActiveDirectory - :param facebook: - :type facebook: ~azure.mgmt.web.v2020_09_01.models.Facebook - :param git_hub: - :type git_hub: ~azure.mgmt.web.v2020_09_01.models.GitHub - :param google: - :type google: ~azure.mgmt.web.v2020_09_01.models.Google - :param twitter: - :type twitter: ~azure.mgmt.web.v2020_09_01.models.Twitter - :param custom_open_id_connect_providers: - :type custom_open_id_connect_providers: dict[str, - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, - 'custom_open_id_connect_providers': {'key': 'properties.customOpenIdConnectProviders', 'type': '{CustomOpenIdConnectProvider}'}, - } - - def __init__(self, *, kind: str=None, system_data=None, azure_active_directory=None, facebook=None, git_hub=None, google=None, twitter=None, custom_open_id_connect_providers=None, **kwargs) -> None: - super(IdentityProviders, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.azure_active_directory = azure_active_directory - self.facebook = facebook - self.git_hub = git_hub - self.google = google - self.twitter = twitter - self.custom_open_id_connect_providers = custom_open_id_connect_providers - - -class InboundEnvironmentEndpoint(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: str=None, endpoints=None, ports=None, **kwargs) -> None: - super(InboundEnvironmentEndpoint, self).__init__(**kwargs) - self.description = description - self.endpoints = endpoints - self.ports = ports - - -class IpSecurityRestriction(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_09_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: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, headers=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'allowed_groups': {'key': 'properties.allowedGroups', 'type': '[str]'}, - 'allowed_client_applications': {'key': 'properties.allowedClientApplications', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, allowed_groups=None, allowed_client_applications=None, **kwargs) -> None: - super(JwtClaimChecks, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.allowed_groups = allowed_groups - self.allowed_client_applications = allowed_client_applications - - -class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: - super(KeyInfo, self).__init__(**kwargs) - self.name = name - self.value = value - - -class LocalizableString(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: str=None, localized_value: str=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param routes: - :type routes: ~azure.mgmt.web.v2020_09_01.models.LoginRoutes - :param token_store: - :type token_store: ~azure.mgmt.web.v2020_09_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_09_01.models.CookieExpiration - :param nonce: - :type nonce: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, routes=None, token_store=None, preserve_url_fragments_for_logins: bool=None, allowed_external_redirect_urls=None, cookie_expiration=None, nonce=None, **kwargs) -> None: - super(Login, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'logout_endpoint': {'key': 'properties.logoutEndpoint', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, logout_endpoint: str=None, **kwargs) -> None: - super(LoginRoutes, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, scopes=None, **kwargs) -> None: - super(LoginScopes, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.scopes = scopes - - -class LogSpecification(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: str=None, display_name: str=None, blob_duration: str=None, log_filter_pattern: str=None, **kwargs) -> None: - 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(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_09_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_09_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - self.user_assigned_identities = user_assigned_identities - - -class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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) -> None: - super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricSpecification(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_09_01.models.Dimension] - :param category: - :type category: str - :param availabilities: - :type availabilities: - list[~azure.mgmt.web.v2020_09_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: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. The type of migration operation to be - done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or - ~azure.mgmt.web.v2020_09_01.models.MySqlMigrationType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'connection_string': {'required': True}, - 'migration_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, - 'migration_type': {'key': 'properties.migrationType', 'type': 'MySqlMigrationType'}, - } - - def __init__(self, *, connection_string: str, migration_type, kind: str=None, system_data=None, **kwargs) -> None: - super(MigrateMySqlRequest, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'migration_operation_status': {'key': 'properties.migrationOperationStatus', 'type': 'OperationStatus'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(MigrateMySqlStatus, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: - super(MSDeploy, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar entries: List of log entry messages - :vartype entries: - list[~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'entries': {'key': 'properties.entries', 'type': '[MSDeployLogEntry]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(MSDeployLog, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.entries = None - - -class MSDeployLogEntry(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 - :ivar type: Log entry type. Possible values include: 'Message', 'Warning', - 'Error' - :vartype type: str or - ~azure.mgmt.web.v2020_09_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': 'MSDeployLogEntryType'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.MSDeployProvisioningState - :ivar start_time: Start time of deploy operation - :vartype start_time: datetime - :ivar end_time: End time of deploy operation - :vartype end_time: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'deployer': {'key': 'properties.deployer', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'MSDeployProvisioningState'}, - '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: str=None, system_data=None, **kwargs) -> None: - super(MSDeployStatus, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.deployer = None - self.provisioning_state = None - self.start_time = None - self.end_time = None - self.complete = None - - -class NameIdentifier(Model): - """Identifies an object. - - :param name: Name of the object. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(NameIdentifier, self).__init__(**kwargs) - self.name = name - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - super(NameValuePair, self).__init__(**kwargs) - self.name = name - self.value = value - - -class NetworkAccessControlEntry(Model): - """Network access control entry. - - :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or - ~azure.mgmt.web.v2020_09_01.models.AccessControlEntryAction - :param description: Description of network access control entry. - :type description: str - :param order: Order of precedence. - :type order: int - :param remote_subnet: Remote subnet. - :type remote_subnet: str - """ - - _attribute_map = { - 'action': {'key': 'action', 'type': 'AccessControlEntryAction'}, - 'description': {'key': 'description', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'int'}, - 'remote_subnet': {'key': 'remoteSubnet', 'type': 'str'}, - } - - def __init__(self, *, action=None, description: str=None, order: int=None, remote_subnet: str=None, **kwargs) -> None: - super(NetworkAccessControlEntry, self).__init__(**kwargs) - self.action = action - self.description = description - self.order = order - self.remote_subnet = remote_subnet - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.VnetInfo - :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: - list[~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity] - :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: - list[~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, **kwargs) -> None: - super(NetworkFeatures, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.virtual_network_name = None - self.virtual_network_connection = None - self.hybrid_connections = None - self.hybrid_connections_v2 = None - - -class NetworkTrace(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: str=None, status: str=None, message: str=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'validate_nonce': {'key': 'properties.validateNonce', 'type': 'bool'}, - 'nonce_expiration_interval': {'key': 'properties.nonceExpirationInterval', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, validate_nonce: bool=None, nonce_expiration_interval: str=None, **kwargs) -> None: - super(Nonce, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param method: Possible values include: 'ClientSecretPost' - :type method: str or - ~azure.mgmt.web.v2020_09_01.models.ClientCredentialMethod - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, - 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, method=None, client_secret_setting_name: str=None, **kwargs) -> None: - super(OpenIdConnectClientCredential, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.method = method - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, authorization_endpoint: str=None, token_endpoint: str=None, issuer: str=None, certification_uri: str=None, well_known_open_id_configuration: str=None, **kwargs) -> None: - super(OpenIdConnectConfig, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'name_claim_type': {'key': 'properties.nameClaimType', 'type': 'str'}, - 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, name_claim_type: str=None, scopes=None, **kwargs) -> None: - super(OpenIdConnectLogin, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param client_id: - :type client_id: str - :param client_credential: - :type client_credential: - ~azure.mgmt.web.v2020_09_01.models.OpenIdConnectClientCredential - :param open_id_connect_configuration: - :type open_id_connect_configuration: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, client_id: str=None, client_credential=None, open_id_connect_configuration=None, **kwargs) -> None: - super(OpenIdConnectRegistration, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.client_id = client_id - self.client_credential = client_credential - self.open_id_connect_configuration = open_id_connect_configuration - - -class Operation(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_09_01.models.OperationStatus - :param errors: Any errors associate with the operation. - :type errors: list[~azure.mgmt.web.v2020_09_01.models.ErrorEntity] - :param created_time: Time when operation has started. - :type created_time: datetime - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: - 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(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_09_01.models.EndpointDependency] - """ - - _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, - } - - def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: - super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) - self.category = category - self.endpoints = endpoints - - -class PerfMonResponse(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_09_01.models.PerfMonSet - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'PerfMonSet'}, - } - - def __init__(self, *, code: str=None, message: str=None, data=None, **kwargs) -> None: - super(PerfMonResponse, self).__init__(**kwargs) - self.code = code - self.message = message - self.data = data - - -class PerfMonSample(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: - super(PerfMonSample, self).__init__(**kwargs) - self.time = time - self.instance_name = instance_name - self.value = value - - -class PerfMonSet(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 - :param end_time: End time of the period. - :type end_time: 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_09_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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, tags=None, system_data=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - super(PremierAddOn, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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: true if promotion code is - required; otherwise, 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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'AppServicePlanRestrictions'}, - '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: str=None, system_data=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - super(PremierAddOnOffer, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - super(PremierAddOnPatchResource, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[PrivateAccessVirtualNetwork]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: - super(PrivateAccess, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.enabled = enabled - self.virtual_networks = virtual_networks - - -class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: - super(PrivateAccessSubnet, self).__init__(**kwargs) - self.name = name - self.key = key - - -class PrivateAccessVirtualNetwork(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_09_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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: - super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) - self.name = name - self.key = key - self.resource_id = resource_id - self.subnets = subnets - - -class PrivateEndpointConnectionResource(ProxyOnlyResource): - """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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar provisioning_state: - :vartype provisioning_state: str - :param private_endpoint: PrivateEndpoint of a remote private endpoint - connection - :type private_endpoint: ~azure.mgmt.web.v2020_09_01.models.ArmIdWrapper - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_09_01.models.PrivateLinkConnectionState - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'ArmIdWrapper'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, - } - - def __init__(self, *, kind: str=None, system_data=None, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateEndpointConnectionResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, - } - - def __init__(self, *, kind: str=None, system_data=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateLinkConnectionState(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: str=None, description: str=None, actions_required: str=None, **kwargs) -> None: - super(PrivateLinkConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = actions_required - - -class PrivateLinkResource(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_09_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, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.properties = properties - - -class PrivateLinkResourceProperties(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) -> None: - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None - - -class PrivateLinkResourcesWrapper(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_09_01.models.PrivateLinkResource] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_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 - :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 - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: - super(ProcessInfo, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: - super(ProcessModuleInfo, self).__init__(kind=kind, system_data=system_data, **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 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: - super(ProcessThreadInfo, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'blob': {'key': 'properties.blob', 'type': 'bytearray'}, - 'public_certificate_location': {'key': 'properties.publicCertificateLocation', 'type': 'PublicCertificateLocation'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: - super(PublicCertificate, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.blob = blob - self.public_certificate_location = public_certificate_location - self.thumbprint = None - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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, *, is_push_enabled: bool, kind: str=None, system_data=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - super(PushSettings, self).__init__(kind=kind, system_data=system_data, **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 RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - \\nMinReroutePercentage or - MaxReroutePercentage. Site metrics are checked every N - minutes specified in ChangeIntervalInMinutes.\\nCustom - decision algorithm - can be provided in TiPCallback site extension which URL can be specified - in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param creation_time: Timestamp when this instance was created. - :type creation_time: 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_09_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_09_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_09_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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, system_data=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - super(Recommendation, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, system_data=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - super(RecommendationRule, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - super(ReissueCertificateOrderRequest, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: - super(RelayServiceConnectionEntity, self).__init__(kind=kind, system_data=system_data, **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 Rendering(Model): - """Instructions for rendering the data. - - :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', - 'TimeSeries', 'TimeSeriesPerInstance' - :type type: str or ~azure.mgmt.web.v2020_09_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': 'RenderingType'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - super(RenewCertificateOrderRequest, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.key_size = key_size - self.csr = csr - self.is_private_key_external = is_private_key_external - - -class RequestsBasedTrigger(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, system_data=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: - super(ResourceHealthMetadata, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.category = category - self.signal_availability = signal_availability - - -class ResourceMetricAvailability(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) -> None: - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, **kwargs) -> None: - super(ResourceMetricDefinition, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.unit = None - self.primary_aggregation_type = None - self.metric_availabilities = None - self.resource_uri = None - self.properties = None - - -class ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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_09_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: bool=None, reason=None, message: str=None, **kwargs) -> None: - super(ResourceNameAvailability, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class ResourceNameAvailabilityRequest(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_09_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, is_fqdn: bool=None, **kwargs) -> None: - super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.is_fqdn = is_fqdn - - -class ResponseMetaData(Model): - """ResponseMetaData. - - :param data_source: Source of the Data - :type data_source: ~azure.mgmt.web.v2020_09_01.models.DataSource - """ - - _attribute_map = { - 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, - } - - def __init__(self, *, data_source=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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_09_01.models.DatabaseBackupSetting] - :param ignore_conflicting_host_names: Changes a logic when restoring an - app with custom domains. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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_09_01.models.BackupRestoreOperationType - :param adjust_connection_strings: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'BackupRestoreOperationType'}, - 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, - 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, - } - - def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, system_data=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: - super(RestoreRequest, self).__init__(kind=kind, system_data=system_data, **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 ServiceSpecification(Model): - """Resource metrics service provided by Microsoft.Insights resource provider. - - :param metric_specifications: - :type metric_specifications: - list[~azure.mgmt.web.v2020_09_01.models.MetricSpecification] - :param log_specifications: - :type log_specifications: - list[~azure.mgmt.web.v2020_09_01.models.LogSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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_09_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_09_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2020_09_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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_09_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2020_09_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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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_09_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: true if the app is a default - container; otherwise, 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_09_01.models.SlotSwapStatus - :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_09_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 identity: - :type identity: ~azure.mgmt.web.v2020_09_01.models.ManagedServiceIdentity - """ - - _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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **kwargs) - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.identity = identity - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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 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_09_01.models.UnauthenticatedClientAction - :param token_store_enabled: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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_09_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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested - as part of GitHub Login authentication. - This setting is optional - :type git_hub_oauth_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_oauth_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_oauth_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, - 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_oauth_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_oauth_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_oauth_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_oauth_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: str=None, system_data=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, aad_claims_authorization: str=None, google_client_id: str=None, google_client_secret: str=None, google_client_secret_setting_name: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_app_secret_setting_name: str=None, facebook_oauth_scopes=None, git_hub_client_id: str=None, git_hub_client_secret: str=None, git_hub_client_secret_setting_name: str=None, git_hub_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, twitter_consumer_secret_setting_name: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_client_secret_setting_name: str=None, microsoft_account_oauth_scopes=None, is_auth_from_file: str=None, auth_file_path: str=None, **kwargs) -> None: - super(SiteAuthSettings, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.enabled = enabled - self.runtime_version = runtime_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_oauth_scopes = google_oauth_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_oauth_scopes = facebook_oauth_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_oauth_scopes = git_hub_oauth_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_oauth_scopes = microsoft_account_oauth_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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param platform: - :type platform: ~azure.mgmt.web.v2020_09_01.models.AuthPlatform - :param global_validation: - :type global_validation: - ~azure.mgmt.web.v2020_09_01.models.GlobalValidation - :param identity_providers: - :type identity_providers: - ~azure.mgmt.web.v2020_09_01.models.IdentityProviders - :param login: - :type login: ~azure.mgmt.web.v2020_09_01.models.Login - :param http_settings: - :type http_settings: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, platform=None, global_validation=None, identity_providers=None, login=None, http_settings=None, **kwargs) -> None: - super(SiteAuthSettingsV2, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.platform = platform - self.global_validation = global_validation - self.identity_providers = identity_providers - self.login = login - self.http_settings = http_settings - - -class SiteCloneability(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_09_01.models.CloneAbilityResult - :param blocking_features: List of features enabled on app that prevent - cloning. - :type blocking_features: - list[~azure.mgmt.web.v2020_09_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_09_01.models.SiteCloneabilityCriterion] - :param blocking_characteristics: List of blocking application - characteristics. - :type blocking_characteristics: - list[~azure.mgmt.web.v2020_09_01.models.SiteCloneabilityCriterion] - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'CloneAbilityResult'}, - 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, - } - - def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: - 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(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: str=None, description: str=None, **kwargs) -> None: - super(SiteCloneabilityCriterion, self).__init__(**kwargs) - self.name = name - self.description = description - - -class SiteConfig(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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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_09_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2020_09_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2020_09_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2020_09_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_09_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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_09_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2020_09_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2020_09_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2020_09_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2020_09_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2020_09_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_09_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2020_09_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2020_09_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2020_09_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2020_09_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2020_09_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. Default value: True . - :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_09_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_09_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_09_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, - } - - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: - 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.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.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.health_check_path = health_check_path - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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_09_01.models.NameValuePair] - :param connection_strings: Connection strings. - :type connection_strings: - list[~azure.mgmt.web.v2020_09_01.models.ConnStringInfo] - :ivar machine_key: Site MachineKey. - :vartype machine_key: ~azure.mgmt.web.v2020_09_01.models.SiteMachineKey - :param handler_mappings: Handler mappings. - :type handler_mappings: - list[~azure.mgmt.web.v2020_09_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_09_01.models.ScmType - :param use32_bit_worker_process: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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_09_01.models.ManagedPipelineMode - :param virtual_applications: Virtual applications. - :type virtual_applications: - list[~azure.mgmt.web.v2020_09_01.models.VirtualApplication] - :param load_balancing: Site load balancing. Possible values include: - 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or - ~azure.mgmt.web.v2020_09_01.models.SiteLoadBalancing - :param experiments: This is work around for polymorphic types. - :type experiments: ~azure.mgmt.web.v2020_09_01.models.Experiments - :param limits: Site limits. - :type limits: ~azure.mgmt.web.v2020_09_01.models.SiteLimits - :param auto_heal_enabled: true if Auto Heal is enabled; - otherwise, false. - :type auto_heal_enabled: bool - :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: ~azure.mgmt.web.v2020_09_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_09_01.models.CorsSettings - :param push: Push endpoint settings. - :type push: ~azure.mgmt.web.v2020_09_01.models.PushSettings - :param api_definition: Information about the formal API definition for the - app. - :type api_definition: ~azure.mgmt.web.v2020_09_01.models.ApiDefinitionInfo - :param api_management_config: Azure API management settings linked to the - app. - :type api_management_config: - ~azure.mgmt.web.v2020_09_01.models.ApiManagementConfig - :param auto_swap_slot_name: Auto-swap slot name. - :type auto_swap_slot_name: str - :param local_my_sql_enabled: true to enable local MySQL; - otherwise, false. Default value: 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 ip_security_restrictions: IP security restrictions for main. - :type ip_security_restrictions: - list[~azure.mgmt.web.v2020_09_01.models.IpSecurityRestriction] - :param scm_ip_security_restrictions: IP security restrictions for scm. - :type scm_ip_security_restrictions: - list[~azure.mgmt.web.v2020_09_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. Default value: True . - :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_09_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_09_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_09_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 health_check_path: Health check path - :type health_check_path: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'machine_key': {'readonly': True}, - 'pre_warmed_instance_count': {'maximum': 10, 'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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]'}, - '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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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'}, - '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'}, - 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, health_check_path: str=None, **kwargs) -> None: - super(SiteConfigResource, self).__init__(kind=kind, system_data=system_data, **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.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.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.health_check_path = health_check_path - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar time: The time the snapshot was taken. - :vartype time: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'time': {'key': 'properties.time', 'type': 'iso-8601'}, - 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'int'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.time = None - self.snapshot_id = 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'extension_id': {'key': 'properties.extension_id', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'extension_type': {'key': 'properties.extension_type', 'type': 'SiteExtensionType'}, - '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: str=None, system_data=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: - super(SiteExtensionInfo, self).__init__(kind=kind, system_data=system_data, **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 SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param application_logs: Application logs configuration. - :type application_logs: - ~azure.mgmt.web.v2020_09_01.models.ApplicationLogsConfig - :param http_logs: HTTP logs configuration. - :type http_logs: ~azure.mgmt.web.v2020_09_01.models.HttpLogsConfig - :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: - ~azure.mgmt.web.v2020_09_01.models.EnabledConfig - :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: - super(SiteLogsConfig, self).__init__(kind=kind, system_data=system_data, **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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.UsageState - :param enabled: true if the app is enabled; otherwise, - 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_09_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_09_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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :param site_config: Configuration of the app. - :type site_config: ~azure.mgmt.web.v2020_09_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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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_09_01.models.HostingEnvironmentProfile - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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' - :type client_cert_mode: str or - ~azure.mgmt.web.v2020_09_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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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_09_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: true if the app is a default - container; otherwise, 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_09_01.models.SlotSwapStatus - :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_09_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 identity: - :type identity: ~azure.mgmt.web.v2020_09_01.models.ManagedServiceIdentity - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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'}, - 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, - 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, redundancy_mode=None, identity=None, **kwargs) -> None: - super(SitePatchResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - 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.https_only = https_only - self.redundancy_mode = redundancy_mode - self.in_progress_operation_id = None - self.identity = identity - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: - super(SitePhpErrorLogFlag, self).__init__(kind=kind, system_data=system_data, **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(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) -> None: - super(SiteSeal, self).__init__(**kwargs) - self.html = html - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param is_git_hub_action: true if this is deployed via GitHub - action. - :type is_git_hub_action: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - false for a Git repository. - :type is_mercurial: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - } - - def __init__(self, *, kind: str=None, system_data=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, is_git_hub_action: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, **kwargs) -> None: - super(SiteSourceControl, self).__init__(kind=kind, system_data=system_data, **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 - - -class SkuCapacity(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 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'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, *, minimum: int=None, maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - super(SkuCapacity, self).__init__(**kwargs) - self.minimum = minimum - self.maximum = maximum - self.default = default - self.scale_type = scale_type - - -class SkuDescription(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_09_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_09_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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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(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_09_01.models.SkuDescription - :param capacity: Min, max, and default scale values of the SKU. - :type capacity: ~azure.mgmt.web.v2020_09_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: str=None, sku=None, capacity=None, **kwargs) -> None: - super(SkuInfo, self).__init__(**kwargs) - self.resource_type = resource_type - self.sku = sku - self.capacity = capacity - - -class SkuInfos(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_09_01.models.GlobalCsmSkuDescription] - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, - } - - def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: - super(SlotConfigNamesResource, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, **kwargs) -> None: - super(SlotDifference, self).__init__(kind=kind, system_data=system_data, **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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(Model): - """Trigger based on request execution time. - - :param time_taken: Time taken. - :type time_taken: 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, time_taken: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(SlowRequestsBasedTrigger, self).__init__(**kwargs) - self.time_taken = time_taken - 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'time': {'key': 'properties.time', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(Snapshot, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.time = None - - -class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.SnapshotRecoverySource - :param overwrite: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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, *, overwrite: bool, kind: str=None, system_data=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: - super(SnapshotRestoreRequest, self).__init__(kind=kind, system_data=system_data, **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(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_09_01.models.SolutionType - :param data: Solution Data. - :type data: list[list[~azure.mgmt.web.v2020_09_01.models.NameValuePair]] - :param metadata: Solution Metadata. - :type metadata: - list[list[~azure.mgmt.web.v2020_09_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': 'SolutionType'}, - 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, - 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, - } - - def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: - 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: - super(SourceControl, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.token = token - self.token_secret = token_secret - self.refresh_token = refresh_token - self.expiration_time = expiration_time - - -class StackMajorVersion(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: true if this is the default major version; - otherwise, false. - :type is_default: bool - :param minor_versions: Minor versions associated with the major version. - :type minor_versions: - list[~azure.mgmt.web.v2020_09_01.models.StackMinorVersion] - :param application_insights: true if this supports - Application Insights; otherwise, false. - :type application_insights: bool - :param is_preview: true if this stack is in Preview, - otherwise false. - :type is_preview: bool - :param is_deprecated: true if this stack has been deprecated, - otherwise false. - :type is_deprecated: bool - :param is_hidden: true if this stack should be hidden for new - customers on portal, otherwise 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'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, - 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, - } - - def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, is_preview: bool=None, is_deprecated: bool=None, is_hidden: bool=None, **kwargs) -> None: - 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.is_preview = is_preview - self.is_deprecated = is_deprecated - self.is_hidden = is_hidden - - -class StackMinorVersion(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: - 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(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_09_01.models.ComputeModeOptions - :param worker_size: Size of the machines. Possible values include: - 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default' - :type worker_size: str or - ~azure.mgmt.web.v2020_09_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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: - 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 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: Resource tags. - :type tags: dict[str, str] - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 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_09_01.models.StaticSiteBuildProperties - :param sku: - :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, system_data=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, sku=None, **kwargs) -> None: - super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, system_data=system_data, **kwargs) - self.default_hostname = None - self.repository_url = repository_url - self.branch = branch - self.custom_domains = None - self.repository_token = repository_token - self.build_properties = build_properties - self.sku = sku - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :ivar last_updated_on: When this build was updated. - :vartype last_updated_on: 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_09_01.models.BuildStatus - """ - - _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}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(StaticSiteBuildARMResource, self).__init__(kind=kind, system_data=system_data, **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 - - -class StaticSiteBuildProperties(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: The path of the app artifacts after - building. - :type app_artifact_location: str - """ - - _attribute_map = { - 'app_location': {'key': 'appLocation', 'type': 'str'}, - 'api_location': {'key': 'apiLocation', 'type': 'str'}, - 'app_artifact_location': {'key': 'appArtifactLocation', 'type': 'str'}, - } - - def __init__(self, *, app_location: str=None, api_location: str=None, app_artifact_location: str=None, **kwargs) -> None: - super(StaticSiteBuildProperties, self).__init__(**kwargs) - self.app_location = app_location - self.api_location = api_location - self.app_artifact_location = app_artifact_location - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'domain_name': {'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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, - 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(StaticSiteCustomDomainOverviewARMResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.domain_name = None - self.created_on = None - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'function_name': {'key': 'properties.functionName', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.function_name = None - self.trigger_type = 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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 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_09_01.models.StaticSiteBuildProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_hostname': {'readonly': True}, - 'custom_domains': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - } - - def __init__(self, *, kind: str=None, system_data=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, **kwargs) -> None: - super(StaticSitePatchResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.default_hostname = None - self.repository_url = repository_url - self.branch = branch - self.custom_domains = None - self.repository_token = repository_token - self.build_properties = build_properties - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, - 'should_update_repository': {'key': 'properties.shouldUpdateRepository', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, system_data=None, repository_token: str=None, should_update_repository: bool=None, **kwargs) -> None: - super(StaticSiteResetPropertiesARMResource, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(StaticSitesWorkflowPreview, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, - } - - def __init__(self, *, kind: str=None, system_data=None, repository_url: str=None, branch: str=None, build_properties=None, **kwargs) -> None: - super(StaticSitesWorkflowPreviewRequest, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.repository_url = repository_url - self.branch = branch - self.build_properties = build_properties - - -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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, roles: str=None, **kwargs) -> None: - super(StaticSiteUserARMResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.provider = None - self.user_id = None - self.display_name = None - self.roles = roles - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, domain: str=None, provider: str=None, user_details: str=None, roles: str=None, num_hours_to_expiration: int=None, **kwargs) -> None: - super(StaticSiteUserInvitationRequestResource, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :ivar expires_on: The expiration time of the invitation - :vartype expires_on: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'expires_on': {'key': 'properties.expiresOn', 'type': 'iso-8601'}, - 'invitation_url': {'key': 'properties.invitationUrl', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(StaticSiteUserInvitationResponseResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.expires_on = None - self.invitation_url = None - - -class StatusCodesBasedTrigger(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 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'}, - 'count': {'key': 'count', 'type': 'int'}, - 'time_interval': {'key': 'timeInterval', 'type': 'str'}, - } - - def __init__(self, *, status: int=None, sub_status: int=None, win32_status: int=None, count: int=None, time_interval: str=None, **kwargs) -> None: - super(StatusCodesBasedTrigger, self).__init__(**kwargs) - self.status = status - self.sub_status = sub_status - self.win32_status = win32_status - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, system_data=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: - super(StorageMigrationOptions, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(StorageMigrationResponse, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - } - - def __init__(self, *, kind: str=None, system_data=None, properties=None, **kwargs) -> None: - super(StringDictionary, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.properties = properties - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'subnet_resource_id': {'key': 'properties.subnetResourceId', 'type': 'str'}, - 'swift_supported': {'key': 'properties.swiftSupported', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, system_data=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: - super(SwiftVirtualNetwork, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.subnet_resource_id = subnet_resource_id - self.swift_supported = swift_supported - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.web.v2020_09_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.web.v2020_09_01.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC) - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: - super(SystemData, self).__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class TldLegalAgreement(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: str=None, **kwargs) -> None: - super(TldLegalAgreement, self).__init__(**kwargs) - self.agreement_key = agreement_key - self.title = title - self.content = content - self.url = url - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.FileSystemTokenStore - :param azure_blob_storage: - :type azure_blob_storage: - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, enabled: bool=None, token_refresh_extension_hours: float=None, file_system=None, azure_blob_storage=None, **kwargs) -> None: - super(TokenStore, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param privacy: If true, then the top level domain supports - domain privacy; otherwise, 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, system_data=None, privacy: bool=None, **kwargs) -> None: - super(TopLevelDomain, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.privacy = privacy - - -class TopLevelDomainAgreementOption(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - """ - - _attribute_map = { - 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, - 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, - } - - def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: - super(TopLevelDomainAgreementOption, self).__init__(**kwargs) - self.include_privacy = include_privacy - self.for_transfer = for_transfer - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param runs: List of triggered web job runs. - :type runs: list[~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'runs': {'key': 'properties.runs', 'type': '[TriggeredJobRun]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, runs=None, **kwargs) -> None: - super(TriggeredJobHistory, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.runs = runs - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.TriggeredWebJobStatus - :param start_time: Start time. - :type start_time: datetime - :param end_time: End time. - :type end_time: 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'TriggeredWebJobStatus'}, - '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: str=None, system_data=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: - super(TriggeredJobRun, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param latest_run: Latest job run information. - :type latest_run: ~azure.mgmt.web.v2020_09_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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, system_data=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - super(TriggeredWebJob, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param enabled: - :type enabled: bool - :param registration: - :type registration: ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'registration': {'key': 'properties.registration', 'type': 'TwitterRegistration'}, - } - - def __init__(self, *, kind: str=None, system_data=None, enabled: bool=None, registration=None, **kwargs) -> None: - super(Twitter, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'consumer_key': {'key': 'properties.consumerKey', 'type': 'str'}, - 'consumer_secret_setting_name': {'key': 'properties.consumerSecretSettingName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, consumer_key: str=None, consumer_secret_setting_name: str=None, **kwargs) -> None: - super(TwitterRegistration, self).__init__(kind=kind, system_data=system_data, **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 - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - :ivar compute_mode: Compute mode used for this usage. Possible values - include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'ComputeModeOptions'}, - 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, **kwargs) -> None: - super(Usage, self).__init__(kind=kind, system_data=system_data, **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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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, *, publishing_user_name: str, kind: str=None, system_data=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: - super(User, self).__init__(kind=kind, system_data=system_data, **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(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' - :type type: str or - ~azure.mgmt.web.v2020_09_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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: 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 - """ - - _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'}, - } - - def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, container_registry_base_url: str=None, container_registry_username: str=None, container_registry_password: str=None, container_image_repository: str=None, container_image_tag: str=None, container_image_platform: str=None, **kwargs) -> None: - 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 - - -class ValidateResponse(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_09_01.models.ValidateResponseError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ValidateResponseError'}, - } - - def __init__(self, *, status: str=None, error=None, **kwargs) -> None: - super(ValidateResponse, self).__init__(**kwargs) - self.status = status - self.error = error - - -class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: - super(ValidateResponseError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, false. - :type preload_enabled: bool - :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: - list[~azure.mgmt.web.v2020_09_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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -class VirtualIPMapping(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: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, service_name: str=None, **kwargs) -> None: - 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(Model): - """Specification for using a Virtual Network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: 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 = { - '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=None, subnet: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vpn_package_uri': {'key': 'properties.vpnPackageUri', 'type': 'str'}, - } - - def __init__(self, *, vpn_package_uri: str, kind: str=None, system_data=None, vnet_name: str=None, **kwargs) -> None: - super(VnetGateway, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_01.models.VnetRoute] - :ivar resync_required: true if a resync is required; - otherwise, 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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: - super(VnetInfo, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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 - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'vnet_resource_group': {'key': 'properties.vnetResourceGroup', 'type': 'str'}, - 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, - 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, **kwargs) -> None: - super(VnetParameters, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.vnet_resource_group = vnet_resource_group - self.vnet_name = vnet_name - self.vnet_subnet_name = vnet_subnet_name - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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: str=None, system_data=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - super(VnetRoute, self).__init__(kind=kind, system_data=system_data, **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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'failed': {'key': 'properties.failed', 'type': 'bool'}, - 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, - } - - def __init__(self, *, kind: str=None, system_data=None, failed: bool=None, failed_tests=None, **kwargs) -> None: - super(VnetValidationFailureDetails, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.failed = failed - self.failed_tests = failed_tests - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'test_name': {'key': 'properties.testName', 'type': 'str'}, - 'details': {'key': 'properties.details', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, system_data=None, test_name: str=None, details: str=None, **kwargs) -> None: - super(VnetValidationTestFailure, self).__init__(kind=kind, system_data=system_data, **kwargs) - self.test_name = test_name - self.details = details - - -class WebAppCollection(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_09_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, **kwargs) -> None: - super(WebAppCollection, 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - '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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, system_data=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - super(WebJob, self).__init__(kind=kind, system_data=system_data, **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 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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :param state: Possible values include: 'READY', 'STOPPED', 'UNKNOWN' - :type state: str or ~azure.mgmt.web.v2020_09_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: - :type containers: dict[str, - ~azure.mgmt.web.v2020_09_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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'state': {'key': 'properties.state', 'type': 'SiteRuntimeState'}, - '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: str=None, system_data=None, state=None, status_url: str=None, detector_url: str=None, console_url: str=None, health_check_url: str=None, containers=None, **kwargs) -> None: - super(WebSiteInstanceStatus, self).__init__(kind=kind, system_data=system_data, **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 WorkerPool(Model): - """Worker pool of an App Service Environment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :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_09_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 = { - 'instance_names': {'readonly': True}, - } - - _attribute_map = { - 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'str'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, - 'instance_names': {'key': 'instanceNames', 'type': '[str]'}, - } - - def __init__(self, *, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, **kwargs) -> None: - super(WorkerPool, self).__init__(**kwargs) - 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 - - -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 system_data: The system metadata relating to this resource. - :type system_data: ~azure.mgmt.web.v2020_09_01.models.SystemData - :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_09_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] - :param sku: - :type sku: ~azure.mgmt.web.v2020_09_01.models.SkuDescription - """ - - _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'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, kind: str=None, system_data=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: - super(WorkerPoolResource, self).__init__(kind=kind, system_data=system_data, **kwargs) - 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 - self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_paged_models.py deleted file mode 100644 index 0f21c8de9f2..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_paged_models.py +++ /dev/null @@ -1,781 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AppServiceCertificateOrderPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) -class AppServiceCertificateResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) -class CsmOperationDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmOperationDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) -class DomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`Domain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Domain]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainPaged, self).__init__(*args, **kwargs) -class NameIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`NameIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(NameIdentifierPaged, self).__init__(*args, **kwargs) -class DomainOwnershipIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) -class TopLevelDomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`TopLevelDomain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} - } - - def __init__(self, *args, **kwargs): - - super(TopLevelDomainPaged, self).__init__(*args, **kwargs) -class TldLegalAgreementPaged(Paged): - """ - A paging container for iterating over a list of :class:`TldLegalAgreement ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} - } - - def __init__(self, *args, **kwargs): - - super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) -class CertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`Certificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Certificate]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificatePaged, self).__init__(*args, **kwargs) -class DeletedSitePaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSite ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSite]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSitePaged, self).__init__(*args, **kwargs) -class DetectorResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorResponsePaged, self).__init__(*args, **kwargs) -class DiagnosticCategoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiagnosticCategory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} - } - - def __init__(self, *args, **kwargs): - - super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) -class AnalysisDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`AnalysisDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) -class DetectorDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) -class ApplicationStackResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationStackResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationStackResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationStackResourcePaged, self).__init__(*args, **kwargs) -class RecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Recommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Recommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendationPaged, self).__init__(*args, **kwargs) -class SourceControlPaged(Paged): - """ - A paging container for iterating over a list of :class:`SourceControl ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SourceControl]'} - } - - def __init__(self, *args, **kwargs): - - super(SourceControlPaged, self).__init__(*args, **kwargs) -class BillingMeterPaged(Paged): - """ - A paging container for iterating over a list of :class:`BillingMeter ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BillingMeter]'} - } - - def __init__(self, *args, **kwargs): - - super(BillingMeterPaged, self).__init__(*args, **kwargs) -class GeoRegionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoRegion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoRegion]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoRegionPaged, self).__init__(*args, **kwargs) -class IdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`Identifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Identifier]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentifierPaged, self).__init__(*args, **kwargs) -class PremierAddOnOfferPaged(Paged): - """ - A paging container for iterating over a list of :class:`PremierAddOnOffer ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} - } - - def __init__(self, *args, **kwargs): - - super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) -class SitePaged(Paged): - """ - A paging container for iterating over a list of :class:`Site ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Site]'} - } - - def __init__(self, *args, **kwargs): - - super(SitePaged, self).__init__(*args, **kwargs) -class BackupItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupItem]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupItemPaged, self).__init__(*args, **kwargs) -class SiteConfigResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) -class SiteConfigurationSnapshotInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) -class ContinuousWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`ContinuousWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) -class DeploymentPaged(Paged): - """ - A paging container for iterating over a list of :class:`Deployment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Deployment]'} - } - - def __init__(self, *args, **kwargs): - - super(DeploymentPaged, self).__init__(*args, **kwargs) -class FunctionEnvelopePaged(Paged): - """ - A paging container for iterating over a list of :class:`FunctionEnvelope ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} - } - - def __init__(self, *args, **kwargs): - - super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) -class HostNameBindingPaged(Paged): - """ - A paging container for iterating over a list of :class:`HostNameBinding ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} - } - - def __init__(self, *args, **kwargs): - - super(HostNameBindingPaged, self).__init__(*args, **kwargs) -class WebSiteInstanceStatusPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebSiteInstanceStatus ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebSiteInstanceStatus]'} - } - - def __init__(self, *args, **kwargs): - - super(WebSiteInstanceStatusPaged, self).__init__(*args, **kwargs) -class ProcessInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessInfoPaged, self).__init__(*args, **kwargs) -class ProcessModuleInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessModuleInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) -class ProcessThreadInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessThreadInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) -class PerfMonResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`PerfMonResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(PerfMonResponsePaged, self).__init__(*args, **kwargs) -class PublicCertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`PublicCertificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} - } - - def __init__(self, *args, **kwargs): - - super(PublicCertificatePaged, self).__init__(*args, **kwargs) -class SiteExtensionInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteExtensionInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) -class SlotDifferencePaged(Paged): - """ - A paging container for iterating over a list of :class:`SlotDifference ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SlotDifference]'} - } - - def __init__(self, *args, **kwargs): - - super(SlotDifferencePaged, self).__init__(*args, **kwargs) -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) -class TriggeredWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) -class TriggeredJobHistoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredJobHistory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) -class CsmUsageQuotaPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmUsageQuota ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) -class WebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(WebJobPaged, self).__init__(*args, **kwargs) -class StaticSiteARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteUserARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteUserARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteUserARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteUserARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteBuildARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteBuildARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteBuildARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteFunctionOverviewARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteFunctionOverviewARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteFunctionOverviewARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteCustomDomainOverviewARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteCustomDomainOverviewARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteCustomDomainOverviewARMResourcePaged, self).__init__(*args, **kwargs) -class AppServiceEnvironmentResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) -class StampCapacityPaged(Paged): - """ - A paging container for iterating over a list of :class:`StampCapacity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StampCapacity]'} - } - - def __init__(self, *args, **kwargs): - - super(StampCapacityPaged, self).__init__(*args, **kwargs) -class InboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class WorkerPoolResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkerPoolResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) -class ResourceMetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) -class SkuInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SkuInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SkuInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SkuInfoPaged, self).__init__(*args, **kwargs) -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) -class OutboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class AppServicePlanPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServicePlan ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServicePlanPaged, self).__init__(*args, **kwargs) -class StrPaged(Paged): - """ - A paging container for iterating over a list of str object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } - - def __init__(self, *args, **kwargs): - - super(StrPaged, self).__init__(*args, **kwargs) -class HybridConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`HybridConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HybridConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(HybridConnectionPaged, self).__init__(*args, **kwargs) -class ResourceHealthMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_web_site_management_client_enums.py deleted file mode 100644 index 5a9b3d14b04..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,628 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class KeyVaultSecretStatus(str, Enum): - - 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 CertificateProductType(str, Enum): - - standard_domain_validated_ssl = "StandardDomainValidatedSsl" - standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class CertificateOrderStatus(str, Enum): - - pendingissuance = "Pendingissuance" - issued = "Issued" - revoked = "Revoked" - canceled = "Canceled" - denied = "Denied" - pendingrevocation = "Pendingrevocation" - pending_rekey = "PendingRekey" - unused = "Unused" - expired = "Expired" - not_submitted = "NotSubmitted" - - -class CertificateOrderActionType(str, Enum): - - 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 CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned, UserAssigned" - none = "None" - - -class IpFilterTag(str, Enum): - - default = "Default" - xff_proxy = "XffProxy" - service_tag = "ServiceTag" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 ScmType(str, Enum): - - 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 ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class FtpsState(str, Enum): - - all_allowed = "AllAllowed" - ftps_only = "FtpsOnly" - disabled = "Disabled" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class ClientCertMode(str, Enum): - - required = "Required" - optional = "Optional" - - -class RedundancyMode(str, Enum): - - none = "None" - manual = "Manual" - failover = "Failover" - active_active = "ActiveActive" - geo_redundant = "GeoRedundant" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class DomainStatus(str, Enum): - - 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 AzureResourceType(str, Enum): - - website = "Website" - traffic_manager = "TrafficManager" - - -class CustomHostNameDnsRecordType(str, Enum): - - cname = "CName" - a = "A" - - -class HostNameType(str, Enum): - - verified = "Verified" - managed = "Managed" - - -class DnsType(str, Enum): - - azure_dns = "AzureDns" - default_domain_registrar_dns = "DefaultDomainRegistrarDns" - - -class DomainType(str, Enum): - - regular = "Regular" - soft_deleted = "SoftDeleted" - - -class HostingEnvironmentStatus(str, Enum): - - preparing = "Preparing" - ready = "Ready" - scaling = "Scaling" - deleting = "Deleting" - - -class LoadBalancingMode(str, Enum): - - none = "None" - web = "Web" - publishing = "Publishing" - web_publishing = "Web,Publishing" - - -class ComputeModeOptions(str, Enum): - - shared = "Shared" - dedicated = "Dedicated" - dynamic = "Dynamic" - - -class WorkerSizeOptions(str, Enum): - - small = "Small" - medium = "Medium" - large = "Large" - d1 = "D1" - d2 = "D2" - d3 = "D3" - nested_small = "NestedSmall" - default = "Default" - - -class AccessControlEntryAction(str, Enum): - - permit = "Permit" - deny = "Deny" - - -class OperationStatus(str, Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" - - -class IssueType(str, Enum): - - 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 SolutionType(str, Enum): - - quick_solution = "QuickSolution" - deep_investigation = "DeepInvestigation" - best_practices = "BestPractices" - - -class RenderingType(str, Enum): - - no_graph = "NoGraph" - table = "Table" - time_series = "TimeSeries" - time_series_per_instance = "TimeSeriesPerInstance" - - -class ResourceScopeType(str, Enum): - - server_farm = "ServerFarm" - subscription = "Subscription" - web_site = "WebSite" - - -class NotificationLevel(str, Enum): - - critical = "Critical" - warning = "Warning" - information = "Information" - non_urgent_suggestion = "NonUrgentSuggestion" - - -class Channels(str, Enum): - - notification = "Notification" - api = "Api" - email = "Email" - webhook = "Webhook" - all = "All" - - -class AppServicePlanRestrictions(str, Enum): - - none = "None" - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - - -class InAvailabilityReasonType(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" - - -class CheckNameResourceTypes(str, Enum): - - site = "Site" - slot = "Slot" - hosting_environment = "HostingEnvironment" - publishing_user = "PublishingUser" - microsoft_websites = "Microsoft.Web/sites" - microsoft_websitesslots = "Microsoft.Web/sites/slots" - microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" - microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" - - -class ValidateResourceTypes(str, Enum): - - server_farm = "ServerFarm" - site = "Site" - - -class LogLevel(str, Enum): - - off = "Off" - verbose = "Verbose" - information = "Information" - warning = "Warning" - error = "Error" - - -class AzureStorageType(str, Enum): - - azure_files = "AzureFiles" - azure_blob = "AzureBlob" - - -class AzureStorageState(str, Enum): - - ok = "Ok" - invalid_credentials = "InvalidCredentials" - invalid_share = "InvalidShare" - - -class BackupItemStatus(str, Enum): - - 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 DatabaseType(str, Enum): - - sql_azure = "SqlAzure" - my_sql = "MySql" - local_my_sql = "LocalMySql" - postgre_sql = "PostgreSql" - - -class FrequencyUnit(str, Enum): - - day = "Day" - hour = "Hour" - - -class ContinuousWebJobStatus(str, Enum): - - initializing = "Initializing" - starting = "Starting" - running = "Running" - pending_restart = "PendingRestart" - stopped = "Stopped" - - -class WebJobType(str, Enum): - - continuous = "Continuous" - triggered = "Triggered" - - -class CookieExpirationConvention(str, Enum): - - fixed_time = "FixedTime" - identity_provider_derived = "IdentityProviderDerived" - - -class PublishingProfileFormat(str, Enum): - - file_zilla3 = "FileZilla3" - web_deploy = "WebDeploy" - ftp = "Ftp" - - -class DnsVerificationTestResult(str, Enum): - - passed = "Passed" - failed = "Failed" - skipped = "Skipped" - - -class ClientCredentialMethod(str, Enum): - - client_secret_post = "ClientSecretPost" - - -class ForwardProxyConvention(str, Enum): - - no_proxy = "NoProxy" - standard = "Standard" - custom = "Custom" - - -class UnauthenticatedClientActionV2(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - return401 = "Return401" - return403 = "Return403" - - -class MSDeployLogEntryType(str, Enum): - - message = "Message" - warning = "Warning" - error = "Error" - - -class MSDeployProvisioningState(str, Enum): - - accepted = "accepted" - running = "running" - succeeded = "succeeded" - failed = "failed" - canceled = "canceled" - - -class MySqlMigrationType(str, Enum): - - local_to_remote = "LocalToRemote" - remote_to_local = "RemoteToLocal" - - -class PublicCertificateLocation(str, Enum): - - current_user_my = "CurrentUserMy" - local_machine_my = "LocalMachineMy" - unknown = "Unknown" - - -class BackupRestoreOperationType(str, Enum): - - default = "Default" - clone = "Clone" - relocation = "Relocation" - snapshot = "Snapshot" - cloud_fs = "CloudFS" - - -class UnauthenticatedClientAction(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - - -class BuiltInAuthenticationProvider(str, Enum): - - azure_active_directory = "AzureActiveDirectory" - facebook = "Facebook" - google = "Google" - microsoft_account = "MicrosoftAccount" - twitter = "Twitter" - github = "Github" - - -class CloneAbilityResult(str, Enum): - - cloneable = "Cloneable" - partially_cloneable = "PartiallyCloneable" - not_cloneable = "NotCloneable" - - -class SiteExtensionType(str, Enum): - - gallery = "Gallery" - web_root = "WebRoot" - - -class TriggeredWebJobStatus(str, Enum): - - success = "Success" - failed = "Failed" - error = "Error" - - -class SiteRuntimeState(str, Enum): - - ready = "READY" - stopped = "STOPPED" - unknown = "UNKNOWN" - - -class BuildStatus(str, Enum): - - waiting_for_deployment = "WaitingForDeployment" - uploading = "Uploading" - deploying = "Deploying" - ready = "Ready" - failed = "Failed" - deleting = "Deleting" - detached = "Detached" - - -class TriggerTypes(str, Enum): - - http_trigger = "HttpTrigger" - unknown = "Unknown" - - -class SkuName(str, Enum): - - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - dynamic = "Dynamic" - isolated = "Isolated" - premium_v2 = "PremiumV2" - elastic_premium = "ElasticPremium" - elastic_isolated = "ElasticIsolated" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/__init__.py deleted file mode 100644 index b6a3c15dcb7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations -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 ._provider_operations import ProviderOperations -from ._recommendations_operations import RecommendationsOperations -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 -from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin - -__all__ = [ - 'AppServiceCertificateOrdersOperations', - 'CertificateRegistrationProviderOperations', - 'DomainsOperations', - 'TopLevelDomainsOperations', - 'DomainRegistrationProviderOperations', - 'CertificatesOperations', - 'DeletedWebAppsOperations', - 'DiagnosticsOperations', - 'ProviderOperations', - 'RecommendationsOperations', - 'WebAppsOperations', - 'StaticSitesOperations', - 'AppServiceEnvironmentsOperations', - 'AppServicePlansOperations', - 'ResourceHealthMetadataOperations', - 'WebSiteManagementClientOperationsMixin', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_certificate_orders_operations.py deleted file mode 100644 index 2bdf88cd01b..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_certificate_orders_operations.py +++ /dev/null @@ -1,1423 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceCertificateOrdersOperations(object): - """AppServiceCertificateOrdersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all certificate orders in a subscription. - - Description for List all certificate orders in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def validate_purchase_information( - self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate_purchase_information.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def get( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - - def _create_or_update_initial( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.AppServiceCertificateOrder - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateOrder or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def delete( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.AppServiceCertificateOrderPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def list_certificates( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_certificates.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} - - def get_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - - def _create_or_update_certificate_initial( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.AppServiceCertificateResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def delete_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.AppServiceCertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def reissue( - self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.ReissueCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reissue.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} - - def renew( - self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.RenewCertificateOrderRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} - - def resend_email( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.resend_email.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} - - def resend_request_emails( - self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): - """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: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.resend_request_emails.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} - - def retrieve_site_seal( - self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): - """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 light_theme: If 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSeal or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSeal or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) - - # Construct URL - url = self.retrieve_site_seal.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSeal', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} - - def verify_domain_ownership( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_domain_ownership.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} - - def retrieve_certificate_actions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2020_09_01.models.CertificateOrderAction] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_actions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateOrderAction]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} - - def retrieve_certificate_email_history( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.CertificateEmail] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_email_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateEmail]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_environments_operations.py deleted file mode 100644 index d63c064be36..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_environments_operations.py +++ /dev/null @@ -1,2858 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceEnvironmentsOperations(object): - """AppServiceEnvironmentsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all App Service Environments for a subscription. - - Description for Get all App Service Environments for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.AppServiceEnvironmentResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceEnvironmentResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - hosting_environment_envelope=hosting_environment_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _delete_initial( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if force_delete is not None: - query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 true to force the deletion - even if the App Service Environment contains resources. The default is - false. - :type force_delete: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - force_delete=force_delete, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.AppServiceEnvironmentPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def list_capacities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StampCapacity - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StampCapacityPaged[~azure.mgmt.web.v2020_09_01.models.StampCapacity] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_capacities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} - - def get_vip_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AddressResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.AddressResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vip_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AddressResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} - - - def _change_vnet_initial( - self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): - vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) - - # Construct URL - url = self.change_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def change_vnet( - self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 id: Resource id of the Virtual Network. - :type id: str - :param subnet: Subnet within the Virtual Network. - :type subnet: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._change_vnet_initial( - resource_group_name=resource_group_name, - name=name, - id=id, - subnet=subnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} - - def list_diagnostics( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2020_09_01.models.HostingEnvironmentDiagnostics] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_diagnostics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} - - def get_diagnostics_item( - self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostingEnvironmentDiagnostics or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.HostingEnvironmentDiagnostics or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostics_item.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} - - def get_inbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of InboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2020_09_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_09_01.models.InboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_inbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} - - def list_multi_role_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} - - def get_multi_role_pool( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - - def _create_or_update_multi_role_pool_initial( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def list_multi_role_pool_instance_metric_definitions( - self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} - - def list_multi_role_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} - - def list_multi_role_pool_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_09_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} - - def list_multi_role_usages( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2020_09_01.models.UsagePaged[~azure.mgmt.web.v2020_09_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} - - def list_operations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.Operation] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_operations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Operation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} - - def get_outbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2020_09_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_09_01.models.OutboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_outbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} - - def reboot( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reboot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} - - - def _resume_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.resume.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def resume( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._resume_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} - - def list_app_service_plans( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_app_service_plans.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} - - def list_web_apps( - self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} - - - def _suspend_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.suspend.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def suspend( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._suspend_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} - - def list_worker_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} - - def get_worker_pool( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - - def _create_or_update_worker_pool_initial( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.WorkerPoolResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def list_worker_pool_instance_metric_definitions( - self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} - - def list_web_worker_metric_definitions( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} - - def list_worker_pool_skus( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_09_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} - - def list_web_worker_usages( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2020_09_01.models.UsagePaged[~azure.mgmt.web.v2020_09_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_plans_operations.py deleted file mode 100644 index 9e0e1a485fc..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_app_service_plans_operations.py +++ /dev/null @@ -1,1946 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServicePlansOperations(object): - """AppServicePlansOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, detailed=None, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans for a subscription. - - Description for Get all App Service plans for a subscription. - - :param detailed: Specify true to return all App Service - plan properties. The default is false, which returns a - subset of the properties. - Retrieval of all properties may increase the API latency. - :type detailed: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlan') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.AppServicePlan - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AppServicePlan or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.AppServicePlan]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - app_service_plan=app_service_plan, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.AppServicePlanPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def list_capabilities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.Capability] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_capabilities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Capability]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connection_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_web_apps_by_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of str - :rtype: ~azure.mgmt.web.v2020_09_01.models.StrPaged[str] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps_by_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} - - def get_hybrid_connection_plan_limit( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionLimits or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnectionLimits or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_plan_limit.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionLimits', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HybridConnection - :rtype: - ~azure.mgmt.web.v2020_09_01.models.HybridConnectionPaged[~azure.mgmt.web.v2020_09_01.models.HybridConnection] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} - - def restart_web_apps( - self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): - """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 true to perform a soft - restart, applies the configuration settings and restarts the apps if - necessary. The default is false, which always restarts - and reprovisions the apps - :type soft_restart: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if soft_restart is not None: - query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} - - def list_web_apps( - self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} - - def get_server_farm_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_server_farm_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} - - def list_vnets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} - - def get_vnet_from_server_farm( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_from_server_farm.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_routes_for_vnet( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_routes_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} - - def get_route_for_vnet( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_route_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def create_or_update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def delete_vnet_route( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetRoute - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def reboot_worker( - self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reboot_worker.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificate_registration_provider_operations.py deleted file mode 100644 index 1767331b6f6..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificate_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificateRegistrationProviderOperations(object): - """CertificateRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificates_operations.py deleted file mode 100644 index 16d3e78cdd4..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_certificates_operations.py +++ /dev/null @@ -1,437 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificatesOperations(object): - """CertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all certificates for a subscription. - - Description for Get all certificates for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CertificatePaged[~azure.mgmt.web.v2020_09_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CertificatePaged[~azure.mgmt.web.v2020_09_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def create_or_update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.Certificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'Certificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.CertificatePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_deleted_web_apps_operations.py deleted file mode 100644 index e2655cedbc7..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_deleted_web_apps_operations.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DeletedWebAppsOperations(object): - """DeletedWebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all deleted apps for a subscription. - - Description for Get all deleted apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_09_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_09_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} - - def get_deleted_web_app_by_location( - self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeletedSite or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DeletedSite or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deleted_web_app_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeletedSite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_diagnostics_operations.py deleted file mode 100644 index 2e9ae389434..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_diagnostics_operations.py +++ /dev/null @@ -1,1713 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DiagnosticsOperations(object): - """DiagnosticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list_hosting_environment_detector_responses( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hosting_environment_detector_responses.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} - - def get_hosting_environment_detector_response( - self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hosting_environment_detector_response.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} - - def list_site_detector_responses( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} - - def get_site_detector_response( - self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} - - def list_site_diagnostic_categories( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} - - def get_site_diagnostic_category( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AnalysisDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.AnalysisDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AnalysisDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector( - self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector( - self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} - - def list_site_detector_responses_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} - - def get_site_detector_response_slot( - self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} - - def list_site_diagnostic_categories_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} - - def get_site_diagnostic_category_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AnalysisDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.AnalysisDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AnalysisDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_09_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector_slot( - self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DetectorDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector_slot( - self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domain_registration_provider_operations.py deleted file mode 100644 index 6031958ce74..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domain_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DomainRegistrationProviderOperations(object): - """DomainRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domains_operations.py deleted file mode 100644 index 89896f4b2fe..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_domains_operations.py +++ /dev/null @@ -1,1086 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DomainsOperations(object): - """DomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def check_availability( - self, name=None, custom_headers=None, raw=False, **operation_config): - """Check if a domain is available for registration. - - Description for Check if a domain is available for registration. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainAvailabilityCheckResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DomainAvailabilityCheckResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.check_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainAvailabilityCheckResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all domains in a subscription. - - Description for Get all domains in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DomainPaged[~azure.mgmt.web.v2020_09_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} - - def get_control_center_sso_request( - self, custom_headers=None, raw=False, **operation_config): - """Generate a single sign-on request for the domain management portal. - - Description for Generate a single sign-on request for the domain - management portal. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainControlCenterSsoRequest or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DomainControlCenterSsoRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_control_center_sso_request.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainControlCenterSsoRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} - - def list_recommendations( - self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): - """Get domain name recommendations based on keywords. - - Description for Get domain name recommendations based on keywords. - - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NameIdentifier - :rtype: - ~azure.mgmt.web.v2020_09_01.models.NameIdentifierPaged[~azure.mgmt.web.v2020_09_01.models.NameIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommendations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DomainPaged[~azure.mgmt.web.v2020_09_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} - - def get( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - - def _create_or_update_initial( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'Domain') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.Domain - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.Domain]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - domain=domain, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def delete( - self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): - """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 true to delete - the domain immediately. The default is false which - deletes the domain after 24 hours. - :type force_hard_delete_domain: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.DomainPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'DomainPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def list_ownership_identifiers( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DomainOwnershipIdentifier - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_ownership_identifiers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} - - def get_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def create_or_update_ownership_identifier( - self, resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.DomainOwnershipIdentifier - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def delete_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def update_ownership_identifier( - self, resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.DomainOwnershipIdentifier - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def renew( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_provider_operations.py deleted file mode 100644 index 6e50b5a6026..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_provider_operations.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProviderOperations(object): - """ProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def get_available_stacks( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Description for Get available application frameworks and their - versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStackResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_09_01.models.ApplicationStackResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks.metadata['url'] - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} - - def get_available_stacks_on_prem( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Description for Get available application frameworks and their - versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStackResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_09_01.models.ApplicationStackResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks_on_prem.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_recommendations_operations.py deleted file mode 100644 index 00282e3058d..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_recommendations_operations.py +++ /dev/null @@ -1,1070 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class RecommendationsOperations(object): - """RecommendationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """List all recommendations for a subscription. - - Description for List all recommendations for a subscription. - - :param featured: Specify true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} - - def reset_all_filters( - self, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for a subscription. - - Description for Reset all recommendation opt-out settings for a - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} - - def disable_recommendation_for_subscription( - self, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_subscription.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} - - def list_history_for_hosting_environment( - self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} - - def list_recommended_rules_for_hosting_environment( - self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} - - def disable_all_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_all_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} - - def reset_all_filters_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} - - def get_rule_details_by_hosting_environment( - self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} - - def disable_recommendation_for_hosting_environment( - self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_hosting_environment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} - - def list_history_for_web_app( - self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} - - def list_recommended_rules_for_web_app( - self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RecommendationPaged[~azure.mgmt.web.v2020_09_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} - - def disable_all_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_all_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} - - def reset_all_filters_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} - - def get_rule_details_by_web_app( - self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} - - def disable_recommendation_for_site( - self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_site.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_resource_health_metadata_operations.py deleted file mode 100644 index 726f9fe646b..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_resource_health_metadata_operations.py +++ /dev/null @@ -1,468 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourceHealthMetadataOperations(object): - """ResourceHealthMetadataOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the subscription. - - Description for List all ResourceHealthMetadata for all sites in the - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} - - def get_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} - - def list_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} - - def get_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_static_sites_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_static_sites_operations.py deleted file mode 100644 index 81aa6d9ca9f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_static_sites_operations.py +++ /dev/null @@ -1,1878 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class StaticSitesOperations(object): - """StaticSitesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def preview_workflow( - self, location, static_sites_workflow_preview_request, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StaticSitesWorkflowPreviewRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSitesWorkflowPreview or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSitesWorkflowPreview - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.preview_workflow.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSitesWorkflowPreview', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all Static Sites for a subscription. - - Description for Get all Static Sites for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteARMResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} - - def get_static_sites_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteARMResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_static_sites_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} - - def get_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def create_or_update_static_site( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StaticSiteARMResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def delete_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def update_static_site( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StaticSitePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def list_static_site_users( - self, resource_group_name, name, authprovider, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteUserARMResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteUserARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteUserARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_users.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteUserARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} - - def delete_static_site_user( - self, resource_group_name, name, authprovider, userid, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} - - def update_static_site_user( - self, resource_group_name, name, authprovider, userid, static_site_user_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StaticSiteUserARMResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteUserARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_static_site_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} - - def get_static_site_builds( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteBuildARMResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteBuildARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteBuildARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_static_site_builds.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteBuildARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} - - def get_static_site_build( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteBuildARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StaticSiteBuildARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteBuildARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} - - def delete_static_site_build( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} - - def create_or_update_static_site_build_function_app_settings( - self, resource_group_name, name, pr_id, app_settings, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param app_settings: - :type app_settings: - ~azure.mgmt.web.v2020_09_01.models.StringDictionary - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings'} - - def list_static_site_build_functions( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteFunctionOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_build_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} - - def list_static_site_build_function_app_settings( - self, resource_group_name, name, pr_id, custom_headers=None, raw=False, **operation_config): - """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 - :param pr_id: The stage site identifier. - :type pr_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_build_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'prId': self._serialize.url("pr_id", pr_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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} - - def create_or_update_static_site_function_app_settings( - self, resource_group_name, name, app_settings, custom_headers=None, raw=False, **operation_config): - """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: - :type app_settings: - ~azure.mgmt.web.v2020_09_01.models.StringDictionary - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_static_site_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} - - def create_user_roles_invitation_link( - self, resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StaticSiteUserInvitationRequestResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserInvitationResponseResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteUserInvitationResponseResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_user_roles_invitation_link.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} - - def list_static_site_custom_domains( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteCustomDomainOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteCustomDomainOverviewARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteCustomDomainOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_custom_domains.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteCustomDomainOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} - - def create_or_update_static_site_custom_domain( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteCustomDomainOverviewARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteCustomDomainOverviewARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - def delete_static_site_custom_domain( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - def validate_custom_domain_can_be_added_to_static_site( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate_custom_domain_can_be_added_to_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} - - def detach_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.detach_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} - - def list_static_site_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteFunctionOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} - - def list_static_site_function_app_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - if response.status_code == 202: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} - - def list_static_site_secrets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} - - def reset_static_site_api_key( - self, resource_group_name, name, reset_properties_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StaticSiteResetPropertiesARMResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_static_site_api_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_top_level_domains_operations.py deleted file mode 100644 index 117848110fb..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_top_level_domains_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TopLevelDomainsOperations(object): - """TopLevelDomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all top-level domains supported for registration. - - Description for Get all top-level domains supported for registration. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TopLevelDomain - :rtype: - ~azure.mgmt.web.v2020_09_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2020_09_01.models.TopLevelDomain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} - - def get( - self, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TopLevelDomain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.TopLevelDomain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TopLevelDomain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} - - def list_agreements( - self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): - """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 include_privacy: If true, then the list of - agreements will include agreements for domain privacy as well; - otherwise, false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TldLegalAgreement - :rtype: - ~azure.mgmt.web.v2020_09_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2020_09_01.models.TldLegalAgreement] - :raises: - :class:`DefaultErrorResponseException` - """ - agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_agreements.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py deleted file mode 100644 index 49197758c78..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_apps_operations.py +++ /dev/null @@ -1,27447 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class WebAppsOperations(object): - """WebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all apps for a subscription. - - Description for Get all apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} - - def list_by_resource_group( - self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - if include_slots is not None: - query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.Site - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def delete( - self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SitePatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def analyze_custom_hostname( - self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} - - def apply_slot_config_to_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_config_to_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} - - def backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} - - def list_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_09_01.models.BackupItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} - - def get_backup_status( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def delete_backup( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def list_backup_status_secrets( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} - - - def _restore_initial( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} - - def get_basic_publishing_credentials_policies( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesCollection or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesCollection - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_basic_publishing_credentials_policies.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} - - def get_ftp_allowed( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ftp_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} - - def update_ftp_allowed( - self, resource_group_name, name, csm_publishing_access_policies_entity, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.CsmPublishingCredentialsPoliciesEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_ftp_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} - - def get_scm_allowed( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_scm_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} - - def update_scm_allowed( - self, resource_group_name, name, csm_publishing_access_policies_entity, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.CsmPublishingCredentialsPoliciesEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_scm_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} - - def list_configurations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} - - def update_application_settings( - self, resource_group_name, name, app_settings, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StringDictionary - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} - - def list_application_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} - - def update_auth_settings( - self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteAuthSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} - - def get_auth_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} - - def update_auth_settings_v2( - self, resource_group_name, name, site_auth_settings_v2, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteAuthSettingsV2 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} - - def get_auth_settings_v2( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} - - def update_azure_storage_accounts( - self, resource_group_name, name, azure_storage_accounts, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.AzureStoragePropertyDictionaryResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} - - def list_azure_storage_accounts( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} - - def update_backup_configuration( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.BackupRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def delete_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def get_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} - - def update_connection_strings( - self, resource_group_name, name, connection_strings, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.ConnectionStringDictionary - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} - - def list_connection_strings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_diagnostic_logs_config( - self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteLogsConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_metadata( - self, resource_group_name, name, metadata, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StringDictionary - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} - - def list_metadata( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} - - - def _list_publishing_credentials_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} - - def update_site_push_settings( - self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PushSettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} - - def list_site_push_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} - - def list_slot_configuration_names( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def update_slot_configuration_names( - self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SlotConfigNamesResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def get_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def create_or_update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteConfigResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def list_configuration_snapshot_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} - - def get_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.recover_site_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} - - def get_container_logs_zip( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} - - def list_continuous_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_09_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} - - def get_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DeploymentPaged[~azure.mgmt.web.v2020_09_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} - - def get_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def create_deployment( - self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def delete_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def list_deployment_log( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} - - def discover_backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} - - def list_domain_ownership_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_09_01.models.IdentifierPaged[~azure.mgmt.web.v2020_09_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.Identifier - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.Identifier - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_initial( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_ms_deploy_operation_initial( - resource_group_name=resource_group_name, - name=name, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - def get_ms_deploy_log( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} - - def list_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} - - def get_functions_admin_token( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} - - def get_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - - def _create_function_initial( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_function( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_function_initial( - resource_group_name=resource_group_name, - name=name, - function_name=function_name, - function_envelope=function_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def delete_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def create_or_update_function_secret( - self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def delete_function_secret( - self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} - - def list_function_secrets( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} - - def list_host_keys( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} - - def list_sync_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} - - def sync_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} - - def create_or_update_host_secret( - self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def delete_host_secret( - self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2020_09_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_09_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} - - def get_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding( - self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.HostNameBinding - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def delete_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.HybridConnection - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} - - def list_relay_service_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} - - def get_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def delete_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.RelayServiceConnectionEntity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def list_instance_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebSiteInstanceStatus - :rtype: - ~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatus] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} - - def get_instance_info( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebSiteInstanceStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebSiteInstanceStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} - - def get_instance_ms_deploy_status( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - - def _create_instance_ms_deploy_operation_initial( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} - - def list_instance_processes( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} - - def get_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} - - def list_instance_process_modules( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module( - self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} - - def list_instance_process_threads( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} - - def is_cloneable( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} - - def list_site_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_09_01.models.BackupItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} - - def list_sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} - - - def _migrate_storage_initial( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_storage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_storage( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.StorageMigrationOptions - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StorageMigrationResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.StorageMigrationResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.StorageMigrationResponse]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_storage_initial( - subscription_name=subscription_name, - resource_group_name=resource_group_name, - name=name, - migration_options=migration_options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} - - - def _migrate_my_sql_initial( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_my_sql.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_my_sql( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.MigrateMySqlRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Operation or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.Operation] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.Operation]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_my_sql_initial( - resource_group_name=resource_group_name, - name=name, - migration_request_envelope=migration_request_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} - - def get_migrate_my_sql_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} - - def get_swift_virtual_network_connection( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def create_or_update_swift_virtual_network_connection( - self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_swift_virtual_network.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def update_swift_virtual_network_connection( - self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def list_network_features( - self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): - """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. This can either be "summary" or - "detailed". - :type view: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_network_features.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} - - def get_network_trace_operation( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} - - def stop_web_site_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} - - def get_network_traces( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} - - def get_network_trace_operation_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} - - def get_network_traces_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.generate_new_site_publishing_password.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} - - def list_perf_mon_counters( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2020_09_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_09_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} - - def get_site_php_error_log_flag( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} - - def list_premier_add_ons( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} - - def get_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PremierAddOn - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PremierAddOnPatchResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def get_private_access( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def put_private_access_vnet( - self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PrivateAccess - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def list_processes( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} - - def get_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def delete_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def get_process_dump( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} - - def list_process_modules( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} - - def get_process_module( - self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} - - def list_public_certificates( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2020_09_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_09_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} - - def get_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate( - self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PublicCertificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets( - self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """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 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_09_01.models.PublishingProfileFormat - :param include_disaster_recovery_endpoints: Include the - DisasterRecover endpoint if true - :type include_disaster_recovery_endpoints: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} - - def reset_production_slot_config( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_production_slot_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} - - def restart( - self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} - - - def _restore_from_backup_blob_initial( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob( - self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_backup_blob_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.DeletedAppRestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_deleted_app_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} - - - def _restore_snapshot_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.SnapshotRestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_snapshot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} - - def list_site_extensions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} - - def get_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_initial( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._install_site_extension_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def delete_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _copy_production_slot_initial( - self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, **operation_config): - copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) - - # Construct URL - url = self.copy_production_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def copy_production_slot( - self, resource_group_name, name, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): - """Copies a deployment slot to another deployment slot of an app. - - Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. - :type target_slot: str - :param site_config: The site object which will be merged with the - source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2020_09_01.models.SiteConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._copy_production_slot_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - site_config=site_config, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} - - def list_slots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SitePaged[~azure.mgmt.web.v2020_09_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} - - def get_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - - def _create_or_update_slot_initial( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.Site - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def delete_slot( - self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """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 true if the App Service plan - will be empty after app deletion and you want to delete the empty App - Service plan. By default, the empty App Service plan is not deleted. - :type delete_empty_server_farm: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SitePatchResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def analyze_custom_hostname_slot( - self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} - - def apply_slot_configuration_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} - - def backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} - - def list_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_09_01.models.BackupItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} - - def get_backup_status_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def delete_backup_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def list_backup_status_secrets_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.BackupRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} - - - def _restore_slot_initial( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_slot_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} - - def list_configurations_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} - - def update_application_settings_slot( - self, resource_group_name, name, app_settings, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StringDictionary - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} - - def list_application_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} - - def update_auth_settings_slot( - self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteAuthSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} - - def get_auth_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} - - def update_auth_settings_v2_slot( - self, resource_group_name, name, site_auth_settings_v2, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteAuthSettingsV2 - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_v2_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} - - def get_auth_settings_v2_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_v2_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} - - def update_azure_storage_accounts_slot( - self, resource_group_name, name, azure_storage_accounts, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.AzureStoragePropertyDictionaryResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} - - def list_azure_storage_accounts_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} - - def update_backup_configuration_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.BackupRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def delete_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def get_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} - - def update_connection_strings_slot( - self, resource_group_name, name, connection_strings, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.ConnectionStringDictionary - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} - - def list_connection_strings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_diagnostic_logs_config_slot( - self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteLogsConfig - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_metadata_slot( - self, resource_group_name, name, metadata, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.StringDictionary - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} - - def list_metadata_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} - - - def _list_publishing_credentials_slot_initial( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} - - def update_site_push_settings_slot( - self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PushSettings - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} - - def list_site_push_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} - - def get_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def create_or_update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteConfigResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def list_configuration_snapshot_info_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} - - def get_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.recover_site_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} - - def get_container_logs_zip_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} - - def list_continuous_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_09_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} - - def get_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2020_09_01.models.DeploymentPaged[~azure.mgmt.web.v2020_09_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} - - def get_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def create_deployment_slot( - self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.Deployment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def delete_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def list_deployment_log_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} - - def discover_backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} - - def list_domain_ownership_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_09_01.models.IdentifierPaged[~azure.mgmt.web.v2020_09_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.Identifier - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.Identifier - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation_slot( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_ms_deploy_operation_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - def get_ms_deploy_log_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} - - def list_instance_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} - - def get_functions_admin_token_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} - - def get_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - - def _create_instance_function_slot_initial( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_function_slot( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.FunctionEnvelope - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def delete_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def create_or_update_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} - - def list_function_secrets_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} - - def list_host_keys_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} - - def list_sync_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} - - def sync_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} - - def create_or_update_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2020_09_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_09_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} - - def get_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding_slot( - self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.HostNameBinding - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def delete_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def get_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.HybridConnection - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} - - def list_relay_service_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} - - def get_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def delete_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.RelayServiceConnectionEntity - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def list_instance_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebSiteInstanceStatus - :rtype: - ~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatus] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} - - def get_instance_info_slot( - self, resource_group_name, name, instance_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebSiteInstanceStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.WebSiteInstanceStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebSiteInstanceStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} - - def get_instance_ms_deploy_status_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - - def _create_instance_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation_slot( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.MSDeploy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_processes_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} - - def get_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_process_modules_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def list_instance_process_threads_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} - - def is_cloneable_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} - - def list_site_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_09_01.models.BackupItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} - - def list_sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} - - def get_migrate_my_sql_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} - - def get_swift_virtual_network_connection_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def create_or_update_swift_virtual_network_connection_slot( - self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_swift_virtual_network_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def update_swift_virtual_network_connection_slot( - self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """Integrates this Web App with a Virtual Network. This requires that 1) - "swiftSupported" is true when doing a GET against this resource, and 2) - that the target Subnet has already been delegated, and is not - in use by another App Service Plan other than the one this App is in. - - Description for Integrates this Web App with a Virtual Network. This - requires that 1) "swiftSupported" is true when doing a GET against this - resource, and 2) that the target Subnet has already been delegated, and - is not - in use by another App Service Plan other than the one this App is in. - - :param resource_group_name: Name 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_envelope: Properties of the Virtual Network - connection. See example. - :type connection_envelope: - ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def list_network_features_slot( - self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): - """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. This can either be "summary" or - "detailed". - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_network_features_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} - - def get_network_trace_operation_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} - - def stop_web_site_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} - - def get_network_traces_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} - - def get_network_trace_operation_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def get_network_traces_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.generate_new_site_publishing_password_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} - - def list_perf_mon_counters_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2020_09_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_09_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} - - def get_site_php_error_log_flag_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} - - def list_premier_add_ons_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} - - def get_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PremierAddOn - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PremierAddOnPatchResource - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def get_private_access_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def put_private_access_vnet_slot( - self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PrivateAccess - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def get_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """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: - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.PrivateEndpointConnectionResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _approve_or_reject_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.approve_or_reject_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - if response.status_code == 202: - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def approve_or_reject_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, private_endpoint_wrapper, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.PrivateLinkConnectionApprovalRequestResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnectionResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.PrivateEndpointConnectionResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.PrivateEndpointConnectionResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnectionResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 202: - deserialized = self._deserialize('object', response) - if response.status_code == 204: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_private_endpoint_connection_initial( - resource_group_name=resource_group_name, - name=name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def get_private_link_resources( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PrivateLinkResourcesWrapper - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_link_resources.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} - - def list_processes_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} - - def get_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def delete_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def get_process_dump_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} - - def list_process_modules_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} - - def get_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} - - def list_public_certificates_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2020_09_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_09_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} - - def get_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate_slot( - self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.PublicCertificate - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets_slot( - self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """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 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_09_01.models.PublishingProfileFormat - :param include_disaster_recovery_endpoints: Include the - DisasterRecover endpoint if true - :type include_disaster_recovery_endpoints: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} - - def reset_slot_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} - - def restart_slot( - self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} - - - def _restore_from_backup_blob_slot_initial( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.RestoreRequest - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_backup_blob_slot_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.DeletedAppRestoreRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_deleted_app_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} - - - def _restore_snapshot_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.SnapshotRestoreRequest - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_snapshot_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} - - def list_site_extensions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} - - def get_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_slot_initial( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._install_site_extension_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def delete_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _copy_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, **operation_config): - copy_slot_entity = models.CsmCopySlotEntity(target_slot=target_slot, site_config=site_config) - - # Construct URL - url = self.copy_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def copy_slot_slot( - self, resource_group_name, name, slot, target_slot, site_config, custom_headers=None, raw=False, polling=True, **operation_config): - """Copies a deployment slot to another deployment slot of an app. - - Description for Copies a deployment slot to another deployment slot 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 target_slot: Destination deployment slot during copy operation. - :type target_slot: str - :param site_config: The site object which will be merged with the - source slot site - to produce new destination slot site object. - null to just copy source slot content. Otherwise a - Site - object with properties to override source slot site. - :type site_config: ~azure.mgmt.web.v2020_09_01.models.SiteConfig - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._copy_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - site_config=site_config, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - copy_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} - - def list_slot_differences_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_09_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} - - - def _swap_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._swap_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} - - def list_snapshots_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SnapshotPaged[~azure.mgmt.web.v2020_09_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} - - def list_snapshots_from_dr_secondary_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SnapshotPaged[~azure.mgmt.web.v2020_09_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} - - def get_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - - def _create_or_update_source_control_slot_initial( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def delete_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteSourceControl - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def start_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} - - - def _start_network_trace_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} - - def stop_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} - - def stop_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} - - def sync_repository_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_repository_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} - - def sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} - - def list_triggered_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2020_09_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} - - def get_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def run_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.run_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} - - def list_usages_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} - - def list_vnet_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} - - def get_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetInfo - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetGateway - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2020_09_01.models.WebJobPaged[~azure.mgmt.web.v2020_09_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} - - def get_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} - - def list_slot_differences_from_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_09_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_from_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} - - - def _swap_slot_with_production_initial( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_with_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_with_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._swap_slot_with_production_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} - - def list_snapshots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SnapshotPaged[~azure.mgmt.web.v2020_09_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} - - def list_snapshots_from_dr_secondary( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SnapshotPaged[~azure.mgmt.web.v2020_09_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} - - def get_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - - def _create_or_update_source_control_initial( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): - """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_09_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def delete_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SiteSourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def start( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} - - - def _start_network_trace_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} - - def stop( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} - - def stop_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} - - def sync_repository( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_repository.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} - - def sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} - - def list_triggered_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2020_09_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} - - def get_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history( - self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} - - def run_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.run_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} - - def list_vnet_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_09_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} - - def get_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetInfo - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetGateway - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2020_09_01.models.WebJobPaged[~azure.mgmt.web.v2020_09_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} - - def get_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_site_management_client_operations.py deleted file mode 100644 index 18b7dc9687e..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/operations/_web_site_management_client_operations.py +++ /dev/null @@ -1,1124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -from .. import models -import uuid - - -class WebSiteManagementClientOperationsMixin(object): - - def generate_github_access_token_for_appservice_cli_async( - self, code, state, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppserviceGithubToken or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.AppserviceGithubToken or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - request = models.AppserviceGithubTokenRequest(code=code, state=state) - - # Construct URL - url = self.generate_github_access_token_for_appservice_cli_async.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'AppserviceGithubTokenRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppserviceGithubToken', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generate_github_access_token_for_appservice_cli_async.metadata = {'url': '/providers/Microsoft.Web/generateGithubAccessTokenForAppserviceCLI'} - - def get_publishing_user( - self, custom_headers=None, raw=False, **operation_config): - """Gets publishing user. - - Description for Gets publishing user. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def update_publishing_user( - self, user_details, custom_headers=None, raw=False, **operation_config): - """Updates 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(user_details, 'User') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def list_source_controls( - self, custom_headers=None, raw=False, **operation_config): - """Gets the source controls available for Azure websites. - - Description for Gets the source controls available for Azure websites. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SourceControl - :rtype: - ~azure.mgmt.web.v2020_09_01.models.SourceControlPaged[~azure.mgmt.web.v2020_09_01.models.SourceControl] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_source_controls.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} - - def get_source_control( - self, source_control_type, custom_headers=None, raw=False, **operation_config): - """Gets source control token. - - Description for Gets source control token. - - :param source_control_type: Type of source control - :type source_control_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def update_source_control( - self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.SourceControl - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_message, 'SourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def list_billing_meters( - self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BillingMeter - :rtype: - ~azure.mgmt.web.v2020_09_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeter] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_billing_meters.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} - - def check_name_availability( - self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): - """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. 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_09_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. - :type is_fqdn: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) - - # Construct URL - url = self.check_name_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceNameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} - - def get_subscription_deployment_locations( - self, custom_headers=None, raw=False, **operation_config): - """Gets list of available geo regions plus ministamps. - - Description for Gets list of available geo regions plus ministamps. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_subscription_deployment_locations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeploymentLocations', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} - - def list_geo_regions( - self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values - include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' - :type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName - :param linux_workers_enabled: Specify true if you want to - filter to only regions that support Linux workers. - :type linux_workers_enabled: bool - :param xenon_workers_enabled: Specify true if you want to - filter to only regions that support Xenon workers. - :type xenon_workers_enabled: bool - :param linux_dynamic_workers_enabled: Specify true if you - want to filter to only regions that support Linux Consumption Workers. - :type linux_dynamic_workers_enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GeoRegion - :rtype: - ~azure.mgmt.web.v2020_09_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegion] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_geo_regions.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} - - def list_site_identifiers_assigned_to_host_name( - self, name=None, custom_headers=None, raw=False, **operation_config): - """List all apps that are assigned to a hostname. - - Description for List all apps that are assigned to a hostname. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_09_01.models.IdentifierPaged[~azure.mgmt.web.v2020_09_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} - - def list_premier_add_on_offers( - self, custom_headers=None, raw=False, **operation_config): - """List all premier add-on offers. - - Description for List all premier add-on offers. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PremierAddOnOffer - :rtype: - ~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOffer] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_premier_add_on_offers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} - - def list_skus( - self, custom_headers=None, raw=False, **operation_config): - """List all SKUs. - - Description for List all SKUs. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_skus.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SkuInfos', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} - - def verify_hosting_environment_vnet( - self, parameters, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.VnetParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetValidationFailureDetails or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_hosting_environment_vnet.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VnetParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetValidationFailureDetails', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} - - def move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} - - def validate( - self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): - """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_09_01.models.ValidateRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_request, 'ValidateRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidateResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} - - def validate_move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.validate_move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_09_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/__init__.py deleted file mode 100644 index 55c66f839cf..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import WebSiteManagementClientConfiguration -from ._web_site_management_client import WebSiteManagementClient -__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_configuration.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_configuration.py deleted file mode 100644 index b96e0933169..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_configuration.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class WebSiteManagementClientConfiguration(AzureConfiguration): - """Configuration for WebSiteManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(WebSiteManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_web_site_management_client.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_web_site_management_client.py deleted file mode 100644 index 3c4043a6135..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/_web_site_management_client.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import WebSiteManagementClientConfiguration -from .operations import WebSiteManagementClientOperationsMixin -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 GlobalModelOperations -from .operations import ProviderOperations -from .operations import RecommendationsOperations -from .operations import WebAppsOperations -from .operations import StaticSitesOperations -from .operations import AppServiceEnvironmentsOperations -from .operations import AppServicePlansOperations -from .operations import ResourceHealthMetadataOperations -from .operations import KubeEnvironmentsOperations -from . import models - - -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient): - """WebSite Management Client - - :ivar config: Configuration for client. - :vartype config: WebSiteManagementClientConfiguration - - :ivar app_service_certificate_orders: AppServiceCertificateOrders operations - :vartype app_service_certificate_orders: azure.mgmt.web.v2020_12_01.operations.AppServiceCertificateOrdersOperations - :ivar certificate_orders_diagnostics: CertificateOrdersDiagnostics operations - :vartype certificate_orders_diagnostics: azure.mgmt.web.v2020_12_01.operations.CertificateOrdersDiagnosticsOperations - :ivar certificate_registration_provider: CertificateRegistrationProvider operations - :vartype certificate_registration_provider: azure.mgmt.web.v2020_12_01.operations.CertificateRegistrationProviderOperations - :ivar domains: Domains operations - :vartype domains: azure.mgmt.web.v2020_12_01.operations.DomainsOperations - :ivar top_level_domains: TopLevelDomains operations - :vartype top_level_domains: azure.mgmt.web.v2020_12_01.operations.TopLevelDomainsOperations - :ivar domain_registration_provider: DomainRegistrationProvider operations - :vartype domain_registration_provider: azure.mgmt.web.v2020_12_01.operations.DomainRegistrationProviderOperations - :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.web.v2020_12_01.operations.CertificatesOperations - :ivar deleted_web_apps: DeletedWebApps operations - :vartype deleted_web_apps: azure.mgmt.web.v2020_12_01.operations.DeletedWebAppsOperations - :ivar diagnostics: Diagnostics operations - :vartype diagnostics: azure.mgmt.web.v2020_12_01.operations.DiagnosticsOperations - :ivar global_model: GlobalModel operations - :vartype global_model: azure.mgmt.web.v2020_12_01.operations.GlobalModelOperations - :ivar provider: Provider operations - :vartype provider: azure.mgmt.web.v2020_12_01.operations.ProviderOperations - :ivar recommendations: Recommendations operations - :vartype recommendations: azure.mgmt.web.v2020_12_01.operations.RecommendationsOperations - :ivar web_apps: WebApps operations - :vartype web_apps: azure.mgmt.web.v2020_12_01.operations.WebAppsOperations - :ivar static_sites: StaticSites operations - :vartype static_sites: azure.mgmt.web.v2020_12_01.operations.StaticSitesOperations - :ivar app_service_environments: AppServiceEnvironments operations - :vartype app_service_environments: azure.mgmt.web.v2020_12_01.operations.AppServiceEnvironmentsOperations - :ivar app_service_plans: AppServicePlans operations - :vartype app_service_plans: azure.mgmt.web.v2020_12_01.operations.AppServicePlansOperations - :ivar resource_health_metadata: ResourceHealthMetadata operations - :vartype resource_health_metadata: azure.mgmt.web.v2020_12_01.operations.ResourceHealthMetadataOperations - :ivar kube_environments: KubeEnvironments operations - :vartype kube_environments: azure.mgmt.web.v2020_12_01.operations.KubeEnvironmentsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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 - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url) - super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-12-01' - self._serialize = Serializer(client_models) - 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 = GlobalModelOperations( - 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) - self.kube_environments = KubeEnvironmentsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py deleted file mode 100644 index 5c5e86c54b3..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/__init__.py +++ /dev/null @@ -1,1307 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -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 ApiManagementConfig - from ._models_py3 import AppInsightsWebAppStackSettings - from ._models_py3 import Apple - from ._models_py3 import AppleRegistration - from ._models_py3 import ApplicationLogsConfig - from ._models_py3 import ApplicationStack - from ._models_py3 import ApplicationStackResource - from ._models_py3 import AppLogsConfiguration - from ._models_py3 import AppRegistration - from ._models_py3 import AppServiceCertificate - from ._models_py3 import AppServiceCertificateOrder - from ._models_py3 import AppServiceCertificateOrderPatchResource - from ._models_py3 import AppServiceCertificatePatchResource - from ._models_py3 import AppServiceCertificateResource - from ._models_py3 import AppServiceEnvironment - from ._models_py3 import AppServiceEnvironmentPatchResource - from ._models_py3 import AppServiceEnvironmentResource - from ._models_py3 import AppserviceGithubToken - from ._models_py3 import AppserviceGithubTokenRequest - from ._models_py3 import AppServicePlan - from ._models_py3 import AppServicePlanPatchResource - from ._models_py3 import ArcConfiguration - 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 BackupRequest - from ._models_py3 import BackupSchedule - from ._models_py3 import BillingMeter - from ._models_py3 import BlobStorageTokenStore - from ._models_py3 import Capability - from ._models_py3 import Certificate - 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 ConnectionStringDictionary - from ._models_py3 import ConnStringInfo - from ._models_py3 import ConnStringValueTypePair - 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 CookieExpiration - from ._models_py3 import CorsSettings - from ._models_py3 import CsmMoveResourceEnvelope - 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 CustomHostnameAnalysisResult - from ._models_py3 import CustomOpenIdConnectProvider - from ._models_py3 import DatabaseBackupSetting - from ._models_py3 import DataProviderMetadata - from ._models_py3 import DataSource - from ._models_py3 import DataTableResponseColumn - from ._models_py3 import DataTableResponseObject - from ._models_py3 import DefaultErrorResponse, DefaultErrorResponseException - from ._models_py3 import DefaultErrorResponseError - from ._models_py3 import DefaultErrorResponseErrorDetailsItem - from ._models_py3 import DeletedAppRestoreRequest - from ._models_py3 import DeletedSite - from ._models_py3 import Deployment - 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 DiagnosticAnalysis - from ._models_py3 import DiagnosticCategory - from ._models_py3 import DiagnosticData - 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 DomainControlCenterSsoRequest - from ._models_py3 import DomainOwnershipIdentifier - 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 ExtendedLocation - from ._models_py3 import ExtendedLocationEnvelope - 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 FrontEndConfiguration - from ._models_py3 import FunctionAppMajorVersion - from ._models_py3 import FunctionAppMinorVersion - from ._models_py3 import FunctionAppRuntimes - from ._models_py3 import FunctionAppRuntimeSettings - from ._models_py3 import FunctionAppStack - from ._models_py3 import FunctionEnvelope - from ._models_py3 import FunctionSecrets - from ._models_py3 import GeoRegion - 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 HostingEnvironmentDeploymentInfo - from ._models_py3 import HostingEnvironmentDiagnostics - from ._models_py3 import HostingEnvironmentProfile - from ._models_py3 import HostKeys - from ._models_py3 import HostName - from ._models_py3 import HostNameBinding - from ._models_py3 import HostNameSslState - from ._models_py3 import HttpLogsConfig - from ._models_py3 import HttpSettings - from ._models_py3 import HttpSettingsRoutes - from ._models_py3 import HybridConnection - from ._models_py3 import HybridConnectionKey - from ._models_py3 import HybridConnectionLimits - from ._models_py3 import Identifier - from ._models_py3 import IdentityProviders - from ._models_py3 import InboundEnvironmentEndpoint - from ._models_py3 import IpSecurityRestriction - from ._models_py3 import JwtClaimChecks - from ._models_py3 import KeyInfo - from ._models_py3 import KeyValuePairStringObject - from ._models_py3 import KubeEnvironment - from ._models_py3 import KubeEnvironmentProfile - from ._models_py3 import LegacyMicrosoftAccount - from ._models_py3 import LinuxJavaContainerSettings - from ._models_py3 import LocalizableString - from ._models_py3 import LogAnalyticsConfiguration - from ._models_py3 import Login - from ._models_py3 import LoginRoutes - from ._models_py3 import LoginScopes - from ._models_py3 import LogSpecification - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models_py3 import MetricAvailability - from ._models_py3 import MetricSpecification - from ._models_py3 import MigrateMySqlRequest - from ._models_py3 import MigrateMySqlStatus - from ._models_py3 import MSDeploy - from ._models_py3 import MSDeployLog - from ._models_py3 import MSDeployLogEntry - from ._models_py3 import MSDeployStatus - from ._models_py3 import NameIdentifier - 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 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 PremierAddOnPatchResource - from ._models_py3 import PrivateAccess - from ._models_py3 import PrivateAccessSubnet - from ._models_py3 import PrivateAccessVirtualNetwork - 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 ProcessModuleInfo - from ._models_py3 import ProcessThreadInfo - from ._models_py3 import ProxyOnlyResource - from ._models_py3 import PublicCertificate - 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 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 ResourceHealthMetadata - from ._models_py3 import ResourceMetricAvailability - from ._models_py3 import ResourceMetricDefinition - 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 SiteConfigurationSnapshotInfo - from ._models_py3 import SiteExtensionInfo - 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 SkuInfos - from ._models_py3 import SlotConfigNamesResource - from ._models_py3 import SlotDifference - from ._models_py3 import SlotSwapStatus - from ._models_py3 import SlowRequestsBasedTrigger - from ._models_py3 import Snapshot - from ._models_py3 import SnapshotRecoverySource - from ._models_py3 import SnapshotRestoreRequest - from ._models_py3 import Solution - from ._models_py3 import SourceControl - from ._models_py3 import StackMajorVersion - from ._models_py3 import StackMinorVersion - from ._models_py3 import StampCapacity - from ._models_py3 import StaticSiteARMResource - from ._models_py3 import StaticSiteBuildARMResource - from ._models_py3 import StaticSiteBuildProperties - from ._models_py3 import StaticSiteCustomDomainOverviewARMResource - from ._models_py3 import StaticSiteCustomDomainRequestPropertiesARMResource - from ._models_py3 import StaticSiteFunctionOverviewARMResource - from ._models_py3 import StaticSitePatchResource - from ._models_py3 import StaticSiteResetPropertiesARMResource - from ._models_py3 import StaticSitesWorkflowPreview - from ._models_py3 import StaticSitesWorkflowPreviewRequest - from ._models_py3 import StaticSiteTemplateOptions - from ._models_py3 import StaticSiteUserARMResource - from ._models_py3 import StaticSiteUserInvitationRequestResource - from ._models_py3 import StaticSiteUserInvitationResponseResource - from ._models_py3 import StaticSiteUserProvidedFunctionApp - from ._models_py3 import StaticSiteUserProvidedFunctionAppARMResource - from ._models_py3 import StaticSiteZipDeploymentARMResource - 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 TokenStore - from ._models_py3 import TopLevelDomain - from ._models_py3 import TopLevelDomainAgreementOption - from ._models_py3 import TriggeredJobHistory - from ._models_py3 import TriggeredJobRun - from ._models_py3 import TriggeredWebJob - from ._models_py3 import Twitter - from ._models_py3 import TwitterRegistration - from ._models_py3 import Usage - 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 WebAppMajorVersion - from ._models_py3 import WebAppMinorVersion - from ._models_py3 import WebAppRuntimes - from ._models_py3 import WebAppRuntimeSettings - from ._models_py3 import WebAppStack - from ._models_py3 import WebJob - from ._models_py3 import WebSiteInstanceStatus - from ._models_py3 import WindowsJavaContainerSettings - from ._models_py3 import WorkerAppsConfiguration - from ._models_py3 import WorkerPoolResource -except (SyntaxError, ImportError): - from ._models import AbnormalTimePeriod - from ._models import Address - from ._models import AddressResponse - from ._models import AllowedAudiencesValidation - from ._models import AnalysisData - from ._models import AnalysisDefinition - from ._models import ApiDefinitionInfo - from ._models import ApiKVReference - from ._models import ApiManagementConfig - from ._models import AppInsightsWebAppStackSettings - from ._models import Apple - from ._models import AppleRegistration - from ._models import ApplicationLogsConfig - from ._models import ApplicationStack - from ._models import ApplicationStackResource - from ._models import AppLogsConfiguration - from ._models import AppRegistration - from ._models import AppServiceCertificate - from ._models import AppServiceCertificateOrder - from ._models import AppServiceCertificateOrderPatchResource - from ._models import AppServiceCertificatePatchResource - from ._models import AppServiceCertificateResource - from ._models import AppServiceEnvironment - from ._models import AppServiceEnvironmentPatchResource - from ._models import AppServiceEnvironmentResource - from ._models import AppserviceGithubToken - from ._models import AppserviceGithubTokenRequest - from ._models import AppServicePlan - from ._models import AppServicePlanPatchResource - from ._models import ArcConfiguration - from ._models import ArmIdWrapper - from ._models import AseV3NetworkingConfiguration - from ._models import AuthPlatform - from ._models import AutoHealActions - from ._models import AutoHealCustomAction - from ._models import AutoHealRules - from ._models import AutoHealTriggers - from ._models import AzureActiveDirectory - from ._models import AzureActiveDirectoryLogin - from ._models import AzureActiveDirectoryRegistration - from ._models import AzureActiveDirectoryValidation - from ._models import AzureBlobStorageApplicationLogsConfig - from ._models import AzureBlobStorageHttpLogsConfig - from ._models import AzureStaticWebApps - from ._models import AzureStaticWebAppsRegistration - from ._models import AzureStorageInfoValue - from ._models import AzureStoragePropertyDictionaryResource - from ._models import AzureTableStorageApplicationLogsConfig - from ._models import BackupItem - from ._models import BackupRequest - from ._models import BackupSchedule - from ._models import BillingMeter - from ._models import BlobStorageTokenStore - from ._models import Capability - from ._models import Certificate - from ._models import CertificateDetails - from ._models import CertificateEmail - from ._models import CertificateOrderAction - from ._models import CertificateOrderContact - from ._models import CertificatePatchResource - from ._models import ClientRegistration - from ._models import CloningInfo - from ._models import ConnectionStringDictionary - from ._models import ConnStringInfo - from ._models import ConnStringValueTypePair - from ._models import Contact - from ._models import ContainerCpuStatistics - from ._models import ContainerCpuUsage - from ._models import ContainerInfo - from ._models import ContainerMemoryStatistics - from ._models import ContainerNetworkInterfaceStatistics - from ._models import ContainerThrottlingData - from ._models import ContinuousWebJob - from ._models import CookieExpiration - from ._models import CorsSettings - from ._models import CsmMoveResourceEnvelope - from ._models import CsmOperationDescription - from ._models import CsmOperationDescriptionProperties - from ._models import CsmOperationDisplay - from ._models import CsmPublishingCredentialsPoliciesCollection - from ._models import CsmPublishingCredentialsPoliciesEntity - from ._models import CsmPublishingProfileOptions - from ._models import CsmSlotEntity - from ._models import CsmUsageQuota - from ._models import CustomHostnameAnalysisResult - from ._models import CustomOpenIdConnectProvider - from ._models import DatabaseBackupSetting - from ._models import DataProviderMetadata - from ._models import DataSource - from ._models import DataTableResponseColumn - from ._models import DataTableResponseObject - from ._models import DefaultErrorResponse, DefaultErrorResponseException - from ._models import DefaultErrorResponseError - from ._models import DefaultErrorResponseErrorDetailsItem - from ._models import DeletedAppRestoreRequest - from ._models import DeletedSite - from ._models import Deployment - from ._models import DeploymentLocations - from ._models import DetectorAbnormalTimePeriod - from ._models import DetectorDefinition - from ._models import DetectorInfo - from ._models import DetectorResponse - from ._models import DiagnosticAnalysis - from ._models import DiagnosticCategory - from ._models import DiagnosticData - from ._models import DiagnosticDetectorResponse - from ._models import DiagnosticMetricSample - from ._models import DiagnosticMetricSet - from ._models import Dimension - from ._models import Domain - from ._models import DomainAvailabilityCheckResult - from ._models import DomainControlCenterSsoRequest - from ._models import DomainOwnershipIdentifier - from ._models import DomainPatchResource - from ._models import DomainPurchaseConsent - from ._models import DomainRecommendationSearchParameters - from ._models import EnabledConfig - from ._models import EndpointDependency - from ._models import EndpointDetail - from ._models import ErrorEntity - from ._models import Experiments - from ._models import ExtendedLocation - from ._models import ExtendedLocationEnvelope - from ._models import Facebook - from ._models import FileSystemApplicationLogsConfig - from ._models import FileSystemHttpLogsConfig - from ._models import FileSystemTokenStore - from ._models import ForwardProxy - from ._models import FrontEndConfiguration - from ._models import FunctionAppMajorVersion - from ._models import FunctionAppMinorVersion - from ._models import FunctionAppRuntimes - from ._models import FunctionAppRuntimeSettings - from ._models import FunctionAppStack - from ._models import FunctionEnvelope - from ._models import FunctionSecrets - from ._models import GeoRegion - from ._models import GitHub - from ._models import GitHubActionCodeConfiguration - from ._models import GitHubActionConfiguration - from ._models import GitHubActionContainerConfiguration - from ._models import GitHubActionWebAppStackSettings - from ._models import GlobalCsmSkuDescription - from ._models import GlobalValidation - from ._models import Google - from ._models import HandlerMapping - from ._models import HostingEnvironmentDeploymentInfo - from ._models import HostingEnvironmentDiagnostics - from ._models import HostingEnvironmentProfile - from ._models import HostKeys - from ._models import HostName - from ._models import HostNameBinding - from ._models import HostNameSslState - from ._models import HttpLogsConfig - from ._models import HttpSettings - from ._models import HttpSettingsRoutes - from ._models import HybridConnection - from ._models import HybridConnectionKey - from ._models import HybridConnectionLimits - from ._models import Identifier - from ._models import IdentityProviders - from ._models import InboundEnvironmentEndpoint - from ._models import IpSecurityRestriction - from ._models import JwtClaimChecks - from ._models import KeyInfo - from ._models import KeyValuePairStringObject - from ._models import KubeEnvironment - from ._models import KubeEnvironmentProfile - from ._models import LegacyMicrosoftAccount - from ._models import LinuxJavaContainerSettings - from ._models import LocalizableString - from ._models import LogAnalyticsConfiguration - from ._models import Login - from ._models import LoginRoutes - from ._models import LoginScopes - from ._models import LogSpecification - from ._models import ManagedServiceIdentity - from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue - from ._models import MetricAvailability - from ._models import MetricSpecification - from ._models import MigrateMySqlRequest - from ._models import MigrateMySqlStatus - from ._models import MSDeploy - from ._models import MSDeployLog - from ._models import MSDeployLogEntry - from ._models import MSDeployStatus - from ._models import NameIdentifier - from ._models import NameValuePair - from ._models import NetworkFeatures - from ._models import NetworkTrace - from ._models import Nonce - from ._models import OpenIdConnectClientCredential - from ._models import OpenIdConnectConfig - from ._models import OpenIdConnectLogin - from ._models import OpenIdConnectRegistration - from ._models import Operation - from ._models import OutboundEnvironmentEndpoint - from ._models import PerfMonResponse - from ._models import PerfMonSample - from ._models import PerfMonSet - from ._models import PremierAddOn - from ._models import PremierAddOnOffer - from ._models import PremierAddOnPatchResource - from ._models import PrivateAccess - from ._models import PrivateAccessSubnet - from ._models import PrivateAccessVirtualNetwork - from ._models import PrivateLinkConnectionApprovalRequestResource - from ._models import PrivateLinkConnectionState - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourceProperties - from ._models import PrivateLinkResourcesWrapper - from ._models import ProcessInfo - from ._models import ProcessModuleInfo - from ._models import ProcessThreadInfo - from ._models import ProxyOnlyResource - from ._models import PublicCertificate - from ._models import PushSettings - from ._models import QueryUtterancesResult - from ._models import QueryUtterancesResults - from ._models import RampUpRule - from ._models import Recommendation - from ._models import RecommendationRule - from ._models import ReissueCertificateOrderRequest - from ._models import RelayServiceConnectionEntity - from ._models import RemotePrivateEndpointConnectionARMResource - from ._models import Rendering - from ._models import RenewCertificateOrderRequest - from ._models import RequestsBasedTrigger - from ._models import Resource - from ._models import ResourceHealthMetadata - from ._models import ResourceMetricAvailability - from ._models import ResourceMetricDefinition - from ._models import ResourceNameAvailability - from ._models import ResourceNameAvailabilityRequest - from ._models import ResponseMetaData - from ._models import RestoreRequest - from ._models import SampleUtterance - from ._models import ServiceSpecification - from ._models import Site - from ._models import SiteAuthSettings - from ._models import SiteAuthSettingsV2 - from ._models import SiteCloneability - from ._models import SiteCloneabilityCriterion - from ._models import SiteConfig - from ._models import SiteConfigPropertiesDictionary - from ._models import SiteConfigResource - from ._models import SiteConfigurationSnapshotInfo - from ._models import SiteExtensionInfo - from ._models import SiteLimits - from ._models import SiteLogsConfig - from ._models import SiteMachineKey - from ._models import SitePatchResource - from ._models import SitePhpErrorLogFlag - from ._models import SiteSeal - from ._models import SiteSealRequest - from ._models import SiteSourceControl - from ._models import SkuCapacity - from ._models import SkuDescription - from ._models import SkuInfo - from ._models import SkuInfos - from ._models import SlotConfigNamesResource - from ._models import SlotDifference - from ._models import SlotSwapStatus - from ._models import SlowRequestsBasedTrigger - from ._models import Snapshot - from ._models import SnapshotRecoverySource - from ._models import SnapshotRestoreRequest - from ._models import Solution - from ._models import SourceControl - from ._models import StackMajorVersion - from ._models import StackMinorVersion - from ._models import StampCapacity - from ._models import StaticSiteARMResource - from ._models import StaticSiteBuildARMResource - from ._models import StaticSiteBuildProperties - from ._models import StaticSiteCustomDomainOverviewARMResource - from ._models import StaticSiteCustomDomainRequestPropertiesARMResource - from ._models import StaticSiteFunctionOverviewARMResource - from ._models import StaticSitePatchResource - from ._models import StaticSiteResetPropertiesARMResource - from ._models import StaticSitesWorkflowPreview - from ._models import StaticSitesWorkflowPreviewRequest - from ._models import StaticSiteTemplateOptions - from ._models import StaticSiteUserARMResource - from ._models import StaticSiteUserInvitationRequestResource - from ._models import StaticSiteUserInvitationResponseResource - from ._models import StaticSiteUserProvidedFunctionApp - from ._models import StaticSiteUserProvidedFunctionAppARMResource - from ._models import StaticSiteZipDeploymentARMResource - from ._models import Status - from ._models import StatusCodesBasedTrigger - from ._models import StatusCodesRangeBasedTrigger - from ._models import StorageMigrationOptions - from ._models import StorageMigrationResponse - from ._models import StringDictionary - from ._models import StringList - from ._models import SupportTopic - from ._models import SwiftVirtualNetwork - from ._models import TldLegalAgreement - from ._models import TokenStore - from ._models import TopLevelDomain - from ._models import TopLevelDomainAgreementOption - from ._models import TriggeredJobHistory - from ._models import TriggeredJobRun - from ._models import TriggeredWebJob - from ._models import Twitter - from ._models import TwitterRegistration - from ._models import Usage - from ._models import User - from ._models import ValidateRequest - from ._models import ValidateResponse - from ._models import ValidateResponseError - from ._models import VirtualApplication - from ._models import VirtualDirectory - from ._models import VirtualIPMapping - from ._models import VirtualNetworkProfile - from ._models import VnetGateway - from ._models import VnetInfo - from ._models import VnetParameters - from ._models import VnetRoute - from ._models import VnetValidationFailureDetails - from ._models import VnetValidationTestFailure - from ._models import WebAppCollection - from ._models import WebAppMajorVersion - from ._models import WebAppMinorVersion - from ._models import WebAppRuntimes - from ._models import WebAppRuntimeSettings - from ._models import WebAppStack - from ._models import WebJob - from ._models import WebSiteInstanceStatus - from ._models import WindowsJavaContainerSettings - from ._models import WorkerAppsConfiguration - from ._models import WorkerPoolResource -from ._paged_models import AnalysisDefinitionPaged -from ._paged_models import ApiKVReferencePaged -from ._paged_models import ApplicationStackResourcePaged -from ._paged_models import AppServiceCertificateOrderPaged -from ._paged_models import AppServiceCertificateResourcePaged -from ._paged_models import AppServiceEnvironmentResourcePaged -from ._paged_models import AppServicePlanPaged -from ._paged_models import BackupItemPaged -from ._paged_models import BillingMeterPaged -from ._paged_models import CertificatePaged -from ._paged_models import ContinuousWebJobPaged -from ._paged_models import CsmOperationDescriptionPaged -from ._paged_models import CsmUsageQuotaPaged -from ._paged_models import DeletedSitePaged -from ._paged_models import DeploymentPaged -from ._paged_models import DetectorDefinitionPaged -from ._paged_models import DetectorResponsePaged -from ._paged_models import DiagnosticCategoryPaged -from ._paged_models import DomainOwnershipIdentifierPaged -from ._paged_models import DomainPaged -from ._paged_models import FunctionAppStackPaged -from ._paged_models import FunctionEnvelopePaged -from ._paged_models import GeoRegionPaged -from ._paged_models import HostNameBindingPaged -from ._paged_models import HybridConnectionPaged -from ._paged_models import IdentifierPaged -from ._paged_models import InboundEnvironmentEndpointPaged -from ._paged_models import KubeEnvironmentPaged -from ._paged_models import NameIdentifierPaged -from ._paged_models import OutboundEnvironmentEndpointPaged -from ._paged_models import PerfMonResponsePaged -from ._paged_models import PremierAddOnOfferPaged -from ._paged_models import ProcessInfoPaged -from ._paged_models import ProcessModuleInfoPaged -from ._paged_models import ProcessThreadInfoPaged -from ._paged_models import PublicCertificatePaged -from ._paged_models import RecommendationPaged -from ._paged_models import RemotePrivateEndpointConnectionARMResourcePaged -from ._paged_models import ResourceHealthMetadataPaged -from ._paged_models import ResourceMetricDefinitionPaged -from ._paged_models import SiteConfigResourcePaged -from ._paged_models import SiteConfigurationSnapshotInfoPaged -from ._paged_models import SiteExtensionInfoPaged -from ._paged_models import SitePaged -from ._paged_models import SkuInfoPaged -from ._paged_models import SlotDifferencePaged -from ._paged_models import SnapshotPaged -from ._paged_models import SourceControlPaged -from ._paged_models import StampCapacityPaged -from ._paged_models import StaticSiteARMResourcePaged -from ._paged_models import StaticSiteBuildARMResourcePaged -from ._paged_models import StaticSiteCustomDomainOverviewARMResourcePaged -from ._paged_models import StaticSiteFunctionOverviewARMResourcePaged -from ._paged_models import StaticSiteUserARMResourcePaged -from ._paged_models import StaticSiteUserProvidedFunctionAppARMResourcePaged -from ._paged_models import StrPaged -from ._paged_models import TldLegalAgreementPaged -from ._paged_models import TopLevelDomainPaged -from ._paged_models import TriggeredJobHistoryPaged -from ._paged_models import TriggeredWebJobPaged -from ._paged_models import UsagePaged -from ._paged_models import WebAppStackPaged -from ._paged_models import WebJobPaged -from ._paged_models import WebSiteInstanceStatusPaged -from ._paged_models import WorkerPoolResourcePaged -from ._web_site_management_client_enums import ( - KeyVaultSecretStatus, - CertificateProductType, - ProvisioningState, - CertificateOrderStatus, - CertificateOrderActionType, - RouteType, - InsightStatus, - RenderingType, - DetectorType, - ManagedServiceIdentityType, - IpFilterTag, - AutoHealActionType, - ConnectionStringType, - AzureStorageType, - AzureStorageState, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - SupportedTlsVersions, - FtpsState, - SslState, - HostType, - UsageState, - SiteAvailabilityState, - ClientCertMode, - RedundancyMode, - StatusOptions, - DomainStatus, - AzureResourceType, - CustomHostNameDnsRecordType, - HostNameType, - DnsType, - DomainType, - HostingEnvironmentStatus, - LoadBalancingMode, - OperationStatus, - IssueType, - SolutionType, - StackPreferredOs, - ResourceScopeType, - NotificationLevel, - Channels, - AppServicePlanRestrictions, - InAvailabilityReasonType, - CheckNameResourceTypes, - ValidateResourceTypes, - ResolveStatus, - ConfigReferenceSource, - LogLevel, - BackupItemStatus, - DatabaseType, - FrequencyUnit, - ContinuousWebJobStatus, - WebJobType, - CookieExpirationConvention, - PublishingProfileFormat, - DnsVerificationTestResult, - ClientCredentialMethod, - ForwardProxyConvention, - UnauthenticatedClientActionV2, - MSDeployLogEntryType, - MSDeployProvisioningState, - MySqlMigrationType, - PublicCertificateLocation, - BackupRestoreOperationType, - UnauthenticatedClientAction, - BuiltInAuthenticationProvider, - CloneAbilityResult, - SiteExtensionType, - TriggeredWebJobStatus, - SiteRuntimeState, - BuildStatus, - CustomDomainStatus, - TriggerTypes, - ComputeModeOptions, - WorkerSizeOptions, - StorageType, - FrontEndServiceType, - KubeEnvironmentProvisioningState, - SkuName, -) - -__all__ = [ - 'AbnormalTimePeriod', - 'Address', - 'AddressResponse', - 'AllowedAudiencesValidation', - 'AnalysisData', - 'AnalysisDefinition', - 'ApiDefinitionInfo', - 'ApiKVReference', - 'ApiManagementConfig', - 'AppInsightsWebAppStackSettings', - 'Apple', - 'AppleRegistration', - 'ApplicationLogsConfig', - 'ApplicationStack', - 'ApplicationStackResource', - 'AppLogsConfiguration', - 'AppRegistration', - 'AppServiceCertificate', - 'AppServiceCertificateOrder', - 'AppServiceCertificateOrderPatchResource', - 'AppServiceCertificatePatchResource', - 'AppServiceCertificateResource', - 'AppServiceEnvironment', - 'AppServiceEnvironmentPatchResource', - 'AppServiceEnvironmentResource', - 'AppserviceGithubToken', - 'AppserviceGithubTokenRequest', - 'AppServicePlan', - 'AppServicePlanPatchResource', - 'ArcConfiguration', - 'ArmIdWrapper', - 'AseV3NetworkingConfiguration', - 'AuthPlatform', - 'AutoHealActions', - 'AutoHealCustomAction', - 'AutoHealRules', - 'AutoHealTriggers', - 'AzureActiveDirectory', - 'AzureActiveDirectoryLogin', - 'AzureActiveDirectoryRegistration', - 'AzureActiveDirectoryValidation', - 'AzureBlobStorageApplicationLogsConfig', - 'AzureBlobStorageHttpLogsConfig', - 'AzureStaticWebApps', - 'AzureStaticWebAppsRegistration', - 'AzureStorageInfoValue', - 'AzureStoragePropertyDictionaryResource', - 'AzureTableStorageApplicationLogsConfig', - 'BackupItem', - 'BackupRequest', - 'BackupSchedule', - 'BillingMeter', - 'BlobStorageTokenStore', - 'Capability', - 'Certificate', - 'CertificateDetails', - 'CertificateEmail', - 'CertificateOrderAction', - 'CertificateOrderContact', - 'CertificatePatchResource', - 'ClientRegistration', - 'CloningInfo', - 'ConnectionStringDictionary', - 'ConnStringInfo', - 'ConnStringValueTypePair', - 'Contact', - 'ContainerCpuStatistics', - 'ContainerCpuUsage', - 'ContainerInfo', - 'ContainerMemoryStatistics', - 'ContainerNetworkInterfaceStatistics', - 'ContainerThrottlingData', - 'ContinuousWebJob', - 'CookieExpiration', - 'CorsSettings', - 'CsmMoveResourceEnvelope', - 'CsmOperationDescription', - 'CsmOperationDescriptionProperties', - 'CsmOperationDisplay', - 'CsmPublishingCredentialsPoliciesCollection', - 'CsmPublishingCredentialsPoliciesEntity', - 'CsmPublishingProfileOptions', - 'CsmSlotEntity', - 'CsmUsageQuota', - 'CustomHostnameAnalysisResult', - 'CustomOpenIdConnectProvider', - 'DatabaseBackupSetting', - 'DataProviderMetadata', - 'DataSource', - 'DataTableResponseColumn', - 'DataTableResponseObject', - 'DefaultErrorResponse', 'DefaultErrorResponseException', - 'DefaultErrorResponseError', - 'DefaultErrorResponseErrorDetailsItem', - 'DeletedAppRestoreRequest', - 'DeletedSite', - 'Deployment', - 'DeploymentLocations', - 'DetectorAbnormalTimePeriod', - 'DetectorDefinition', - 'DetectorInfo', - 'DetectorResponse', - 'DiagnosticAnalysis', - 'DiagnosticCategory', - 'DiagnosticData', - 'DiagnosticDetectorResponse', - 'DiagnosticMetricSample', - 'DiagnosticMetricSet', - 'Dimension', - 'Domain', - 'DomainAvailabilityCheckResult', - 'DomainControlCenterSsoRequest', - 'DomainOwnershipIdentifier', - 'DomainPatchResource', - 'DomainPurchaseConsent', - 'DomainRecommendationSearchParameters', - 'EnabledConfig', - 'EndpointDependency', - 'EndpointDetail', - 'ErrorEntity', - 'Experiments', - 'ExtendedLocation', - 'ExtendedLocationEnvelope', - 'Facebook', - 'FileSystemApplicationLogsConfig', - 'FileSystemHttpLogsConfig', - 'FileSystemTokenStore', - 'ForwardProxy', - 'FrontEndConfiguration', - 'FunctionAppMajorVersion', - 'FunctionAppMinorVersion', - 'FunctionAppRuntimes', - 'FunctionAppRuntimeSettings', - 'FunctionAppStack', - 'FunctionEnvelope', - 'FunctionSecrets', - 'GeoRegion', - 'GitHub', - 'GitHubActionCodeConfiguration', - 'GitHubActionConfiguration', - 'GitHubActionContainerConfiguration', - 'GitHubActionWebAppStackSettings', - 'GlobalCsmSkuDescription', - 'GlobalValidation', - 'Google', - 'HandlerMapping', - 'HostingEnvironmentDeploymentInfo', - 'HostingEnvironmentDiagnostics', - 'HostingEnvironmentProfile', - 'HostKeys', - 'HostName', - 'HostNameBinding', - 'HostNameSslState', - 'HttpLogsConfig', - 'HttpSettings', - 'HttpSettingsRoutes', - 'HybridConnection', - 'HybridConnectionKey', - 'HybridConnectionLimits', - 'Identifier', - 'IdentityProviders', - 'InboundEnvironmentEndpoint', - 'IpSecurityRestriction', - 'JwtClaimChecks', - 'KeyInfo', - 'KeyValuePairStringObject', - 'KubeEnvironment', - 'KubeEnvironmentProfile', - 'LegacyMicrosoftAccount', - 'LinuxJavaContainerSettings', - 'LocalizableString', - 'LogAnalyticsConfiguration', - 'Login', - 'LoginRoutes', - 'LoginScopes', - 'LogSpecification', - 'ManagedServiceIdentity', - 'ManagedServiceIdentityUserAssignedIdentitiesValue', - 'MetricAvailability', - 'MetricSpecification', - 'MigrateMySqlRequest', - 'MigrateMySqlStatus', - 'MSDeploy', - 'MSDeployLog', - 'MSDeployLogEntry', - 'MSDeployStatus', - 'NameIdentifier', - 'NameValuePair', - 'NetworkFeatures', - 'NetworkTrace', - 'Nonce', - 'OpenIdConnectClientCredential', - 'OpenIdConnectConfig', - 'OpenIdConnectLogin', - 'OpenIdConnectRegistration', - 'Operation', - 'OutboundEnvironmentEndpoint', - 'PerfMonResponse', - 'PerfMonSample', - 'PerfMonSet', - 'PremierAddOn', - 'PremierAddOnOffer', - 'PremierAddOnPatchResource', - 'PrivateAccess', - 'PrivateAccessSubnet', - 'PrivateAccessVirtualNetwork', - 'PrivateLinkConnectionApprovalRequestResource', - 'PrivateLinkConnectionState', - 'PrivateLinkResource', - 'PrivateLinkResourceProperties', - 'PrivateLinkResourcesWrapper', - 'ProcessInfo', - 'ProcessModuleInfo', - 'ProcessThreadInfo', - 'ProxyOnlyResource', - 'PublicCertificate', - 'PushSettings', - 'QueryUtterancesResult', - 'QueryUtterancesResults', - 'RampUpRule', - 'Recommendation', - 'RecommendationRule', - 'ReissueCertificateOrderRequest', - 'RelayServiceConnectionEntity', - 'RemotePrivateEndpointConnectionARMResource', - 'Rendering', - 'RenewCertificateOrderRequest', - 'RequestsBasedTrigger', - 'Resource', - 'ResourceHealthMetadata', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'ResourceNameAvailability', - 'ResourceNameAvailabilityRequest', - 'ResponseMetaData', - 'RestoreRequest', - 'SampleUtterance', - 'ServiceSpecification', - 'Site', - 'SiteAuthSettings', - 'SiteAuthSettingsV2', - 'SiteCloneability', - 'SiteCloneabilityCriterion', - 'SiteConfig', - 'SiteConfigPropertiesDictionary', - 'SiteConfigResource', - 'SiteConfigurationSnapshotInfo', - 'SiteExtensionInfo', - 'SiteLimits', - 'SiteLogsConfig', - 'SiteMachineKey', - 'SitePatchResource', - 'SitePhpErrorLogFlag', - 'SiteSeal', - 'SiteSealRequest', - 'SiteSourceControl', - 'SkuCapacity', - 'SkuDescription', - 'SkuInfo', - 'SkuInfos', - 'SlotConfigNamesResource', - 'SlotDifference', - 'SlotSwapStatus', - 'SlowRequestsBasedTrigger', - 'Snapshot', - 'SnapshotRecoverySource', - 'SnapshotRestoreRequest', - 'Solution', - 'SourceControl', - 'StackMajorVersion', - 'StackMinorVersion', - 'StampCapacity', - 'StaticSiteARMResource', - 'StaticSiteBuildARMResource', - 'StaticSiteBuildProperties', - 'StaticSiteCustomDomainOverviewARMResource', - 'StaticSiteCustomDomainRequestPropertiesARMResource', - 'StaticSiteFunctionOverviewARMResource', - 'StaticSitePatchResource', - 'StaticSiteResetPropertiesARMResource', - 'StaticSitesWorkflowPreview', - 'StaticSitesWorkflowPreviewRequest', - 'StaticSiteTemplateOptions', - 'StaticSiteUserARMResource', - 'StaticSiteUserInvitationRequestResource', - 'StaticSiteUserInvitationResponseResource', - 'StaticSiteUserProvidedFunctionApp', - 'StaticSiteUserProvidedFunctionAppARMResource', - 'StaticSiteZipDeploymentARMResource', - 'Status', - 'StatusCodesBasedTrigger', - 'StatusCodesRangeBasedTrigger', - 'StorageMigrationOptions', - 'StorageMigrationResponse', - 'StringDictionary', - 'StringList', - 'SupportTopic', - 'SwiftVirtualNetwork', - 'TldLegalAgreement', - 'TokenStore', - 'TopLevelDomain', - 'TopLevelDomainAgreementOption', - 'TriggeredJobHistory', - 'TriggeredJobRun', - 'TriggeredWebJob', - 'Twitter', - 'TwitterRegistration', - 'Usage', - 'User', - 'ValidateRequest', - 'ValidateResponse', - 'ValidateResponseError', - 'VirtualApplication', - 'VirtualDirectory', - 'VirtualIPMapping', - 'VirtualNetworkProfile', - 'VnetGateway', - 'VnetInfo', - 'VnetParameters', - 'VnetRoute', - 'VnetValidationFailureDetails', - 'VnetValidationTestFailure', - 'WebAppCollection', - 'WebAppMajorVersion', - 'WebAppMinorVersion', - 'WebAppRuntimes', - 'WebAppRuntimeSettings', - 'WebAppStack', - 'WebJob', - 'WebSiteInstanceStatus', - 'WindowsJavaContainerSettings', - 'WorkerAppsConfiguration', - 'WorkerPoolResource', - 'AppServiceCertificateOrderPaged', - 'AppServiceCertificateResourcePaged', - 'DetectorResponsePaged', - 'CsmOperationDescriptionPaged', - 'DomainPaged', - 'NameIdentifierPaged', - 'DomainOwnershipIdentifierPaged', - 'TopLevelDomainPaged', - 'TldLegalAgreementPaged', - 'CertificatePaged', - 'DeletedSitePaged', - 'DiagnosticCategoryPaged', - 'AnalysisDefinitionPaged', - 'DetectorDefinitionPaged', - 'ApplicationStackResourcePaged', - 'FunctionAppStackPaged', - 'WebAppStackPaged', - 'RecommendationPaged', - 'SourceControlPaged', - 'BillingMeterPaged', - 'GeoRegionPaged', - 'IdentifierPaged', - 'PremierAddOnOfferPaged', - 'SitePaged', - 'BackupItemPaged', - 'SiteConfigResourcePaged', - 'ApiKVReferencePaged', - 'SiteConfigurationSnapshotInfoPaged', - 'ContinuousWebJobPaged', - 'DeploymentPaged', - 'FunctionEnvelopePaged', - 'HostNameBindingPaged', - 'WebSiteInstanceStatusPaged', - 'ProcessInfoPaged', - 'ProcessModuleInfoPaged', - 'ProcessThreadInfoPaged', - 'PerfMonResponsePaged', - 'RemotePrivateEndpointConnectionARMResourcePaged', - 'PublicCertificatePaged', - 'SiteExtensionInfoPaged', - 'SlotDifferencePaged', - 'SnapshotPaged', - 'TriggeredWebJobPaged', - 'TriggeredJobHistoryPaged', - 'CsmUsageQuotaPaged', - 'WebJobPaged', - 'StaticSiteARMResourcePaged', - 'StaticSiteUserARMResourcePaged', - 'StaticSiteBuildARMResourcePaged', - 'StaticSiteFunctionOverviewARMResourcePaged', - 'StaticSiteUserProvidedFunctionAppARMResourcePaged', - 'StaticSiteCustomDomainOverviewARMResourcePaged', - 'AppServiceEnvironmentResourcePaged', - 'StampCapacityPaged', - 'InboundEnvironmentEndpointPaged', - 'WorkerPoolResourcePaged', - 'ResourceMetricDefinitionPaged', - 'SkuInfoPaged', - 'UsagePaged', - 'OutboundEnvironmentEndpointPaged', - 'AppServicePlanPaged', - 'StrPaged', - 'HybridConnectionPaged', - 'ResourceHealthMetadataPaged', - 'KubeEnvironmentPaged', - 'KeyVaultSecretStatus', - 'CertificateProductType', - 'ProvisioningState', - 'CertificateOrderStatus', - 'CertificateOrderActionType', - 'RouteType', - 'InsightStatus', - 'RenderingType', - 'DetectorType', - 'ManagedServiceIdentityType', - 'IpFilterTag', - 'AutoHealActionType', - 'ConnectionStringType', - 'AzureStorageType', - 'AzureStorageState', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'SupportedTlsVersions', - 'FtpsState', - 'SslState', - 'HostType', - 'UsageState', - 'SiteAvailabilityState', - 'ClientCertMode', - 'RedundancyMode', - 'StatusOptions', - 'DomainStatus', - 'AzureResourceType', - 'CustomHostNameDnsRecordType', - 'HostNameType', - 'DnsType', - 'DomainType', - 'HostingEnvironmentStatus', - 'LoadBalancingMode', - 'OperationStatus', - 'IssueType', - 'SolutionType', - 'StackPreferredOs', - 'ResourceScopeType', - 'NotificationLevel', - 'Channels', - 'AppServicePlanRestrictions', - 'InAvailabilityReasonType', - 'CheckNameResourceTypes', - 'ValidateResourceTypes', - 'ResolveStatus', - 'ConfigReferenceSource', - 'LogLevel', - 'BackupItemStatus', - 'DatabaseType', - 'FrequencyUnit', - 'ContinuousWebJobStatus', - 'WebJobType', - 'CookieExpirationConvention', - 'PublishingProfileFormat', - 'DnsVerificationTestResult', - 'ClientCredentialMethod', - 'ForwardProxyConvention', - 'UnauthenticatedClientActionV2', - 'MSDeployLogEntryType', - 'MSDeployProvisioningState', - 'MySqlMigrationType', - 'PublicCertificateLocation', - 'BackupRestoreOperationType', - 'UnauthenticatedClientAction', - 'BuiltInAuthenticationProvider', - 'CloneAbilityResult', - 'SiteExtensionType', - 'TriggeredWebJobStatus', - 'SiteRuntimeState', - 'BuildStatus', - 'CustomDomainStatus', - 'TriggerTypes', - 'ComputeModeOptions', - 'WorkerSizeOptions', - 'StorageType', - 'FrontEndServiceType', - 'KubeEnvironmentProvisioningState', - 'SkuName', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py deleted file mode 100644 index ebeaff920c5..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models.py +++ /dev/null @@ -1,16890 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: 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(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.get('address1', None) - self.address2 = kwargs.get('address2', None) - self.city = kwargs.get('city', None) - self.country = kwargs.get('country', None) - self.postal_code = kwargs.get('postal_code', None) - self.state = kwargs.get('state', None) - - -class ProxyOnlyResource(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(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(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: - :type identity_type: - ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity - :param details: - :type details: str - :param source: Possible values include: 'KeyVault' - :type source: str or - ~azure.mgmt.web.v2020_12_01.models.ConfigReferenceSource - :param active_version: - :type active_version: 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'}, - 'reference': {'key': 'properties.reference', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'ResolveStatus'}, - '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': 'ConfigReferenceSource'}, - 'active_version': {'key': 'properties.activeVersion', 'type': 'str'}, - } - - 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.source = kwargs.get('source', None) - self.active_version = kwargs.get('active_version', None) - - -class ApiManagementConfig(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(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: true if remote Application Insights is - supported for the stack; otherwise, false. - :vartype is_supported: bool - :ivar is_default_off: true if Application Insights is - disabled by default for the stack; otherwise, 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(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(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: true if this is the stack is - deprecated; otherwise, 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 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 application_stack_resource_name: Application stack name. - :type application_stack_resource_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: true if this is the stack is - deprecated; otherwise, 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'}, - 'application_stack_resource_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.application_stack_resource_name = kwargs.get('application_stack_resource_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 AppLogsConfiguration(Model): - """AppLogsConfiguration. - - :param destination: - :type destination: str - :param log_analytics_configuration: - :type log_analytics_configuration: - ~azure.mgmt.web.v2020_12_01.models.LogAnalyticsConfiguration - """ - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'str'}, - 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, - } - - def __init__(self, **kwargs): - super(AppLogsConfiguration, self).__init__(**kwargs) - self.destination = kwargs.get('destination', None) - self.log_analytics_configuration = kwargs.get('log_analytics_configuration', 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(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': 'KeyVaultSecretStatus'}, - } - - 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 Resource(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: 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.get('location', None) - 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: 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). Default value: 1 - . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_12_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: 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}, - 'product_type': {'required': 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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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 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. - - 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 - :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). Default value: 1 - . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_12_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: 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}, - 'product_type': {'required': 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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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': 'KeyVaultSecretStatus'}, - } - - 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: 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': 'KeyVaultSecretStatus'}, - } - - 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(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: true if the App Service Environment is - suspended; otherwise, 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': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - '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.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 AppServiceEnvironmentPatchResource(ProxyOnlyResource): - """ARM resource for a 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 id: Resource Id. - :vartype 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: 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: true if the App Service Environment is - suspended; otherwise, 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}, - '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 = { - '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': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - '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: 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: 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: true if the App Service Environment is - suspended; otherwise, 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}, - '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 = { - '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': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - '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(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(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.get('code', None) - self.state = kwargs.get('state', None) - - -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: Resource tags. - :type tags: dict[str, 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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - :param sku: - :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription - :param extended_location: Extended location Envelope - :type extended_location: - ~azure.mgmt.web.v2020_12_01.models.ExtendedLocationEnvelope - """ - - _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}'}, - 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocationEnvelope'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(AppServicePlan, 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) - self.extended_location = kwargs.get('extended_location', None) - self.sku = kwargs.get('sku', 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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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': 'StatusOptions'}, - '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': 'ProvisioningState'}, - '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 ArcConfiguration(Model): - """ArcConfiguration. - - :param artifacts_storage_type: Possible values include: 'LocalNode', - 'NetworkFileSystem' - :type artifacts_storage_type: str or - ~azure.mgmt.web.v2020_12_01.models.StorageType - :param artifact_storage_class_name: - :type artifact_storage_class_name: str - :param artifact_storage_mount_path: - :type artifact_storage_mount_path: str - :param artifact_storage_node_name: - :type artifact_storage_node_name: str - :param artifact_storage_access_mode: - :type artifact_storage_access_mode: str - :param front_end_service_configuration: - :type front_end_service_configuration: - ~azure.mgmt.web.v2020_12_01.models.FrontEndConfiguration - :param kube_config: - :type kube_config: str - """ - - _attribute_map = { - 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, - 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, - 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, - 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, - 'artifact_storage_access_mode': {'key': 'artifactStorageAccessMode', 'type': 'str'}, - 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArcConfiguration, self).__init__(**kwargs) - self.artifacts_storage_type = kwargs.get('artifacts_storage_type', None) - self.artifact_storage_class_name = kwargs.get('artifact_storage_class_name', None) - self.artifact_storage_mount_path = kwargs.get('artifact_storage_mount_path', None) - self.artifact_storage_node_name = kwargs.get('artifact_storage_node_name', None) - self.artifact_storage_access_mode = kwargs.get('artifact_storage_access_mode', None) - self.front_end_service_configuration = kwargs.get('front_end_service_configuration', None) - self.kube_config = kwargs.get('kube_config', None) - - -class ArmIdWrapper(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(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': 'AutoHealActionType'}, - '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(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(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(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(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': 'LogLevel'}, - '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(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(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': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - 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(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': 'LogLevel'}, - '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.get('sas_url', None) - - -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 backup_item_name: Name of this backup. - :vartype backup_item_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 - :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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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.backup_item_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 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. - - 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 - :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: Required. 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}, - 'storage_account_url': {'required': 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(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). Default value: 7 . - :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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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 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(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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: 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': 'KeyVaultSecretStatus'}, - '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 CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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 - """ - - _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 - """ - - _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': 'CertificateOrderActionType'}, - '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(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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: 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': 'KeyVaultSecretStatus'}, - '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(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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.get('source_web_app_id', None) - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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(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': 'ConnectionStringType'}, - } - - 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(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': 'ConnectionStringType'}, - } - - def __init__(self, **kwargs): - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) - - -class Contact(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.get('email', None) - self.fax = kwargs.get('fax', None) - self.job_title = kwargs.get('job_title', None) - self.name_first = kwargs.get('name_first', None) - self.name_last = kwargs.get('name_last', None) - self.name_middle = kwargs.get('name_middle', None) - self.organization = kwargs.get('organization', None) - self.phone = kwargs.get('phone', None) - - -class ContainerCpuStatistics(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(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(Model): - """ContainerInfo. - - :param current_time_stamp: - :type current_time_stamp: datetime - :param previous_time_stamp: - :type previous_time_stamp: 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(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(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(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': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - '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 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': 'CookieExpirationConvention'}, - '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(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(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 CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2020_12_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :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(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :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(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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param ftp: Required. Whether FTP is allowed. - :type ftp: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - :param scm: Required. 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}, - 'ftp': {'required': True}, - 'scm': {'required': 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param allow: Required. true to allow access to a publishing - method; otherwise, false. - :type allow: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allow': {'required': 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(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(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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.get('target_slot', None) - self.preserve_vnet = kwargs.get('preserve_vnet', None) - - -class CsmUsageQuota(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 - :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 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: true if hostname is - already verified; otherwise, 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: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_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_cname_records = kwargs.get('alternate_cname_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(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.get('database_type', None) - 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(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(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(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(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(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 DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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(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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_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.deleted_site_kind = None - self.geo_region_name = 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 - :param end_time: End time. - :type end_time: 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 DeploymentLocations(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(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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': 'IssueType'}, - '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(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': 'DetectorType'}, - '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 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 - :param end_time: End time of the period - :type end_time: 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 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 DiagnosticData(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 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 - :param end_time: End time of the period - :type end_time: 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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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(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 - :param end_time: End time of the period - :type end_time: 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(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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_tech: Required. 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: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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: Required. 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] - :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}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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': 'DomainType'}, - } - - 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 DomainControlCenterSsoRequest(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 DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_tech: Required. 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: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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: Required. 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] - :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}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - '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(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 - 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 - """ - - _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(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(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(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(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(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(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 ExtendedLocationEnvelope(Model): - """ExtendedLocationEnvelope. - - :ivar name: Resource Name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedLocationEnvelope, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class ExtendedLocation(Model): - """ExtendedLocation. - - :param custom_location: - :type custom_location: str - """ - - _attribute_map = { - 'custom_location': {'key': 'customLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedLocation, self).__init__(**kwargs) - self.custom_location = kwargs.get('custom_location', 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(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, **kwargs): - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = kwargs.get('level', "Off") - - -class FileSystemHttpLogsConfig(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': 'ForwardProxyConvention'}, - '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 FrontEndConfiguration(Model): - """FrontEndConfiguration. - - :param kind: Possible values include: 'NodePort', 'LoadBalancer' - :type kind: str or ~azure.mgmt.web.v2020_12_01.models.FrontEndServiceType - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, - } - - def __init__(self, **kwargs): - super(FrontEndConfiguration, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - - -class FunctionAppMajorVersion(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(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(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(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: true if remote debugging is - supported for the stack; otherwise, 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: true if the stack is in preview; otherwise, - false. - :vartype is_preview: bool - :ivar is_deprecated: true if the stack is deprecated; - otherwise, false. - :vartype is_deprecated: bool - :ivar is_hidden: true if the stack should be hidden; - otherwise, false. - :vartype is_hidden: bool - :ivar end_of_life_date: End-of-life date for the minor version. - :vartype end_of_life_date: datetime - :ivar is_auto_update: true if the stack version is - auto-updated; otherwise, false. - :vartype is_auto_update: bool - :ivar is_early_access: true if the minor version is - early-access; otherwise, false. - :vartype is_early_access: bool - :ivar is_default: true if the minor version the default; - otherwise, 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': 'StackPreferredOs'}, - } - - 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 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 FunctionSecrets(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 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(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(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(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(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: true if GitHub Actions is supported for - the stack; otherwise, 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(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': 'UnauthenticatedClientActionV2'}, - '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(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(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(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(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(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(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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - 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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - '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 HostNameSslState(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 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': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - 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(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 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 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: - :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(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 IpSecurityRestriction(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(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(Model): - """KeyValuePairStringObject. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar key: - :vartype key: str - :ivar value: - :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 KubeEnvironment(Resource): - """A Kubernetes cluster specialized for web workloads by Azure App Service. - - 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: Resource tags. - :type tags: dict[str, str] - :param kube_environment_type: Type of the Kubernetes Environment. - Only Set for WorkerApps as Managed - :type kube_environment_type: str - :param extended_location: - :type extended_location: - ~azure.mgmt.web.v2020_12_01.models.ExtendedLocation - :ivar provisioning_state: Provisioning state of the Kubernetes - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Waiting', 'InitializationInProgress', 'InfrastructureSetupInProgress', - 'InfrastructureSetupComplete', 'ScheduledForDelete', 'UpgradeRequested', - 'UpgradeFailed', 'AKSProvisionComplete' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProvisioningState - :ivar deployment_errors: Any errors that occurred during deployment or - deployment validation - :vartype deployment_errors: str - :param internal_load_balancer_enabled: Only visible within Vnet/Subnet - :type internal_load_balancer_enabled: bool - :ivar default_domain: Default Domain Name for the cluster - :vartype default_domain: str - :param static_ip: Static IP of the KubeEnvironment - :type static_ip: str - :param arc_configuration: Cluster configuration which determines the ARC - cluster - components types. Eg: Choosing between BuildService kind, - FrontEnd Service ArtifactsStorageType etc. - :type arc_configuration: - ~azure.mgmt.web.v2020_12_01.models.ArcConfiguration - :param app_logs_configuration: Cluster configuration which enables the log - daemon to export - app logs to a destination. Currently only "log-analytics" is - supported - :type app_logs_configuration: - ~azure.mgmt.web.v2020_12_01.models.AppLogsConfiguration - :param worker_apps_configuration: Cluster configuration which enables - users to create Worker Apps - enabled dedicated Kube Environments - :type worker_apps_configuration: - ~azure.mgmt.web.v2020_12_01.models.WorkerAppsConfiguration - :param aks_resource_id: - :type aks_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'deployment_errors': {'readonly': True}, - 'default_domain': {'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}'}, - 'kube_environment_type': {'key': 'properties.type', 'type': 'str'}, - 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KubeEnvironmentProvisioningState'}, - 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, - 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, - 'default_domain': {'key': 'properties.defaultDomain', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, - 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, - 'app_logs_configuration': {'key': 'properties.appLogsConfiguration', 'type': 'AppLogsConfiguration'}, - 'worker_apps_configuration': {'key': 'properties.workerAppsConfiguration', 'type': 'WorkerAppsConfiguration'}, - 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KubeEnvironment, self).__init__(**kwargs) - self.kube_environment_type = kwargs.get('kube_environment_type', None) - self.extended_location = kwargs.get('extended_location', None) - self.provisioning_state = None - self.deployment_errors = None - self.internal_load_balancer_enabled = kwargs.get('internal_load_balancer_enabled', None) - self.default_domain = None - self.static_ip = kwargs.get('static_ip', None) - self.arc_configuration = kwargs.get('arc_configuration', None) - self.app_logs_configuration = kwargs.get('app_logs_configuration', None) - self.worker_apps_configuration = kwargs.get('worker_apps_configuration', None) - self.aks_resource_id = kwargs.get('aks_resource_id', None) - - -class KubeEnvironmentProfile(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(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: true if the stack is in preview; otherwise, - false. - :vartype is_preview: bool - :ivar is_deprecated: true if the stack is deprecated; - otherwise, false. - :vartype is_deprecated: bool - :ivar is_hidden: true if the stack should be hidden; - otherwise, false. - :vartype is_hidden: bool - :ivar end_of_life_date: End-of-life date for the minor version. - :vartype end_of_life_date: datetime - :ivar is_auto_update: true if the stack version is - auto-updated; otherwise, false. - :vartype is_auto_update: bool - :ivar is_early_access: true if the minor version is - early-access; otherwise, 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(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 LogAnalyticsConfiguration(Model): - """LogAnalyticsConfiguration. - - :param customer_id: - :type customer_id: str - :param shared_key: - :type shared_key: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'shared_key': {'key': 'sharedKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogAnalyticsConfiguration, self).__init__(**kwargs) - self.customer_id = kwargs.get('customer_id', None) - self.shared_key = kwargs.get('shared_key', 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(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(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.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - 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 ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailability(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(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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. 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}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - 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': 'OperationStatus'}, - '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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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(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 - :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': 'MSDeployLogEntryType'}, - '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 - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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(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 NameValuePair(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(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 - :param method: Possible values include: 'ClientSecretPost' - :type method: str or - ~azure.mgmt.web.v2020_12_01.models.ClientCredentialMethod - :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'}, - 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, - 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OpenIdConnectClientCredential, self).__init__(**kwargs) - self.method = kwargs.get('method', None) - 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(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 - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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(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 PerfMonResponse(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(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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(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 - :param end_time: End time of the period. - :type end_time: 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: 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: true if promotion code is - required; otherwise, 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': 'AppServicePlanRestrictions'}, - '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 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(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(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 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: - :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(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(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.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.properties = kwargs.get('properties', None) - - -class PrivateLinkResourceProperties(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(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.get('value', None) - - -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 - :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 - :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 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 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 - :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 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': 'PublicCertificateLocation'}, - '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 PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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(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(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(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - \\nMinReroutePercentage or - MaxReroutePercentage. Site metrics are checked every N - minutes specified in ChangeIntervalInMinutes.\\nCustom - decision algorithm - can be provided in TiPCallback site extension which URL can be specified - in 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 - :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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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 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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: - :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(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': 'RenderingType'}, - '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(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 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 ResourceMetricAvailability(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 ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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(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.get('name', None) - self.type = kwargs.get('type', None) - self.is_fqdn = kwargs.get('is_fqdn', None) - - -class ResponseMetaData(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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - '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(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(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: Resource tags. - :type tags: dict[str, str] - :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: true if the app is enabled; otherwise, - 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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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: true if the app is a default - container; otherwise, 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 - :param identity: - :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity - :param extended_location: Extended location Envelope - :type extended_location: - ~azure.mgmt.web.v2020_12_01.models.ExtendedLocationEnvelope - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocationEnvelope'}, - } - - def __init__(self, **kwargs): - super(Site, self).__init__(**kwargs) - 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) - self.identity = kwargs.get('identity', None) - self.extended_location = kwargs.get('extended_location', 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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested - as part of GitHub Login authentication. - This setting is optional - :type git_hub_oauth_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_oauth_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_oauth_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': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes = kwargs.get('google_oauth_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_oauth_scopes = kwargs.get('facebook_oauth_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_oauth_scopes = kwargs.get('git_hub_oauth_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_oauth_scopes = kwargs.get('microsoft_account_oauth_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(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': 'CloneAbilityResult'}, - '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(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(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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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: true if Auto Heal is enabled; - otherwise, 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: true to enable local MySQL; - otherwise, false. Default value: 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. Default value: True . - :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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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(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: true if use32BitWorkerProcess - should be set to true for the stack; otherwise, 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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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: true if Auto Heal is enabled; - otherwise, 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: true to enable local MySQL; - otherwise, false. Default value: 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. Default value: True . - :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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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 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 - :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 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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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': 'SiteExtensionType'}, - '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 SiteLimits(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(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 - :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: true if the app is enabled; otherwise, - 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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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: true if the app is a default - container; otherwise, 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 - :param identity: - :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity - """ - - _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'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(SitePatchResource, self).__init__(**kwargs) - 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) - self.identity = kwargs.get('identity', 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(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.get('html', None) - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param is_git_hub_action: true if this is deployed via GitHub - action. - :type is_git_hub_action: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - 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(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(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(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 SkuInfos(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 SlotSwapStatus(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 - :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(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 SnapshotRecoverySource(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. - - 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 - :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: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': 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(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': 'SolutionType'}, - '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 - """ - - _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 StackMajorVersion(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: true if this is the default major version; - otherwise, 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: true if this supports - Application Insights; otherwise, false. - :type application_insights: bool - :param app_settings_dictionary: - - - 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: - - - Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to - 0 - :type site_config_properties_dictionary: dict[str, object] - :param is_preview: true if this stack is in Preview, - otherwise false. - :type is_preview: bool - :param is_deprecated: true if this stack has been deprecated, - otherwise false. - :type is_deprecated: bool - :param is_hidden: true if this stack should be hidden for new - customers on portal, otherwise 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(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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(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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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 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: Resource tags. - :type tags: dict[str, 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] - :param sku: - :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription - :param identity: - :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, **kwargs): - super(StaticSiteARMResource, 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 - self.sku = kwargs.get('sku', None) - self.identity = kwargs.get('identity', 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 - :ivar last_updated_on: When this build was updated. - :vartype last_updated_on: 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 StaticSiteBuildProperties(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 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 - :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 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. - Default value: "cname-delegation" . - :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 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(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 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 - :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 - """ - - _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 - """ - - _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 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(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': 'InsightStatus'}, - } - - 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(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(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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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(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(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.get('agreement_key', None) - self.title = kwargs.get('title', None) - self.content = kwargs.get('content', None) - self.url = kwargs.get('url', 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 true, then the top level domain supports - domain privacy; otherwise, 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(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - 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 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 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 - :param end_time: End time. - :type end_time: 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': 'TriggeredWebJobStatus'}, - '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': 'WebJobType'}, - '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 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 - :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': 'ComputeModeOptions'}, - '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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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(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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: 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.get('name', None) - self.type = kwargs.get('type', None) - self.location = kwargs.get('location', None) - 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(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(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(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: true if preloading is enabled; - otherwise, 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(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(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(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.get('id', None) - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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: true if a resync is required; - otherwise, 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(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.get('value', None) - self.next_link = None - - -class WebAppMajorVersion(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(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(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(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: true if remote debugging is - supported for the stack; otherwise, 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: true if the stack is in preview; otherwise, - false. - :vartype is_preview: bool - :ivar is_deprecated: true if the stack is deprecated; - otherwise, false. - :vartype is_deprecated: bool - :ivar is_hidden: true if the stack should be hidden; - otherwise, false. - :vartype is_hidden: bool - :ivar end_of_life_date: End-of-life date for the minor version. - :vartype end_of_life_date: datetime - :ivar is_auto_update: true if the stack version is - auto-updated; otherwise, false. - :vartype is_auto_update: bool - :ivar is_early_access: true if the minor version is - early-access; otherwise, 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': 'StackPreferredOs'}, - } - - 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 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': 'WebJobType'}, - '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 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: - :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': 'SiteRuntimeState'}, - '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(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: true if the stack is in preview; otherwise, - false. - :vartype is_preview: bool - :ivar is_deprecated: true if the stack is deprecated; - otherwise, false. - :vartype is_deprecated: bool - :ivar is_hidden: true if the stack should be hidden; - otherwise, false. - :vartype is_hidden: bool - :ivar end_of_life_date: End-of-life date for the minor version. - :vartype end_of_life_date: datetime - :ivar is_auto_update: true if the stack version is - auto-updated; otherwise, false. - :vartype is_auto_update: bool - :ivar is_early_access: true if the minor version is - early-access; otherwise, 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 WorkerAppsConfiguration(Model): - """Configuration required deploy Kube Environment Dedicated - to Worker Apps. - Create request is not accepted, if ArcConfiguration or AksResourceId is - provided - with WorkerAppsConfiguration. - - :param subnet_resource_id: Service Principle Secret used to provision - WorkerApps Kube Environment - VnetResource - :type subnet_resource_id: str - """ - - _attribute_map = { - 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkerAppsConfiguration, self).__init__(**kwargs) - self.subnet_resource_id = kwargs.get('subnet_resource_id', 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 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] - :param sku: - :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, **kwargs): - super(WorkerPoolResource, self).__init__(**kwargs) - 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 - self.sku = kwargs.get('sku', None) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py deleted file mode 100644 index 5b491f73771..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_models_py3.py +++ /dev/null @@ -1,16890 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AbnormalTimePeriod(Model): - """Class representing Abnormal Time Period identified in diagnosis. - - :param start_time: Start time of the downtime - :type start_time: datetime - :param end_time: End time of the downtime - :type end_time: 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=None, end_time=None, events=None, solutions=None, **kwargs) -> None: - super(AbnormalTimePeriod, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.events = events - self.solutions = solutions - - -class Address(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: str=None, **kwargs) -> None: - 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(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: str=None, **kwargs) -> None: - 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: str=None, service_ip_address: str=None, internal_ip_address: str=None, outbound_ip_addresses=None, vip_mappings=None, **kwargs) -> None: - 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: str=None, allowed_audiences=None, **kwargs) -> None: - super(AllowedAudiencesValidation, self).__init__(kind=kind, **kwargs) - self.allowed_audiences = allowed_audiences - - -class AnalysisData(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: str=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) - self.description = None - - -class ApiDefinitionInfo(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: str=None, **kwargs) -> None: - 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: - :type identity_type: - ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity - :param details: - :type details: str - :param source: Possible values include: 'KeyVault' - :type source: str or - ~azure.mgmt.web.v2020_12_01.models.ConfigReferenceSource - :param active_version: - :type active_version: 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'}, - 'reference': {'key': 'properties.reference', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'ResolveStatus'}, - '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': 'ConfigReferenceSource'}, - 'active_version': {'key': 'properties.activeVersion', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, reference: str=None, status=None, vault_name: str=None, secret_name: str=None, secret_version: str=None, identity_type=None, details: str=None, source=None, active_version: str=None, **kwargs) -> None: - 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.source = source - self.active_version = active_version - - -class ApiManagementConfig(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: str=None, **kwargs) -> None: - super(ApiManagementConfig, self).__init__(**kwargs) - self.id = id - - -class AppInsightsWebAppStackSettings(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: true if remote Application Insights is - supported for the stack; otherwise, false. - :vartype is_supported: bool - :ivar is_default_off: true if Application Insights is - disabled by default for the stack; otherwise, 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) -> None: - 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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: - 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: str=None, client_id: str=None, client_secret_setting_name: str=None, **kwargs) -> None: - super(AppleRegistration, self).__init__(kind=kind, **kwargs) - self.client_id = client_id - self.client_secret_setting_name = client_secret_setting_name - - -class ApplicationLogsConfig(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=None, azure_table_storage=None, azure_blob_storage=None, **kwargs) -> None: - 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(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: true if this is the stack is - deprecated; otherwise, 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: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, is_deprecated=None, **kwargs) -> None: - 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 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 application_stack_resource_name: Application stack name. - :type application_stack_resource_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: true if this is the stack is - deprecated; otherwise, 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'}, - 'application_stack_resource_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: str=None, application_stack_resource_name: str=None, display: str=None, dependency: str=None, major_versions=None, frameworks=None, is_deprecated=None, **kwargs) -> None: - super(ApplicationStackResource, self).__init__(kind=kind, **kwargs) - self.application_stack_resource_name = application_stack_resource_name - self.display = display - self.dependency = dependency - self.major_versions = major_versions - self.frameworks = frameworks - self.is_deprecated = is_deprecated - - -class AppLogsConfiguration(Model): - """AppLogsConfiguration. - - :param destination: - :type destination: str - :param log_analytics_configuration: - :type log_analytics_configuration: - ~azure.mgmt.web.v2020_12_01.models.LogAnalyticsConfiguration - """ - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'str'}, - 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, - } - - def __init__(self, *, destination: str=None, log_analytics_configuration=None, **kwargs) -> None: - super(AppLogsConfiguration, self).__init__(**kwargs) - self.destination = destination - self.log_analytics_configuration = log_analytics_configuration - - -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: str=None, app_id: str=None, app_secret_setting_name: str=None, **kwargs) -> None: - super(AppRegistration, self).__init__(kind=kind, **kwargs) - self.app_id = app_id - self.app_secret_setting_name = app_secret_setting_name - - -class AppServiceCertificate(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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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 Resource(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: 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: str=None, tags=None, **kwargs) -> None: - 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: 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). Default value: 1 - . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_12_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: 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}, - 'product_type': {'required': 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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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, product_type, kind: str=None, tags=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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 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. - - 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 - :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). Default value: 1 - . - :type validity_in_years: int - :param key_size: Certificate key size. Default value: 2048 . - :type key_size: int - :param product_type: Required. Certificate product type. Possible values - include: 'StandardDomainValidatedSsl', - 'StandardDomainValidatedWildCardSsl' - :type product_type: str or - ~azure.mgmt.web.v2020_12_01.models.CertificateProductType - :param auto_renew: true if the certificate should be - automatically renewed when it expires; otherwise, false. - Default value: True . - :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 - :ivar expiration_time: Certificate expiration time. - :vartype expiration_time: datetime - :ivar is_private_key_external: true if private key is - external; otherwise, 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] - :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would - be auto renewed next - :vartype next_auto_renewal_time_stamp: 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}, - 'product_type': {'required': 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': 'CertificateProductType'}, - 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'CertificateOrderStatus'}, - '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, *, product_type, kind: str=None, certificates=None, distinguished_name: str=None, validity_in_years: int=1, key_size: int=2048, auto_renew: bool=True, csr: str=None, **kwargs) -> None: - 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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, kind: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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: 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': 'KeyVaultSecretStatus'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, key_vault_id: str=None, key_vault_secret_name: str=None, **kwargs) -> None: - 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(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: true if the App Service Environment is - suspended; otherwise, 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': 'ProvisioningState'}, - 'status': {'key': 'status', 'type': 'HostingEnvironmentStatus'}, - '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, internal_load_balancing_mode=None, multi_size: str=None, ipssl_address_count: int=None, dns_suffix: str=None, front_end_scale_factor: int=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: - 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 AppServiceEnvironmentPatchResource(ProxyOnlyResource): - """ARM resource for a 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 id: Resource Id. - :vartype 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: 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: true if the App Service Environment is - suspended; otherwise, 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}, - '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 = { - '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': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - '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, *, virtual_network, kind: str=None, internal_load_balancing_mode=None, multi_size: str=None, ipssl_address_count: int=None, dns_suffix: str=None, front_end_scale_factor: int=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: - 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: 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: 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: true if the App Service Environment is - suspended; otherwise, 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}, - '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 = { - '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': 'ProvisioningState'}, - 'status': {'key': 'properties.status', 'type': 'HostingEnvironmentStatus'}, - '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, virtual_network, kind: str=None, tags=None, internal_load_balancing_mode=None, multi_size: str=None, ipssl_address_count: int=None, dns_suffix: str=None, front_end_scale_factor: int=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: - 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(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: str=None, scope: str=None, token_type: str=None, got_token: bool=None, error_message: str=None, **kwargs) -> None: - 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(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) -> None: - 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: Resource tags. - :type tags: dict[str, 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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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 - :param sku: - :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription - :param extended_location: Extended location Envelope - :type extended_location: - ~azure.mgmt.web.v2020_12_01.models.ExtendedLocationEnvelope - """ - - _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'}, - 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocationEnvelope'} - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, extended_location=None, sku=None, **kwargs) -> None: - super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **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 - self.extended_location = extended_location - self.sku = sku - - -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 true, apps assigned to this App - Service plan can be scaled independently. - If false, apps assigned to this App Service plan will scale - to all instances of the plan. Default value: False . - :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 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 - :param free_offer_expiration_time: The time when the server farm free - offer expires. - :type free_offer_expiration_time: datetime - :ivar resource_group: Resource group of the App Service plan. - :vartype resource_group: str - :param reserved: If Linux app service plan true, - false otherwise. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: If Hyper-V container app service plan - true, false otherwise. Default value: False . - :type is_xenon: bool - :param hyper_v: If Hyper-V container app service plan true, - false otherwise. Default value: False . - :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': 'StatusOptions'}, - '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': 'ProvisioningState'}, - 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, - } - - def __init__(self, *, kind: str=None, worker_tier_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, kube_environment_profile=None, **kwargs) -> None: - 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 ArcConfiguration(Model): - """ArcConfiguration. - - :param artifacts_storage_type: Possible values include: 'LocalNode', - 'NetworkFileSystem' - :type artifacts_storage_type: str or - ~azure.mgmt.web.v2020_12_01.models.StorageType - :param artifact_storage_class_name: - :type artifact_storage_class_name: str - :param artifact_storage_mount_path: - :type artifact_storage_mount_path: str - :param artifact_storage_node_name: - :type artifact_storage_node_name: str - :param artifact_storage_access_mode: - :type artifact_storage_access_mode: str - :param front_end_service_configuration: - :type front_end_service_configuration: - ~azure.mgmt.web.v2020_12_01.models.FrontEndConfiguration - :param kube_config: - :type kube_config: str - """ - - _attribute_map = { - 'artifacts_storage_type': {'key': 'artifactsStorageType', 'type': 'StorageType'}, - 'artifact_storage_class_name': {'key': 'artifactStorageClassName', 'type': 'str'}, - 'artifact_storage_mount_path': {'key': 'artifactStorageMountPath', 'type': 'str'}, - 'artifact_storage_node_name': {'key': 'artifactStorageNodeName', 'type': 'str'}, - 'artifact_storage_access_mode': {'key': 'artifactStorageAccessMode', 'type': 'str'}, - 'front_end_service_configuration': {'key': 'frontEndServiceConfiguration', 'type': 'FrontEndConfiguration'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - } - - def __init__(self, *, artifacts_storage_type=None, artifact_storage_class_name: str=None, artifact_storage_mount_path: str=None, artifact_storage_node_name: str=None, artifact_storage_access_mode: str=None, front_end_service_configuration=None, kube_config: str=None, **kwargs) -> None: - super(ArcConfiguration, self).__init__(**kwargs) - self.artifacts_storage_type = artifacts_storage_type - self.artifact_storage_class_name = artifact_storage_class_name - self.artifact_storage_mount_path = artifact_storage_mount_path - self.artifact_storage_node_name = artifact_storage_node_name - self.artifact_storage_access_mode = artifact_storage_access_mode - self.front_end_service_configuration = front_end_service_configuration - self.kube_config = kube_config - - -class ArmIdWrapper(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) -> None: - 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: str=None, allow_new_private_endpoint_connections: bool=None, **kwargs) -> None: - 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: str=None, enabled: bool=None, runtime_version: str=None, config_file_path: str=None, **kwargs) -> None: - super(AuthPlatform, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.runtime_version = runtime_version - self.config_file_path = config_file_path - - -class AutoHealActions(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': 'AutoHealActionType'}, - 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, - 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, - } - - def __init__(self, *, action_type=None, custom_action=None, min_process_execution_time: str=None, **kwargs) -> None: - 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(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: str=None, parameters: str=None, **kwargs) -> None: - super(AutoHealCustomAction, self).__init__(**kwargs) - self.exe = exe - self.parameters = parameters - - -class AutoHealRules(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=None, actions=None, **kwargs) -> None: - super(AutoHealRules, self).__init__(**kwargs) - self.triggers = triggers - self.actions = actions - - -class AutoHealTriggers(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=None, private_bytes_in_kb: int=None, status_codes=None, status_codes_range=None, slow_requests=None, slow_requests_with_path=None, **kwargs) -> None: - 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: str=None, enabled: bool=None, registration=None, login=None, validation=None, is_auto_provisioned: bool=None, **kwargs) -> None: - 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: str=None, disable_www_authenticate: bool=None, login_parameters=None, **kwargs) -> None: - 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: str=None, open_id_issuer: str=None, client_id: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, **kwargs) -> None: - 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: str=None, jwt_claim_checks=None, allowed_audiences=None, **kwargs) -> None: - super(AzureActiveDirectoryValidation, self).__init__(kind=kind, **kwargs) - self.jwt_claim_checks = jwt_claim_checks - self.allowed_audiences = allowed_audiences - - -class AzureBlobStorageApplicationLogsConfig(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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, - } - - def __init__(self, *, level=None, sas_url: str=None, retention_in_days: int=None, **kwargs) -> None: - super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - self.sas_url = sas_url - self.retention_in_days = retention_in_days - - -class AzureBlobStorageHttpLogsConfig(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: str=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - 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: str=None, enabled: bool=None, registration=None, **kwargs) -> None: - 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: str=None, client_id: str=None, **kwargs) -> None: - super(AzureStaticWebAppsRegistration, self).__init__(kind=kind, **kwargs) - self.client_id = client_id - - -class AzureStorageInfoValue(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': 'AzureStorageType'}, - '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': 'AzureStorageState'}, - } - - def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None: - 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: str=None, properties=None, **kwargs) -> None: - super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class AzureTableStorageApplicationLogsConfig(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': 'LogLevel'}, - 'sas_url': {'key': 'sasUrl', 'type': 'str'}, - } - - def __init__(self, *, sas_url: str, level=None, **kwargs) -> None: - 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 backup_item_name: Name of this backup. - :vartype backup_item_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 - :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 - :ivar finished_time_stamp: Timestamp when this backup finished. - :vartype finished_time_stamp: 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}, - 'backup_item_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'}, - 'backup_item_name': {'key': 'properties.name', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'BackupItemStatus'}, - '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: str=None, **kwargs) -> None: - super(BackupItem, self).__init__(kind=kind, **kwargs) - self.backup_id = None - self.storage_account_url = None - self.blob_name = None - self.backup_item_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 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. - - 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 - :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: Required. 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}, - 'storage_account_url': {'required': 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, *, storage_account_url: str, kind: str=None, backup_name: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: - 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(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). Default value: 7 . - :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. Default value: True . - :type keep_at_least_one_backup: bool - :param retention_period_in_days: Required. After how many days backups - should be deleted. Default value: 30 . - :type retention_period_in_days: int - :param start_time: When the schedule should start working. - :type start_time: datetime - :ivar last_execution_time: Last time when this schedule was triggered. - :vartype last_execution_time: 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': 'FrequencyUnit'}, - '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="Day", keep_at_least_one_backup: bool=True, retention_period_in_days: int=30, start_time=None, **kwargs) -> None: - 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: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, multiplier: float=None, **kwargs) -> None: - 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 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: str=None, sas_url_setting_name: str=None, **kwargs) -> None: - super(BlobStorageTokenStore, self).__init__(kind=kind, **kwargs) - self.sas_url_setting_name = sas_url_setting_name - - -class Capability(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: str=None, value: str=None, reason: str=None, **kwargs) -> None: - 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: 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: 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': 'KeyVaultSecretStatus'}, - '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: str=None, tags=None, host_names=None, pfx_blob: bytearray=None, password: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, domain_validation_method: str=None, **kwargs) -> None: - 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 CertificateDetails(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 - :ivar not_after: Date Certificate is valid to. - :vartype not_after: 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) -> None: - 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 - """ - - _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: str=None, email_id: str=None, time_stamp=None, **kwargs) -> None: - 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 - """ - - _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': 'CertificateOrderActionType'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) - self.action_type = None - self.created_at = None - - -class CertificateOrderContact(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: str=None, name_first: str=None, name_last: str=None, phone: str=None, **kwargs) -> None: - 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 - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: 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': 'KeyVaultSecretStatus'}, - '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: str=None, host_names=None, pfx_blob: bytearray=None, password: str=None, key_vault_id: str=None, key_vault_secret_name: str=None, server_farm_id: str=None, canonical_name: str=None, domain_validation_method: str=None, **kwargs) -> None: - 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: str=None, client_id: str=None, client_secret_setting_name: str=None, **kwargs) -> None: - super(ClientRegistration, self).__init__(kind=kind, **kwargs) - self.client_id = client_id - self.client_secret_setting_name = client_secret_setting_name - - -class CloningInfo(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: true to overwrite destination app; - otherwise, false. - :type overwrite: bool - :param clone_custom_host_names: true to clone custom - hostnames from source app; otherwise, false. - :type clone_custom_host_names: bool - :param clone_source_control: true to clone source control - from source app; otherwise, 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: 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: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, source_web_app_location: str=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: - 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 CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -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: str=None, properties=None, **kwargs) -> None: - super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class ConnStringInfo(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': 'ConnectionStringType'}, - } - - def __init__(self, *, name: str=None, connection_string: str=None, type=None, **kwargs) -> None: - super(ConnStringInfo, self).__init__(**kwargs) - self.name = name - self.connection_string = connection_string - self.type = type - - -class ConnStringValueTypePair(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': 'ConnectionStringType'}, - } - - def __init__(self, *, value: str, type, **kwargs) -> None: - super(ConnStringValueTypePair, self).__init__(**kwargs) - self.value = value - self.type = type - - -class Contact(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=None, fax: str=None, job_title: str=None, name_middle: str=None, organization: str=None, **kwargs) -> None: - 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(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=None, system_cpu_usage: int=None, online_cpu_count: int=None, throttling_data=None, **kwargs) -> None: - 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(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: int=None, per_cpu_usage=None, kernel_mode_usage: int=None, user_mode_usage: int=None, **kwargs) -> None: - 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(Model): - """ContainerInfo. - - :param current_time_stamp: - :type current_time_stamp: datetime - :param previous_time_stamp: - :type previous_time_stamp: 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=None, previous_time_stamp=None, current_cpu_stats=None, previous_cpu_stats=None, memory_stats=None, name: str=None, id: str=None, eth0=None, **kwargs) -> None: - 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(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: int=None, max_usage: int=None, limit: int=None, **kwargs) -> None: - super(ContainerMemoryStatistics, self).__init__(**kwargs) - self.usage = usage - self.max_usage = max_usage - self.limit = limit - - -class ContainerNetworkInterfaceStatistics(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: int=None, rx_packets: int=None, rx_errors: int=None, rx_dropped: int=None, tx_bytes: int=None, tx_packets: int=None, tx_errors: int=None, tx_dropped: int=None, **kwargs) -> None: - 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(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: int=None, throttled_periods: int=None, throttled_time: int=None, **kwargs) -> None: - 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': 'ContinuousWebJobStatus'}, - '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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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': 'CookieExpirationConvention'}, - 'time_to_expiration': {'key': 'properties.timeToExpiration', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, convention=None, time_to_expiration: str=None, **kwargs) -> None: - super(CookieExpiration, self).__init__(kind=kind, **kwargs) - self.convention = convention - self.time_to_expiration = time_to_expiration - - -class CorsSettings(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=None, support_credentials: bool=None, **kwargs) -> None: - super(CorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.support_credentials = support_credentials - - -class CsmMoveResourceEnvelope(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: str=None, resources=None, **kwargs) -> None: - super(CsmMoveResourceEnvelope, self).__init__(**kwargs) - self.target_resource_group = target_resource_group - self.resources = resources - - -class CsmOperationDescription(Model): - """Description of an operation available for Microsoft.Web resource provider. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.web.v2020_12_01.models.CsmOperationDisplay - :param origin: - :type origin: str - :param properties: - :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: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(CsmOperationDescription, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class CsmOperationDescriptionProperties(Model): - """Properties available for a Microsoft.Web resource provider operation. - - :param service_specification: - :type service_specification: - ~azure.mgmt.web.v2020_12_01.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(CsmOperationDescriptionProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class CsmOperationDisplay(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: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param ftp: Required. Whether FTP is allowed. - :type ftp: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - :param scm: Required. 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}, - 'ftp': {'required': True}, - 'scm': {'required': 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, *, ftp, scm, kind: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param allow: Required. true to allow access to a publishing - method; otherwise, false. - :type allow: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allow': {'required': 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, *, allow: bool, kind: str=None, **kwargs) -> None: - super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, **kwargs) - self.allow = allow - - -class CsmPublishingProfileOptions(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=None, include_disaster_recovery_endpoints: bool=None, **kwargs) -> None: - super(CsmPublishingProfileOptions, self).__init__(**kwargs) - self.format = format - self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints - - -class CsmSlotEntity(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. true to preserve Virtual - Network to the slot during swap; otherwise, 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) -> None: - super(CsmSlotEntity, self).__init__(**kwargs) - self.target_slot = target_slot - self.preserve_vnet = preserve_vnet - - -class CsmUsageQuota(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 - :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: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - 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 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: true if hostname is - already verified; otherwise, 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: true if there is a conflict - on a scale unit; otherwise, false. - :vartype has_conflict_on_scale_unit: bool - :ivar has_conflict_across_subscription: true if there is a - conflict across subscriptions; otherwise, 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_cname_records: Alternate CName records controller can see - for this hostname. - :type alternate_cname_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': 'DnsVerificationTestResult'}, - '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_cname_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, - 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None, **kwargs) -> None: - 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_cname_records = alternate_cname_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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: - super(CustomOpenIdConnectProvider, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - - -class DatabaseBackupSetting(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, name: str=None, connection_string_name: str=None, connection_string: str=None, **kwargs) -> None: - 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(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: str=None, **kwargs) -> None: - super(DataProviderMetadata, self).__init__(**kwargs) - self.provider_name = provider_name - self.property_bag = None - - -class DataSource(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=None, data_source_uri=None, **kwargs) -> None: - super(DataSource, self).__init__(**kwargs) - self.instructions = instructions - self.data_source_uri = data_source_uri - - -class DataTableResponseColumn(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: str=None, data_type: str=None, column_type: str=None, **kwargs) -> None: - super(DataTableResponseColumn, self).__init__(**kwargs) - self.column_name = column_name - self.data_type = data_type - self.column_type = column_type - - -class DataTableResponseObject(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: str=None, columns=None, rows=None, **kwargs) -> None: - super(DataTableResponseObject, self).__init__(**kwargs) - self.table_name = table_name - self.columns = columns - self.rows = rows - - -class DefaultErrorResponse(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) -> None: - super(DefaultErrorResponse, self).__init__(**kwargs) - self.error = None - - -class DefaultErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DefaultErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DefaultErrorResponseException, self).__init__(deserialize, response, 'DefaultErrorResponse', *args) - - -class DefaultErrorResponseError(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=None, **kwargs) -> None: - super(DefaultErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = details - self.innererror = None - - -class DefaultErrorResponseErrorDetailsItem(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) -> None: - 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: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=None, **kwargs) -> None: - 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 deleted_site_kind: Kind of site that was deleted - :vartype deleted_site_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}, - 'deleted_site_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'}, - 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, - 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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.deleted_site_kind = None - self.geo_region_name = 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 - :param end_time: End time. - :type end_time: 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: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: - 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 DeploymentLocations(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=None, hosting_environments=None, hosting_environment_deployment_infos=None, **kwargs) -> None: - super(DeploymentLocations, self).__init__(**kwargs) - self.locations = locations - self.hosting_environments = hosting_environments - self.hosting_environment_deployment_infos = hosting_environment_deployment_infos - - -class DetectorAbnormalTimePeriod(Model): - """Class representing Abnormal Time Period detected. - - :param start_time: Start time of the correlated event - :type start_time: datetime - :param end_time: End time of the correlated event - :type end_time: 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': 'IssueType'}, - 'solutions': {'key': 'solutions', 'type': '[Solution]'}, - } - - def __init__(self, *, start_time=None, end_time=None, message: str=None, source: str=None, priority: float=None, meta_data=None, type=None, solutions=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(DetectorDefinition, self).__init__(kind=kind, **kwargs) - self.display_name = None - self.description = None - self.rank = None - self.is_enabled = None - - -class DetectorInfo(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': 'DetectorType'}, - 'score': {'key': 'score', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - 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: str=None, metadata=None, dataset=None, status=None, data_providers_metadata=None, suggested_utterances=None, **kwargs) -> None: - 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 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 - :param end_time: End time of the period - :type end_time: 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: str=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) - self.description = None - - -class DiagnosticData(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=None, rendering_properties=None, **kwargs) -> None: - super(DiagnosticData, self).__init__(**kwargs) - self.table = table - self.rendering_properties = rendering_properties - - -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 - :param end_time: End time of the period - :type end_time: 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: str=None, start_time=None, end_time=None, issue_detected: bool=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None, **kwargs) -> None: - 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(Model): - """Class representing Diagnostic Metric. - - :param timestamp: Time at which metric is measured - :type timestamp: 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=None, role_instance: str=None, total: float=None, maximum: float=None, minimum: float=None, is_aggregated: bool=None, **kwargs) -> None: - 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(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 - :param end_time: End time of the period - :type end_time: 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: str=None, unit: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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(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: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_tech: Required. 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: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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: Required. 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] - :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}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, location: str, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, tags=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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(Model): - """Domain availability check result. - - :param name: Name of the domain. - :type name: str - :param available: true if domain can be purchased using - CreateDomain API; otherwise, 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': 'DomainType'}, - } - - def __init__(self, *, name: str=None, available: bool=None, domain_type=None, **kwargs) -> None: - super(DomainAvailabilityCheckResult, self).__init__(**kwargs) - self.name = name - self.available = available - self.domain_type = domain_type - - -class DomainControlCenterSsoRequest(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) -> None: - 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: str=None, ownership_id: str=None, **kwargs) -> None: - super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) - self.ownership_id = ownership_id - - -class DomainPatchResource(ProxyOnlyResource): - """ARM resource for 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 - :ivar type: Resource type. - :vartype type: str - :param contact_admin: Required. Administrative contact. - :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_billing: Required. Billing contact. - :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_registrant: Required. Registrant contact. - :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact - :param contact_tech: Required. 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: true if domain privacy is enabled for this - domain; otherwise, false. - :type privacy: bool - :ivar created_time: Domain creation timestamp. - :vartype created_time: datetime - :ivar expiration_time: Domain expiration timestamp. - :vartype expiration_time: datetime - :ivar last_renewed_time: Timestamp when the domain was renewed last time. - :vartype last_renewed_time: datetime - :param auto_renew: true if the domain should be automatically - renewed; otherwise, false. Default value: True . - :type auto_renew: bool - :ivar ready_for_dns_record_management: true if Azure can - assign this domain to App Service apps; otherwise, false. - This value will be 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: Required. 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] - :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}, - 'contact_admin': {'required': True}, - 'contact_billing': {'required': True}, - 'contact_registrant': {'required': True}, - 'contact_tech': {'required': 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}, - 'consent': {'required': 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': 'DomainStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - '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': 'DnsType'}, - 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, - 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'DnsType'}, - 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, - } - - def __init__(self, *, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind: str=None, privacy: bool=None, auto_renew: bool=True, dns_type=None, dns_zone_id: str=None, target_dns_type=None, auth_code: str=None, **kwargs) -> None: - 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(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 - 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 - """ - - _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=None, agreed_by: str=None, agreed_at=None, **kwargs) -> None: - super(DomainPurchaseConsent, self).__init__(**kwargs) - self.agreement_keys = agreement_keys - self.agreed_by = agreed_by - self.agreed_at = agreed_at - - -class DomainRecommendationSearchParameters(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: str=None, max_domain_recommendations: int=None, **kwargs) -> None: - super(DomainRecommendationSearchParameters, self).__init__(**kwargs) - self.keywords = keywords - self.max_domain_recommendations = max_domain_recommendations - - -class EnabledConfig(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: bool=None, **kwargs) -> None: - super(EnabledConfig, self).__init__(**kwargs) - self.enabled = enabled - - -class EndpointDependency(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: str=None, endpoint_details=None, **kwargs) -> None: - super(EndpointDependency, self).__init__(**kwargs) - self.domain_name = domain_name - self.endpoint_details = endpoint_details - - -class EndpointDetail(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: str=None, port: int=None, latency: float=None, is_accessible: bool=None, **kwargs) -> None: - super(EndpointDetail, self).__init__(**kwargs) - self.ip_address = ip_address - self.port = port - self.latency = latency - self.is_accessible = is_accessible - - -class ErrorEntity(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: str=None, message_template: str=None, parameters=None, inner_errors=None, code: str=None, message: str=None, **kwargs) -> None: - 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(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=None, **kwargs) -> None: - super(Experiments, self).__init__(**kwargs) - self.ramp_up_rules = ramp_up_rules - - -class ExtendedLocationEnvelope(Model): - """ExtendedLocationEnvelope. - - :ivar name: Resource Name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, = - } - - def __init__(self, *, name: str, type: str, **kwargs) -> None: - super(ExtendedLocationEnvelope, self).__init__(**kwargs) - self.name = name - self.type = type - - -class ExtendedLocation(Model): - """ExtendedLocation. - - :param custom_location: - :type custom_location: str - """ - - _attribute_map = { - 'custom_location': {'key': 'customLocation', 'type': 'str'}, - } - - def __init__(self, *, custom_location: str=None, **kwargs) -> None: - super(ExtendedLocation, self).__init__(**kwargs) - self.custom_location = custom_location - - -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: str=None, enabled: bool=None, registration=None, graph_api_version: str=None, login=None, **kwargs) -> None: - 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(Model): - """Application logs to file system configuration. - - :param level: Log level. Possible values include: 'Off', 'Verbose', - 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel - """ - - _attribute_map = { - 'level': {'key': 'level', 'type': 'LogLevel'}, - } - - def __init__(self, *, level="Off", **kwargs) -> None: - super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) - self.level = level - - -class FileSystemHttpLogsConfig(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: int=None, retention_in_days: int=None, enabled: bool=None, **kwargs) -> None: - 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: str=None, directory: str=None, **kwargs) -> None: - 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': 'ForwardProxyConvention'}, - 'custom_host_header_name': {'key': 'properties.customHostHeaderName', 'type': 'str'}, - 'custom_proto_header_name': {'key': 'properties.customProtoHeaderName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, convention=None, custom_host_header_name: str=None, custom_proto_header_name: str=None, **kwargs) -> None: - 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 FrontEndConfiguration(Model): - """FrontEndConfiguration. - - :param kind: Possible values include: 'NodePort', 'LoadBalancer' - :type kind: str or ~azure.mgmt.web.v2020_12_01.models.FrontEndServiceType - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'FrontEndServiceType'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(FrontEndConfiguration, self).__init__(**kwargs) - self.kind = kind - - -class FunctionAppMajorVersion(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) -> None: - super(FunctionAppMajorVersion, self).__init__(**kwargs) - self.display_text = None - self.value = None - self.minor_versions = None - - -class FunctionAppMinorVersion(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) -> None: - super(FunctionAppMinorVersion, self).__init__(**kwargs) - self.display_text = None - self.value = None - self.stack_settings = None - - -class FunctionAppRuntimes(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) -> None: - super(FunctionAppRuntimes, self).__init__(**kwargs) - self.linux_runtime_settings = None - self.windows_runtime_settings = None - - -class FunctionAppRuntimeSettings(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: true if remote debugging is - supported for the stack; otherwise, 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: true if the stack is in preview; otherwise, - false. - :vartype is_preview: bool - :ivar is_deprecated: true if the stack is deprecated; - otherwise, false. - :vartype is_deprecated: bool - :ivar is_hidden: true if the stack should be hidden; - otherwise, false. - :vartype is_hidden: bool - :ivar end_of_life_date: End-of-life date for the minor version. - :vartype end_of_life_date: datetime - :ivar is_auto_update: true if the stack version is - auto-updated; otherwise, false. - :vartype is_auto_update: bool - :ivar is_early_access: true if the minor version is - early-access; otherwise, false. - :vartype is_early_access: bool - :ivar is_default: true if the minor version the default; - otherwise, 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) -> None: - 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': 'StackPreferredOs'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 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: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, test_data_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, invoke_url_template: str=None, language: str=None, is_disabled: bool=None, **kwargs) -> None: - 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 FunctionSecrets(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: str=None, trigger_url: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(GeoRegion, self).__init__(kind=kind, **kwargs) - self.description = None - self.display_name = None - self.org_domain = 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: str=None, enabled: bool=None, registration=None, login=None, **kwargs) -> None: - super(GitHub, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - - -class GitHubActionCodeConfiguration(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: str=None, runtime_version: str=None, **kwargs) -> None: - super(GitHubActionCodeConfiguration, self).__init__(**kwargs) - self.runtime_stack = runtime_stack - self.runtime_version = runtime_version - - -class GitHubActionConfiguration(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=None, container_configuration=None, is_linux: bool=None, generate_workflow_file: bool=None, **kwargs) -> None: - 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(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: str=None, image_name: str=None, username: str=None, password: str=None, **kwargs) -> None: - super(GitHubActionContainerConfiguration, self).__init__(**kwargs) - self.server_url = server_url - self.image_name = image_name - self.username = username - self.password = password - - -class GitHubActionWebAppStackSettings(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: true if GitHub Actions is supported for - the stack; otherwise, 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) -> None: - super(GitHubActionWebAppStackSettings, self).__init__(**kwargs) - self.is_supported = None - self.supported_version = None - - -class GlobalCsmSkuDescription(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: str=None, tier: str=None, size: str=None, family: str=None, capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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': 'UnauthenticatedClientActionV2'}, - 'redirect_to_provider': {'key': 'properties.redirectToProvider', 'type': 'str'}, - 'excluded_paths': {'key': 'properties.excludedPaths', 'type': '[str]'}, - } - - def __init__(self, *, kind: str=None, require_authentication: bool=None, unauthenticated_client_action=None, redirect_to_provider: str=None, excluded_paths=None, **kwargs) -> None: - 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: str=None, enabled: bool=None, registration=None, login=None, validation=None, **kwargs) -> None: - super(Google, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - self.validation = validation - - -class HandlerMapping(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: str=None, script_processor: str=None, arguments: str=None, **kwargs) -> None: - super(HandlerMapping, self).__init__(**kwargs) - self.extension = extension - self.script_processor = script_processor - self.arguments = arguments - - -class HostingEnvironmentDeploymentInfo(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: str=None, location: str=None, **kwargs) -> None: - super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) - self.name = name - self.location = location - - -class HostingEnvironmentDiagnostics(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: str=None, diagnostics_output: str=None, **kwargs) -> None: - super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) - self.name = name - self.diagnostics_output = diagnostics_output - - -class HostingEnvironmentProfile(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: str=None, **kwargs) -> None: - super(HostingEnvironmentProfile, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - - -class HostKeys(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: str=None, function_keys=None, system_keys=None, **kwargs) -> None: - super(HostKeys, self).__init__(**kwargs) - self.master_key = master_key - self.function_keys = function_keys - self.system_keys = system_keys - - -class HostName(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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'hostNameType', 'type': 'HostNameType'}, - } - - def __init__(self, *, name: str=None, site_names=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, **kwargs) -> None: - 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': 'AzureResourceType'}, - 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'CustomHostNameDnsRecordType'}, - 'host_name_type': {'key': 'properties.hostNameType', 'type': 'HostNameType'}, - 'ssl_state': {'key': 'properties.sslState', 'type': 'SslState'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, site_name: str=None, domain_id: str=None, azure_resource_name: str=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint: str=None, **kwargs) -> None: - 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 HostNameSslState(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 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': 'SslState'}, - 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'to_update': {'key': 'toUpdate', 'type': 'bool'}, - 'host_type': {'key': 'hostType', 'type': 'HostType'}, - } - - def __init__(self, *, name: str=None, ssl_state=None, virtual_ip: str=None, thumbprint: str=None, to_update: bool=None, host_type=None, **kwargs) -> None: - 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(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=None, azure_blob_storage=None, **kwargs) -> None: - 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: str=None, require_https: bool=None, routes=None, forward_proxy=None, **kwargs) -> None: - 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: str=None, api_prefix: str=None, **kwargs) -> None: - 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: str=None, service_bus_namespace: str=None, relay_name: str=None, relay_arm_uri: str=None, hostname: str=None, port: int=None, send_key_name: str=None, send_key_value: str=None, service_bus_suffix: str=None, **kwargs) -> None: - 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 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: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, value: str=None, **kwargs) -> None: - super(Identifier, self).__init__(kind=kind, **kwargs) - self.value = value - - -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: - :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: str=None, azure_active_directory=None, facebook=None, git_hub=None, google=None, legacy_microsoft_account=None, twitter=None, apple=None, azure_static_web_apps=None, custom_open_id_connect_providers=None, **kwargs) -> None: - 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(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: str=None, endpoints=None, ports=None, **kwargs) -> None: - super(InboundEnvironmentEndpoint, self).__init__(**kwargs) - self.description = description - self.endpoints = endpoints - self.ports = ports - - -class IpSecurityRestriction(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: str=None, subnet_mask: str=None, vnet_subnet_resource_id: str=None, vnet_traffic_tag: int=None, subnet_traffic_tag: int=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, headers=None, **kwargs) -> None: - 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: str=None, allowed_groups=None, allowed_client_applications=None, **kwargs) -> None: - super(JwtClaimChecks, self).__init__(kind=kind, **kwargs) - self.allowed_groups = allowed_groups - self.allowed_client_applications = allowed_client_applications - - -class KeyInfo(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: str=None, value: str=None, **kwargs) -> None: - super(KeyInfo, self).__init__(**kwargs) - self.name = name - self.value = value - - -class KeyValuePairStringObject(Model): - """KeyValuePairStringObject. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar key: - :vartype key: str - :ivar value: - :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) -> None: - super(KeyValuePairStringObject, self).__init__(**kwargs) - self.key = None - self.value = None - - -class KubeEnvironment(Resource): - """A Kubernetes cluster specialized for web workloads by Azure App Service. - - 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: Resource tags. - :type tags: dict[str, str] - :param kube_environment_type: Type of the Kubernetes Environment. - Only Set for WorkerApps as Managed - :type kube_environment_type: str - :param extended_location: - :type extended_location: - ~azure.mgmt.web.v2020_12_01.models.ExtendedLocation - :ivar provisioning_state: Provisioning state of the Kubernetes - Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Waiting', 'InitializationInProgress', 'InfrastructureSetupInProgress', - 'InfrastructureSetupComplete', 'ScheduledForDelete', 'UpgradeRequested', - 'UpgradeFailed', 'AKSProvisionComplete' - :vartype provisioning_state: str or - ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProvisioningState - :ivar deployment_errors: Any errors that occurred during deployment or - deployment validation - :vartype deployment_errors: str - :param internal_load_balancer_enabled: Only visible within Vnet/Subnet - :type internal_load_balancer_enabled: bool - :ivar default_domain: Default Domain Name for the cluster - :vartype default_domain: str - :param static_ip: Static IP of the KubeEnvironment - :type static_ip: str - :param arc_configuration: Cluster configuration which determines the ARC - cluster - components types. Eg: Choosing between BuildService kind, - FrontEnd Service ArtifactsStorageType etc. - :type arc_configuration: - ~azure.mgmt.web.v2020_12_01.models.ArcConfiguration - :param app_logs_configuration: Cluster configuration which enables the log - daemon to export - app logs to a destination. Currently only "log-analytics" is - supported - :type app_logs_configuration: - ~azure.mgmt.web.v2020_12_01.models.AppLogsConfiguration - :param worker_apps_configuration: Cluster configuration which enables - users to create Worker Apps - enabled dedicated Kube Environments - :type worker_apps_configuration: - ~azure.mgmt.web.v2020_12_01.models.WorkerAppsConfiguration - :param aks_resource_id: - :type aks_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'location': {'required': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'deployment_errors': {'readonly': True}, - 'default_domain': {'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}'}, - 'kube_environment_type': {'key': 'properties.type', 'type': 'str'}, - 'extended_location': {'key': 'properties.extendedLocation', 'type': 'ExtendedLocation'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KubeEnvironmentProvisioningState'}, - 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, - 'internal_load_balancer_enabled': {'key': 'properties.internalLoadBalancerEnabled', 'type': 'bool'}, - 'default_domain': {'key': 'properties.defaultDomain', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, - 'arc_configuration': {'key': 'properties.arcConfiguration', 'type': 'ArcConfiguration'}, - 'app_logs_configuration': {'key': 'properties.appLogsConfiguration', 'type': 'AppLogsConfiguration'}, - 'worker_apps_configuration': {'key': 'properties.workerAppsConfiguration', 'type': 'WorkerAppsConfiguration'}, - 'aks_resource_id': {'key': 'properties.aksResourceID', 'type': 'str'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, kube_environment_type: str=None, extended_location=None, internal_load_balancer_enabled: bool=None, static_ip: str=None, arc_configuration=None, app_logs_configuration=None, worker_apps_configuration=None, aks_resource_id: str=None, **kwargs) -> None: - super(KubeEnvironment, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.kube_environment_type = kube_environment_type - self.extended_location = extended_location - self.provisioning_state = None - self.deployment_errors = None - self.internal_load_balancer_enabled = internal_load_balancer_enabled - self.default_domain = None - self.static_ip = static_ip - self.arc_configuration = arc_configuration - self.app_logs_configuration = app_logs_configuration - self.worker_apps_configuration = worker_apps_configuration - self.aks_resource_id = aks_resource_id - - -class KubeEnvironmentProfile(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: str=None, **kwargs) -> None: - 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: str=None, enabled: bool=None, registration=None, login=None, validation=None, **kwargs) -> None: - super(LegacyMicrosoftAccount, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.registration = registration - self.login = login - self.validation = validation - - -class LinuxJavaContainerSettings(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: true if the stack is in preview; otherwise, - false. - :vartype is_preview: bool - :ivar is_deprecated: true if the stack is deprecated; - otherwise, false. - :vartype is_deprecated: bool - :ivar is_hidden: true if the stack should be hidden; - otherwise, false. - :vartype is_hidden: bool - :ivar end_of_life_date: End-of-life date for the minor version. - :vartype end_of_life_date: datetime - :ivar is_auto_update: true if the stack version is - auto-updated; otherwise, false. - :vartype is_auto_update: bool - :ivar is_early_access: true if the minor version is - early-access; otherwise, 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) -> None: - 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(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: str=None, localized_value: str=None, **kwargs) -> None: - super(LocalizableString, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class LogAnalyticsConfiguration(Model): - """LogAnalyticsConfiguration. - - :param customer_id: - :type customer_id: str - :param shared_key: - :type shared_key: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'shared_key': {'key': 'sharedKey', 'type': 'str'}, - } - - def __init__(self, *, customer_id: str=None, shared_key: str=None, **kwargs) -> None: - super(LogAnalyticsConfiguration, self).__init__(**kwargs) - self.customer_id = customer_id - self.shared_key = shared_key - - -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: str=None, routes=None, token_store=None, preserve_url_fragments_for_logins: bool=None, allowed_external_redirect_urls=None, cookie_expiration=None, nonce=None, **kwargs) -> None: - 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: str=None, logout_endpoint: str=None, **kwargs) -> None: - 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: str=None, scopes=None, **kwargs) -> None: - super(LoginScopes, self).__init__(kind=kind, **kwargs) - self.scopes = scopes - - -class LogSpecification(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: str=None, display_name: str=None, blob_duration: str=None, log_filter_pattern: str=None, **kwargs) -> None: - 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(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.ManagedServiceIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'tenant_id': {'readonly': True}, - 'principal_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'ManagedServiceIdentityType'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.type = type - self.tenant_id = None - self.principal_id = None - self.user_assigned_identities = user_assigned_identities - - -class ManagedServiceIdentityUserAssignedIdentitiesValue(Model): - """ManagedServiceIdentityUserAssignedIdentitiesValue. - - 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) -> None: - super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class MetricAvailability(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: str=None, blob_duration: str=None, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricSpecification(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: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supports_instance_level_aggregation: bool=None, enable_regional_mdm_account: bool=None, source_mdm_account: str=None, source_mdm_namespace: str=None, metric_filter_pattern: str=None, fill_gap_with_zero: bool=None, is_internal: bool=None, dimensions=None, category: str=None, availabilities=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param connection_string: Required. Connection string to the remote MySQL - database. - :type connection_string: str - :param migration_type: Required. 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}, - 'connection_string': {'required': True}, - 'migration_type': {'required': 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': 'MySqlMigrationType'}, - } - - def __init__(self, *, connection_string: str, migration_type, kind: str=None, **kwargs) -> None: - 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': 'OperationStatus'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 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 false by default. - :type skip_app_data: bool - :param app_offline: Sets the AppOffline rule while the MSDeploy operation - executes. - Setting is 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: str=None, package_uri: str=None, connection_string: str=None, db_type: str=None, set_parameters_xml_file_uri: str=None, set_parameters=None, skip_app_data: bool=None, app_offline: bool=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(MSDeployLog, self).__init__(kind=kind, **kwargs) - self.entries = None - - -class MSDeployLogEntry(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 - :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': 'MSDeployLogEntryType'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - 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 - :ivar end_time: End time of deploy operation - :vartype end_time: 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': 'MSDeployProvisioningState'}, - '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: str=None, **kwargs) -> None: - 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(Model): - """Identifies an object. - - :param name: Name of the object. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(NameIdentifier, self).__init__(**kwargs) - self.name = name - - -class NameValuePair(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: str=None, value: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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(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: str=None, status: str=None, message: str=None, **kwargs) -> None: - 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: str=None, validate_nonce: bool=None, nonce_expiration_interval: str=None, **kwargs) -> None: - 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 - :param method: Possible values include: 'ClientSecretPost' - :type method: str or - ~azure.mgmt.web.v2020_12_01.models.ClientCredentialMethod - :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'}, - 'method': {'key': 'properties.method', 'type': 'ClientCredentialMethod'}, - 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, method=None, client_secret_setting_name: str=None, **kwargs) -> None: - super(OpenIdConnectClientCredential, self).__init__(kind=kind, **kwargs) - self.method = method - 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: str=None, authorization_endpoint: str=None, token_endpoint: str=None, issuer: str=None, certification_uri: str=None, well_known_open_id_configuration: str=None, **kwargs) -> None: - 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: str=None, name_claim_type: str=None, scopes=None, **kwargs) -> None: - 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: str=None, client_id: str=None, client_credential=None, open_id_connect_configuration=None, **kwargs) -> None: - 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(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 - :param modified_time: Time when operation has been updated. - :type modified_time: datetime - :param expiration_time: Time when operation will expire. - :type expiration_time: 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': 'OperationStatus'}, - '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: str=None, name: str=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id: str=None, **kwargs) -> None: - 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(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: str=None, endpoints=None, **kwargs) -> None: - super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) - self.category = category - self.endpoints = endpoints - - -class PerfMonResponse(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: str=None, message: str=None, data=None, **kwargs) -> None: - super(PerfMonResponse, self).__init__(**kwargs) - self.code = code - self.message = message - self.data = data - - -class PerfMonSample(Model): - """Performance monitor sample in a set. - - :param time: Point in time for which counter was measured. - :type time: 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=None, instance_name: str=None, value: float=None, **kwargs) -> None: - super(PerfMonSample, self).__init__(**kwargs) - self.time = time - self.instance_name = instance_name - self.value = value - - -class PerfMonSet(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 - :param end_time: End time of the period. - :type end_time: 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: str=None, start_time=None, end_time=None, time_grain: str=None, values=None, **kwargs) -> None: - 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: 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: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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: true if promotion code is - required; otherwise, 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': 'AppServicePlanRestrictions'}, - '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: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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 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: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: - 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: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: - super(PrivateAccess, self).__init__(kind=kind, **kwargs) - self.enabled = enabled - self.virtual_networks = virtual_networks - - -class PrivateAccessSubnet(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: str=None, key: int=None, **kwargs) -> None: - super(PrivateAccessSubnet, self).__init__(**kwargs) - self.name = name - self.key = key - - -class PrivateAccessVirtualNetwork(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: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: - super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) - self.name = name - self.key = key - self.resource_id = resource_id - self.subnets = subnets - - -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: - :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: str=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, **kwargs) - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateLinkConnectionState(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: str=None, description: str=None, actions_required: str=None, **kwargs) -> None: - super(PrivateLinkConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = actions_required - - -class PrivateLinkResource(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, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.properties = properties - - -class PrivateLinkResourceProperties(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) -> None: - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None - - -class PrivateLinkResourcesWrapper(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, **kwargs) -> None: - 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 - :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 - :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: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: - 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 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: str=None, base_address: str=None, file_name: str=None, href: str=None, file_path: str=None, module_memory_size: int=None, file_version: str=None, file_description: str=None, product: str=None, product_version: str=None, is_debug: bool=None, language: str=None, **kwargs) -> None: - 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 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 - :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: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: - 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 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': 'PublicCertificateLocation'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, blob: bytearray=None, public_certificate_location=None, **kwargs) -> None: - super(PublicCertificate, self).__init__(kind=kind, **kwargs) - self.blob = blob - self.public_certificate_location = public_certificate_location - self.thumbprint = None - - -class PushSettings(ProxyOnlyResource): - """Push settings for the 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 - :ivar type: Resource type. - :vartype type: str - :param is_push_enabled: Required. 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}, - 'is_push_enabled': {'required': 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, *, is_push_enabled: bool, kind: str=None, tag_whitelist_json: str=None, tags_requiring_auth: str=None, dynamic_tags_json: str=None, **kwargs) -> None: - 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(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=None, score: float=None, **kwargs) -> None: - super(QueryUtterancesResult, self).__init__(**kwargs) - self.sample_utterance = sample_utterance - self.score = score - - -class QueryUtterancesResults(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: str=None, results=None, **kwargs) -> None: - super(QueryUtterancesResults, self).__init__(**kwargs) - self.query = query - self.results = results - - -class RampUpRule(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 ActionHostName. - :type reroute_percentage: float - :param change_step: In auto ramp up scenario this is the step to - add/remove from ReroutePercentage until it reaches - \\nMinReroutePercentage or - MaxReroutePercentage. Site metrics are checked every N - minutes specified in ChangeIntervalInMinutes.\\nCustom - decision algorithm - can be provided in TiPCallback site extension which URL can be specified - in 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: str=None, reroute_percentage: float=None, change_step: float=None, change_interval_in_minutes: int=None, min_reroute_percentage: float=None, max_reroute_percentage: float=None, change_decision_callback_url: str=None, name: str=None, **kwargs) -> None: - 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 - :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 - :param end_time: The end time in UTC of a range that the recommendation - refers to. - :type end_time: 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 - :param notification_expiration_time: Date and time in UTC when this - notification expires. - :type notification_expiration_time: 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 - :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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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 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': 'NotificationLevel'}, - 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - '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: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: - 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: str=None, key_size: int=None, delay_existing_revoke_in_hours: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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: str=None, entity_name: str=None, entity_connection_string: str=None, resource_type: str=None, resource_connection_string: str=None, hostname: str=None, port: int=None, biztalk_uri: str=None, **kwargs) -> None: - 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: - :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: str=None, private_endpoint=None, private_link_service_connection_state=None, ip_addresses=None, **kwargs) -> None: - 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(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': 'RenderingType'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: - 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: str=None, key_size: int=None, csr: str=None, is_private_key_external: bool=None, **kwargs) -> None: - 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(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: int=None, time_interval: str=None, **kwargs) -> None: - super(RequestsBasedTrigger, self).__init__(**kwargs) - self.count = count - self.time_interval = time_interval - - -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: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: - super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) - self.category = category - self.signal_availability = signal_availability - - -class ResourceMetricAvailability(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) -> None: - 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: str=None, **kwargs) -> None: - 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 ResourceNameAvailability(Model): - """Information regarding availability of a resource name. - - :param name_available: true indicates name is valid and - available. false indicates the name is invalid, unavailable, - or both. - :type name_available: bool - :param reason: Invalid indicates the name provided does not - match Azure App Service naming requirements. 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: bool=None, reason=None, message: str=None, **kwargs) -> None: - super(ResourceNameAvailability, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class ResourceNameAvailabilityRequest(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, is_fqdn: bool=None, **kwargs) -> None: - super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.is_fqdn = is_fqdn - - -class ResponseMetaData(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=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param storage_account_url: Required. 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: Required. true if the restore operation can - overwrite target app; otherwise, false. 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. true to remove custom domains - automatically. If 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. Default value: False . - :type ignore_conflicting_host_names: bool - :param ignore_databases: Ignore the databases and only restore the site - content. Default value: False . - :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: true if - SiteConfig.ConnectionStrings should be set in new app; otherwise, - 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}, - 'storage_account_url': {'required': True}, - 'overwrite': {'required': 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': 'BackupRestoreOperationType'}, - 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, - 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, - } - - def __init__(self, *, storage_account_url: str, overwrite: bool, kind: str=None, blob_name: str=None, site_name: str=None, databases=None, ignore_conflicting_host_names: bool=False, ignore_databases: bool=False, app_service_plan: str=None, operation_type="Default", adjust_connection_strings: bool=None, hosting_environment: str=None, **kwargs) -> None: - 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(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: str=None, links=None, qid: str=None, **kwargs) -> None: - super(SampleUtterance, self).__init__(**kwargs) - self.text = text - self.links = links - self.qid = qid - - -class ServiceSpecification(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=None, log_specifications=None, **kwargs) -> None: - 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: Resource tags. - :type tags: dict[str, str] - :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: true if the app is enabled; otherwise, - 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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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: true if the app is a default - container; otherwise, 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 - :param identity: - :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity - :param extended_location: Extended location Envelope - :type extended_location: - ~azure.mgmt.web.v2020_12_01.models.ExtendedLocationEnvelope - """ - - _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}'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocationEnvelope'} - } - - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, key_vault_reference_identity: str=None, https_only: bool=None, redundancy_mode=None, storage_account_required: bool=None, identity=None, extended_location=None, **kwargs) -> None: - super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - 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 - self.identity = identity - self.extended_location = extended_location - - -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: true if the Authentication / Authorization - feature is enabled for the current app; otherwise, 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: true to durably store - platform-specific security tokens that are obtained during login flows; - otherwise, false. - The default is 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 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_oauth_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_oauth_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_oauth_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_oauth_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_oauth_scopes: The OAuth 2.0 scopes that will be requested - as part of GitHub Login authentication. - This setting is optional - :type git_hub_oauth_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_oauth_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_oauth_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': 'UnauthenticatedClientAction'}, - 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, - 'default_provider': {'key': 'properties.defaultProvider', 'type': 'BuiltInAuthenticationProvider'}, - '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_oauth_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_oauth_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_oauth_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_oauth_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: str=None, enabled: bool=None, runtime_version: str=None, config_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, client_secret_setting_name: str=None, client_secret_certificate_thumbprint: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, aad_claims_authorization: str=None, google_client_id: str=None, google_client_secret: str=None, google_client_secret_setting_name: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_app_secret_setting_name: str=None, facebook_oauth_scopes=None, git_hub_client_id: str=None, git_hub_client_secret: str=None, git_hub_client_secret_setting_name: str=None, git_hub_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, twitter_consumer_secret_setting_name: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_client_secret_setting_name: str=None, microsoft_account_oauth_scopes=None, is_auth_from_file: str=None, auth_file_path: str=None, **kwargs) -> None: - 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_oauth_scopes = google_oauth_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_oauth_scopes = facebook_oauth_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_oauth_scopes = git_hub_oauth_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_oauth_scopes = microsoft_account_oauth_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: str=None, platform=None, global_validation=None, identity_providers=None, login=None, http_settings=None, **kwargs) -> None: - 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(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': 'CloneAbilityResult'}, - 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, - 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, - } - - def __init__(self, *, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None, **kwargs) -> None: - 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(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: str=None, description: str=None, **kwargs) -> None: - super(SiteCloneabilityCriterion, self).__init__(**kwargs) - self.name = name - self.description = description - - -class SiteConfig(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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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: true if Auto Heal is enabled; - otherwise, 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: true to enable local MySQL; - otherwise, false. Default value: 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. Default value: True . - :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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'loadBalancing', 'type': 'SiteLoadBalancing'}, - '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: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, key_vault_reference_identity: str=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, function_app_scale_limit: int=None, health_check_path: str=None, functions_runtime_scale_monitoring_enabled: bool=None, website_time_zone: str=None, minimum_elastic_instance_count: int=None, **kwargs) -> None: - 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(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: true if use32BitWorkerProcess - should be set to true for the stack; otherwise, 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) -> None: - 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. Default value: - "v4.6" . - :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: true if request tracing is - enabled; otherwise, false. - :type request_tracing_enabled: bool - :param request_tracing_expiration_time: Request tracing expiration time. - :type request_tracing_expiration_time: datetime - :param remote_debugging_enabled: true if remote debugging is - enabled; otherwise, false. - :type remote_debugging_enabled: bool - :param remote_debugging_version: Remote debugging version. - :type remote_debugging_version: str - :param http_logging_enabled: true if HTTP logging is enabled; - otherwise, 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: true if detailed error - logging is enabled; otherwise, 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: true to use 32-bit worker - process; otherwise, false. - :type use32_bit_worker_process: bool - :param web_sockets_enabled: true if WebSocket is enabled; - otherwise, false. - :type web_sockets_enabled: bool - :param always_on: true if Always On is enabled; otherwise, - 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: true if Auto Heal is enabled; - otherwise, 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: true to enable local MySQL; - otherwise, false. Default value: 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. Default value: True . - :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': 'ManagedPipelineMode'}, - 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, - 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'SiteLoadBalancing'}, - '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: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, power_shell_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, vnet_route_all_enabled: bool=None, vnet_private_ports_count: int=None, cors=None, push=None, api_definition=None, api_management_config=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, key_vault_reference_identity: str=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=None, http20_enabled: bool=True, min_tls_version=None, scm_min_tls_version=None, ftps_state=None, pre_warmed_instance_count: int=None, function_app_scale_limit: int=None, health_check_path: str=None, functions_runtime_scale_monitoring_enabled: bool=None, website_time_zone: str=None, minimum_elastic_instance_count: int=None, **kwargs) -> None: - 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 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 - :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: str=None, **kwargs) -> None: - super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) - self.time = None - self.snapshot_id = 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 - :param download_count: Count of downloads. - :type download_count: int - :param local_is_latest_version: true if the local version is - the latest version; 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 - :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': 'SiteExtensionType'}, - '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: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: - 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 SiteLimits(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: float=None, max_memory_in_mb: int=None, max_disk_size_in_mb: int=None, **kwargs) -> None: - 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: str=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None, **kwargs) -> None: - 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(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: str=None, validation_key: str=None, decryption: str=None, decryption_key: str=None, **kwargs) -> None: - 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 - :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: true if the app is enabled; otherwise, - 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: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . - :type is_xenon: bool - :param hyper_v: Hyper-V sandbox. Default value: False . - :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 - :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: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: 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: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is 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: true to disable the public - hostnames of the app; otherwise, false. - If 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 - :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: true if the app is a default - container; otherwise, 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 - :param identity: - :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity - """ - - _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'}, - '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': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - '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': 'ClientCertMode'}, - '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': 'RedundancyMode'}, - 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, - 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, client_cert_mode=None, client_cert_exclusion_paths: str=None, host_names_disabled: bool=None, custom_domain_verification_id: str=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, key_vault_reference_identity: str=None, https_only: bool=None, redundancy_mode=None, storage_account_required: bool=None, identity=None, **kwargs) -> None: - super(SitePatchResource, self).__init__(kind=kind, **kwargs) - 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 - self.identity = identity - - -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: str=None, local_log_errors: str=None, master_log_errors: str=None, local_log_errors_max_length: str=None, master_log_errors_max_length: str=None, **kwargs) -> None: - 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(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) -> None: - super(SiteSeal, self).__init__(**kwargs) - self.html = html - - -class SiteSealRequest(Model): - """Site seal request. - - :param light_theme: If 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: bool=None, locale: str=None, **kwargs) -> None: - 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: true to limit to manual - integration; false to enable continuous integration (which - configures webhooks into online repos like GitHub). - :type is_manual_integration: bool - :param is_git_hub_action: true if this is deployed via GitHub - action. - :type is_git_hub_action: bool - :param deployment_rollback_enabled: true to enable deployment - rollback; otherwise, false. - :type deployment_rollback_enabled: bool - :param is_mercurial: true for a Mercurial repository; - 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: str=None, repo_url: str=None, branch: str=None, is_manual_integration: bool=None, is_git_hub_action: bool=None, deployment_rollback_enabled: bool=None, is_mercurial: bool=None, git_hub_action_configuration=None, **kwargs) -> None: - 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(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: int=None, maximum: int=None, elastic_maximum: int=None, default: int=None, scale_type: str=None, **kwargs) -> None: - 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(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: str=None, tier: str=None, size: str=None, family: str=None, capacity: int=None, sku_capacity=None, locations=None, capabilities=None, **kwargs) -> None: - 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(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: str=None, sku=None, capacity=None, **kwargs) -> None: - super(SkuInfo, self).__init__(**kwargs) - self.resource_type = resource_type - self.sku = sku - self.capacity = capacity - - -class SkuInfos(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: str=None, skus=None, **kwargs) -> None: - 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: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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 SlotSwapStatus(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 - :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) -> None: - super(SlotSwapStatus, self).__init__(**kwargs) - self.timestamp_utc = None - self.source_slot_name = None - self.destination_slot_name = None - - -class SlowRequestsBasedTrigger(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: str=None, path: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(Snapshot, self).__init__(kind=kind, **kwargs) - self.time = None - - -class SnapshotRecoverySource(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: str=None, id: str=None, **kwargs) -> None: - 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. - - 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 - :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: Required. If true the restore operation can - overwrite source app; otherwise, 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}, - 'overwrite': {'required': 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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, use_dr_secondary: bool=None, **kwargs) -> None: - 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(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': 'SolutionType'}, - 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, - 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, - } - - def __init__(self, *, id: float=None, display_name: str=None, order: float=None, description: str=None, type=None, data=None, metadata=None, **kwargs) -> None: - 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 - """ - - _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: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: - 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 StackMajorVersion(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: true if this is the default major version; - otherwise, 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: true if this supports - Application Insights; otherwise, false. - :type application_insights: bool - :param app_settings_dictionary: - - - 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: - - - Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to - 0 - :type site_config_properties_dictionary: dict[str, object] - :param is_preview: true if this stack is in Preview, - otherwise false. - :type is_preview: bool - :param is_deprecated: true if this stack has been deprecated, - otherwise false. - :type is_deprecated: bool - :param is_hidden: true if this stack should be hidden for new - customers on portal, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, app_settings_dictionary=None, site_config_properties_dictionary=None, is_preview: bool=None, is_deprecated: bool=None, is_hidden: bool=None, **kwargs) -> None: - 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(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: true if this is the default minor version; - otherwise, false. - :type is_default: bool - :param is_remote_debugging_enabled: true if this supports - Remote Debugging, otherwise 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: str=None, runtime_version: str=None, is_default: bool=None, is_remote_debugging_enabled: bool=None, **kwargs) -> None: - 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(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 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: true if capacity - is applicable for all apps; otherwise, 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': 'ComputeModeOptions'}, - 'worker_size': {'key': 'workerSize', 'type': 'WorkerSizeOptions'}, - '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: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: - 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 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: Resource tags. - :type tags: dict[str, 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] - :param sku: - :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription - :param identity: - :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity - """ - - _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}'}, - '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]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - } - - def __init__(self, *, location: str, kind: str=None, tags=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, template_properties=None, sku=None, identity=None, **kwargs) -> None: - super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, **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 - self.sku = sku - self.identity = identity - - -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 - :ivar last_updated_on: When this build was updated. - :vartype last_updated_on: 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: str=None, **kwargs) -> None: - 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 StaticSiteBuildProperties(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: str=None, api_location: str=None, app_artifact_location: str=None, output_location: str=None, app_build_command: str=None, api_build_command: str=None, skip_github_action_workflow_generation: bool=None, github_action_secret_name_override: str=None, **kwargs) -> None: - 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 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 - :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: str=None, **kwargs) -> None: - 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 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. - Default value: "cname-delegation" . - :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: str=None, validation_method: str="cname-delegation", **kwargs) -> None: - 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: str=None, **kwargs) -> None: - super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, **kwargs) - self.function_name = None - self.trigger_type = 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: str=None, repository_url: str=None, branch: str=None, repository_token: str=None, build_properties=None, template_properties=None, **kwargs) -> None: - 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: str=None, repository_token: str=None, should_update_repository: bool=None, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, repository_url: str=None, branch: str=None, build_properties=None, **kwargs) -> None: - super(StaticSitesWorkflowPreviewRequest, self).__init__(kind=kind, **kwargs) - self.repository_url = repository_url - self.branch = branch - self.build_properties = build_properties - - -class StaticSiteTemplateOptions(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: str=None, owner: str=None, repository_name: str=None, description: str=None, is_private: bool=None, **kwargs) -> None: - 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: str=None, roles: str=None, **kwargs) -> None: - super(StaticSiteUserARMResource, self).__init__(kind=kind, **kwargs) - self.provider = None - self.user_id = None - self.display_name = None - self.roles = roles - - -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: str=None, domain: str=None, provider: str=None, user_details: str=None, roles: str=None, num_hours_to_expiration: int=None, **kwargs) -> None: - 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 - :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: str=None, **kwargs) -> None: - 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 - """ - - _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: str=None, function_app_resource_id: str=None, function_app_region: str=None, **kwargs) -> None: - 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 - """ - - _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: str=None, function_app_resource_id: str=None, function_app_region: str=None, **kwargs) -> None: - 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 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: str=None, app_zip_url: str=None, api_zip_url: str=None, deployment_title: str=None, provider: str=None, function_language: str=None, **kwargs) -> None: - 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(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': 'InsightStatus'}, - } - - def __init__(self, *, message: str=None, status_id=None, **kwargs) -> None: - super(Status, self).__init__(**kwargs) - self.message = message - self.status_id = status_id - - -class StatusCodesBasedTrigger(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: int=None, sub_status: int=None, win32_status: int=None, path: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - 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(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: str=None, path: str=None, count: int=None, time_interval: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param azurefiles_connection_string: Required. AzureFiles connection - string. - :type azurefiles_connection_string: str - :param azurefiles_share: Required. AzureFiles share. - :type azurefiles_share: str - :param switch_site_after_migration: trueif the app should be - switched over; otherwise, false. Default value: False . - :type switch_site_after_migration: bool - :param block_write_access_to_site: true if the app should be - read only during copy operation; otherwise, false. Default - value: False . - :type block_write_access_to_site: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azurefiles_connection_string': {'required': True}, - 'azurefiles_share': {'required': 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, *, azurefiles_connection_string: str, azurefiles_share: str, kind: str=None, switch_site_after_migration: bool=False, block_write_access_to_site: bool=False, **kwargs) -> None: - 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: str=None, **kwargs) -> None: - 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: str=None, properties=None, **kwargs) -> None: - 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: str=None, properties=None, **kwargs) -> None: - super(StringList, self).__init__(kind=kind, **kwargs) - self.properties = properties - - -class SupportTopic(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) -> None: - 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: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: - super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) - self.subnet_resource_id = subnet_resource_id - self.swift_supported = swift_supported - - -class TldLegalAgreement(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: str=None, **kwargs) -> None: - super(TldLegalAgreement, self).__init__(**kwargs) - self.agreement_key = agreement_key - self.title = title - self.content = content - self.url = url - - -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: str=None, enabled: bool=None, token_refresh_extension_hours: float=None, file_system=None, azure_blob_storage=None, **kwargs) -> None: - 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 true, then the top level domain supports - domain privacy; otherwise, 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: str=None, privacy: bool=None, **kwargs) -> None: - super(TopLevelDomain, self).__init__(kind=kind, **kwargs) - self.privacy = privacy - - -class TopLevelDomainAgreementOption(Model): - """Options for retrieving the list of top level domain legal agreements. - - :param include_privacy: If true, then the list of agreements - will include agreements for domain privacy as well; otherwise, - false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - """ - - _attribute_map = { - 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, - 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, - } - - def __init__(self, *, include_privacy: bool=None, for_transfer: bool=None, **kwargs) -> None: - super(TopLevelDomainAgreementOption, self).__init__(**kwargs) - self.include_privacy = include_privacy - self.for_transfer = for_transfer - - -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: str=None, runs=None, **kwargs) -> None: - super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) - self.runs = runs - - -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 - :param end_time: End time. - :type end_time: 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': 'TriggeredWebJobStatus'}, - '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: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: - 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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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: str=None, enabled: bool=None, registration=None, **kwargs) -> None: - 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: str=None, consumer_key: str=None, consumer_secret_setting_name: str=None, **kwargs) -> None: - 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 - :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': 'ComputeModeOptions'}, - 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 User(ProxyOnlyResource): - """User credentials used for publishing activity. - - 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 - :ivar type: Resource type. - :vartype type: str - :param publishing_user_name: Required. 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}, - 'publishing_user_name': {'required': 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, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: - 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(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: true if App Service plan is for - Linux workers; otherwise, false. - :type need_linux_workers: bool - :param is_spot: true if App Service plan is for Spot - instances; otherwise, 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: 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, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, container_registry_base_url: str=None, container_registry_username: str=None, container_registry_password: str=None, container_image_repository: str=None, container_image_tag: str=None, container_image_platform: str=None, app_service_environment=None, **kwargs) -> None: - 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(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: str=None, error=None, **kwargs) -> None: - super(ValidateResponse, self).__init__(**kwargs) - self.status = status - self.error = error - - -class ValidateResponseError(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: str=None, message: str=None, **kwargs) -> None: - super(ValidateResponseError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class VirtualApplication(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: true if preloading is enabled; - otherwise, 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: str=None, physical_path: str=None, preload_enabled: bool=None, virtual_directories=None, **kwargs) -> None: - 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(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: str=None, physical_path: str=None, **kwargs) -> None: - super(VirtualDirectory, self).__init__(**kwargs) - self.virtual_path = virtual_path - self.physical_path = physical_path - - -class VirtualIPMapping(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: str=None, internal_http_port: int=None, internal_https_port: int=None, in_use: bool=None, service_name: str=None, **kwargs) -> None: - 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(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: str=None, **kwargs) -> None: - 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. - - 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 - :ivar type: Resource type. - :vartype type: str - :param vnet_name: The Virtual Network name. - :type vnet_name: str - :param vpn_package_uri: Required. The URI where the VPN package can be - downloaded. - :type vpn_package_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vpn_package_uri': {'required': 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, *, vpn_package_uri: str, kind: str=None, vnet_name: str=None, **kwargs) -> None: - 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: true if a resync is required; - otherwise, 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: str=None, vnet_resource_id: str=None, cert_blob: str=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: - 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: str=None, vnet_resource_group: str=None, vnet_name: str=None, vnet_subnet_name: str=None, subnet_resource_id: str=None, **kwargs) -> None: - 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: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: - 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: str=None, message: str=None, failed: bool=None, failed_tests=None, warnings=None, **kwargs) -> None: - 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: str=None, test_name: str=None, details: str=None, **kwargs) -> None: - super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) - self.test_name = test_name - self.details = details - - -class WebAppCollection(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, **kwargs) -> None: - super(WebAppCollection, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class WebAppMajorVersion(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) -> None: - super(WebAppMajorVersion, self).__init__(**kwargs) - self.display_text = None - self.value = None - self.minor_versions = None - - -class WebAppMinorVersion(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) -> None: - super(WebAppMinorVersion, self).__init__(**kwargs) - self.display_text = None - self.value = None - self.stack_settings = None - - -class WebAppRuntimes(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) -> None: - 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(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: true if remote debugging is - supported for the stack; otherwise, 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: true if the stack is in preview; otherwise, - false. - :vartype is_preview: bool - :ivar is_deprecated: true if the stack is deprecated; - otherwise, false. - :vartype is_deprecated: bool - :ivar is_hidden: true if the stack should be hidden; - otherwise, false. - :vartype is_hidden: bool - :ivar end_of_life_date: End-of-life date for the minor version. - :vartype end_of_life_date: datetime - :ivar is_auto_update: true if the stack version is - auto-updated; otherwise, false. - :vartype is_auto_update: bool - :ivar is_early_access: true if the minor version is - early-access; otherwise, 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) -> None: - 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': 'StackPreferredOs'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - 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 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': 'WebJobType'}, - 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': '{object}'}, - } - - def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: - 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 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: - :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': 'SiteRuntimeState'}, - '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: str=None, state=None, status_url: str=None, detector_url: str=None, console_url: str=None, health_check_url: str=None, containers=None, **kwargs) -> None: - 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(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: true if the stack is in preview; otherwise, - false. - :vartype is_preview: bool - :ivar is_deprecated: true if the stack is deprecated; - otherwise, false. - :vartype is_deprecated: bool - :ivar is_hidden: true if the stack should be hidden; - otherwise, false. - :vartype is_hidden: bool - :ivar end_of_life_date: End-of-life date for the minor version. - :vartype end_of_life_date: datetime - :ivar is_auto_update: true if the stack version is - auto-updated; otherwise, false. - :vartype is_auto_update: bool - :ivar is_early_access: true if the minor version is - early-access; otherwise, 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) -> None: - 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 WorkerAppsConfiguration(Model): - """Configuration required deploy Kube Environment Dedicated - to Worker Apps. - Create request is not accepted, if ArcConfiguration or AksResourceId is - provided - with WorkerAppsConfiguration. - - :param subnet_resource_id: Service Principle Secret used to provision - WorkerApps Kube Environment - VnetResource - :type subnet_resource_id: str - """ - - _attribute_map = { - 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, - } - - def __init__(self, *, subnet_resource_id: str=None, **kwargs) -> None: - super(WorkerAppsConfiguration, self).__init__(**kwargs) - self.subnet_resource_id = subnet_resource_id - - -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 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] - :param sku: - :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription - """ - - _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'}, - 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, - 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, - 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, - 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, - 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, - 'sku': {'key': 'sku', 'type': 'SkuDescription'}, - } - - def __init__(self, *, kind: str=None, worker_size_id: int=None, compute_mode=None, worker_size: str=None, worker_count: int=None, sku=None, **kwargs) -> None: - super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) - 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 - self.sku = sku diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_paged_models.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_paged_models.py deleted file mode 100644 index 015a563994f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_paged_models.py +++ /dev/null @@ -1,859 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AppServiceCertificateOrderPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateOrder]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateOrderPaged, self).__init__(*args, **kwargs) -class AppServiceCertificateResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceCertificateResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceCertificateResourcePaged, self).__init__(*args, **kwargs) -class DetectorResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorResponsePaged, self).__init__(*args, **kwargs) -class CsmOperationDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmOperationDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) -class DomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`Domain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Domain]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainPaged, self).__init__(*args, **kwargs) -class NameIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`NameIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NameIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(NameIdentifierPaged, self).__init__(*args, **kwargs) -class DomainOwnershipIdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainOwnershipIdentifierPaged, self).__init__(*args, **kwargs) -class TopLevelDomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`TopLevelDomain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopLevelDomain]'} - } - - def __init__(self, *args, **kwargs): - - super(TopLevelDomainPaged, self).__init__(*args, **kwargs) -class TldLegalAgreementPaged(Paged): - """ - A paging container for iterating over a list of :class:`TldLegalAgreement ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TldLegalAgreement]'} - } - - def __init__(self, *args, **kwargs): - - super(TldLegalAgreementPaged, self).__init__(*args, **kwargs) -class CertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`Certificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Certificate]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificatePaged, self).__init__(*args, **kwargs) -class DeletedSitePaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSite ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSite]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSitePaged, self).__init__(*args, **kwargs) -class DiagnosticCategoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiagnosticCategory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} - } - - def __init__(self, *args, **kwargs): - - super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) -class AnalysisDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`AnalysisDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) -class DetectorDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DetectorDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) -class ApplicationStackResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationStackResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationStackResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationStackResourcePaged, self).__init__(*args, **kwargs) -class FunctionAppStackPaged(Paged): - """ - A paging container for iterating over a list of :class:`FunctionAppStack ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FunctionAppStack]'} - } - - def __init__(self, *args, **kwargs): - - super(FunctionAppStackPaged, self).__init__(*args, **kwargs) -class WebAppStackPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebAppStack ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebAppStack]'} - } - - def __init__(self, *args, **kwargs): - - super(WebAppStackPaged, self).__init__(*args, **kwargs) -class RecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Recommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Recommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendationPaged, self).__init__(*args, **kwargs) -class SourceControlPaged(Paged): - """ - A paging container for iterating over a list of :class:`SourceControl ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SourceControl]'} - } - - def __init__(self, *args, **kwargs): - - super(SourceControlPaged, self).__init__(*args, **kwargs) -class BillingMeterPaged(Paged): - """ - A paging container for iterating over a list of :class:`BillingMeter ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BillingMeter]'} - } - - def __init__(self, *args, **kwargs): - - super(BillingMeterPaged, self).__init__(*args, **kwargs) -class GeoRegionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoRegion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoRegion]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoRegionPaged, self).__init__(*args, **kwargs) -class IdentifierPaged(Paged): - """ - A paging container for iterating over a list of :class:`Identifier ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Identifier]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentifierPaged, self).__init__(*args, **kwargs) -class PremierAddOnOfferPaged(Paged): - """ - A paging container for iterating over a list of :class:`PremierAddOnOffer ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PremierAddOnOffer]'} - } - - def __init__(self, *args, **kwargs): - - super(PremierAddOnOfferPaged, self).__init__(*args, **kwargs) -class SitePaged(Paged): - """ - A paging container for iterating over a list of :class:`Site ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Site]'} - } - - def __init__(self, *args, **kwargs): - - super(SitePaged, self).__init__(*args, **kwargs) -class BackupItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupItem]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupItemPaged, self).__init__(*args, **kwargs) -class SiteConfigResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigResourcePaged, self).__init__(*args, **kwargs) -class ApiKVReferencePaged(Paged): - """ - A paging container for iterating over a list of :class:`ApiKVReference ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApiKVReference]'} - } - - def __init__(self, *args, **kwargs): - - super(ApiKVReferencePaged, self).__init__(*args, **kwargs) -class SiteConfigurationSnapshotInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteConfigurationSnapshotInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteConfigurationSnapshotInfoPaged, self).__init__(*args, **kwargs) -class ContinuousWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`ContinuousWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContinuousWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(ContinuousWebJobPaged, self).__init__(*args, **kwargs) -class DeploymentPaged(Paged): - """ - A paging container for iterating over a list of :class:`Deployment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Deployment]'} - } - - def __init__(self, *args, **kwargs): - - super(DeploymentPaged, self).__init__(*args, **kwargs) -class FunctionEnvelopePaged(Paged): - """ - A paging container for iterating over a list of :class:`FunctionEnvelope ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FunctionEnvelope]'} - } - - def __init__(self, *args, **kwargs): - - super(FunctionEnvelopePaged, self).__init__(*args, **kwargs) -class HostNameBindingPaged(Paged): - """ - A paging container for iterating over a list of :class:`HostNameBinding ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HostNameBinding]'} - } - - def __init__(self, *args, **kwargs): - - super(HostNameBindingPaged, self).__init__(*args, **kwargs) -class WebSiteInstanceStatusPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebSiteInstanceStatus ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebSiteInstanceStatus]'} - } - - def __init__(self, *args, **kwargs): - - super(WebSiteInstanceStatusPaged, self).__init__(*args, **kwargs) -class ProcessInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessInfoPaged, self).__init__(*args, **kwargs) -class ProcessModuleInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessModuleInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessModuleInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessModuleInfoPaged, self).__init__(*args, **kwargs) -class ProcessThreadInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProcessThreadInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProcessThreadInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(ProcessThreadInfoPaged, self).__init__(*args, **kwargs) -class PerfMonResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`PerfMonResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerfMonResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(PerfMonResponsePaged, self).__init__(*args, **kwargs) -class RemotePrivateEndpointConnectionARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`RemotePrivateEndpointConnectionARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RemotePrivateEndpointConnectionARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(RemotePrivateEndpointConnectionARMResourcePaged, self).__init__(*args, **kwargs) -class PublicCertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`PublicCertificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} - } - - def __init__(self, *args, **kwargs): - - super(PublicCertificatePaged, self).__init__(*args, **kwargs) -class SiteExtensionInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SiteExtensionInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SiteExtensionInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SiteExtensionInfoPaged, self).__init__(*args, **kwargs) -class SlotDifferencePaged(Paged): - """ - A paging container for iterating over a list of :class:`SlotDifference ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SlotDifference]'} - } - - def __init__(self, *args, **kwargs): - - super(SlotDifferencePaged, self).__init__(*args, **kwargs) -class SnapshotPaged(Paged): - """ - A paging container for iterating over a list of :class:`Snapshot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Snapshot]'} - } - - def __init__(self, *args, **kwargs): - - super(SnapshotPaged, self).__init__(*args, **kwargs) -class TriggeredWebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredWebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredWebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredWebJobPaged, self).__init__(*args, **kwargs) -class TriggeredJobHistoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggeredJobHistory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggeredJobHistory]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggeredJobHistoryPaged, self).__init__(*args, **kwargs) -class CsmUsageQuotaPaged(Paged): - """ - A paging container for iterating over a list of :class:`CsmUsageQuota ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CsmUsageQuota]'} - } - - def __init__(self, *args, **kwargs): - - super(CsmUsageQuotaPaged, self).__init__(*args, **kwargs) -class WebJobPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebJob ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebJob]'} - } - - def __init__(self, *args, **kwargs): - - super(WebJobPaged, self).__init__(*args, **kwargs) -class StaticSiteARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteUserARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteUserARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteUserARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteUserARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteBuildARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteBuildARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteBuildARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteFunctionOverviewARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteFunctionOverviewARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteFunctionOverviewARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteUserProvidedFunctionAppARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteUserProvidedFunctionAppARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteUserProvidedFunctionAppARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteUserProvidedFunctionAppARMResourcePaged, self).__init__(*args, **kwargs) -class StaticSiteCustomDomainOverviewARMResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`StaticSiteCustomDomainOverviewARMResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'} - } - - def __init__(self, *args, **kwargs): - - super(StaticSiteCustomDomainOverviewARMResourcePaged, self).__init__(*args, **kwargs) -class AppServiceEnvironmentResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServiceEnvironmentResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServiceEnvironmentResourcePaged, self).__init__(*args, **kwargs) -class StampCapacityPaged(Paged): - """ - A paging container for iterating over a list of :class:`StampCapacity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StampCapacity]'} - } - - def __init__(self, *args, **kwargs): - - super(StampCapacityPaged, self).__init__(*args, **kwargs) -class InboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`InboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(InboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class WorkerPoolResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkerPoolResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkerPoolResource]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkerPoolResourcePaged, self).__init__(*args, **kwargs) -class ResourceMetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceMetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceMetricDefinitionPaged, self).__init__(*args, **kwargs) -class SkuInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`SkuInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SkuInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(SkuInfoPaged, self).__init__(*args, **kwargs) -class UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) -class OutboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class AppServicePlanPaged(Paged): - """ - A paging container for iterating over a list of :class:`AppServicePlan ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AppServicePlan]'} - } - - def __init__(self, *args, **kwargs): - - super(AppServicePlanPaged, self).__init__(*args, **kwargs) -class StrPaged(Paged): - """ - A paging container for iterating over a list of str object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } - - def __init__(self, *args, **kwargs): - - super(StrPaged, self).__init__(*args, **kwargs) -class HybridConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`HybridConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HybridConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(HybridConnectionPaged, self).__init__(*args, **kwargs) -class ResourceHealthMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) -class KubeEnvironmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`KubeEnvironment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KubeEnvironment]'} - } - - def __init__(self, *args, **kwargs): - - super(KubeEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_web_site_management_client_enums.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_web_site_management_client_enums.py deleted file mode 100644 index 9e91f3368f6..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/models/_web_site_management_client_enums.py +++ /dev/null @@ -1,725 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class KeyVaultSecretStatus(str, Enum): - - 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 CertificateProductType(str, Enum): - - standard_domain_validated_ssl = "StandardDomainValidatedSsl" - standard_domain_validated_wild_card_ssl = "StandardDomainValidatedWildCardSsl" - - -class ProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - in_progress = "InProgress" - deleting = "Deleting" - - -class CertificateOrderStatus(str, Enum): - - pendingissuance = "Pendingissuance" - issued = "Issued" - revoked = "Revoked" - canceled = "Canceled" - denied = "Denied" - pendingrevocation = "Pendingrevocation" - pending_rekey = "PendingRekey" - unused = "Unused" - expired = "Expired" - not_submitted = "NotSubmitted" - - -class CertificateOrderActionType(str, Enum): - - 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 RouteType(str, Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - -class InsightStatus(str, Enum): - - critical = "Critical" - warning = "Warning" - info = "Info" - success = "Success" - none = "None" - - -class RenderingType(str, Enum): - - 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 DetectorType(str, Enum): - - detector = "Detector" - analysis = "Analysis" - category_overview = "CategoryOverview" - - -class ManagedServiceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned, UserAssigned" - none = "None" - - -class IpFilterTag(str, Enum): - - default = "Default" - xff_proxy = "XffProxy" - service_tag = "ServiceTag" - - -class AutoHealActionType(str, Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(str, Enum): - - 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 AzureStorageType(str, Enum): - - azure_files = "AzureFiles" - azure_blob = "AzureBlob" - - -class AzureStorageState(str, Enum): - - ok = "Ok" - invalid_credentials = "InvalidCredentials" - invalid_share = "InvalidShare" - not_validated = "NotValidated" - - -class ScmType(str, Enum): - - 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 ManagedPipelineMode(str, Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(str, Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - per_site_round_robin = "PerSiteRoundRobin" - - -class SupportedTlsVersions(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_one = "1.1" - one_full_stop_two = "1.2" - - -class FtpsState(str, Enum): - - all_allowed = "AllAllowed" - ftps_only = "FtpsOnly" - disabled = "Disabled" - - -class SslState(str, Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(str, Enum): - - standard = "Standard" - repository = "Repository" - - -class UsageState(str, Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(str, Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class ClientCertMode(str, Enum): - - required = "Required" - optional = "Optional" - optional_interactive_user = "OptionalInteractiveUser" - - -class RedundancyMode(str, Enum): - - none = "None" - manual = "Manual" - failover = "Failover" - active_active = "ActiveActive" - geo_redundant = "GeoRedundant" - - -class StatusOptions(str, Enum): - - ready = "Ready" - pending = "Pending" - creating = "Creating" - - -class DomainStatus(str, Enum): - - 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 AzureResourceType(str, Enum): - - website = "Website" - traffic_manager = "TrafficManager" - - -class CustomHostNameDnsRecordType(str, Enum): - - cname = "CName" - a = "A" - - -class HostNameType(str, Enum): - - verified = "Verified" - managed = "Managed" - - -class DnsType(str, Enum): - - azure_dns = "AzureDns" - default_domain_registrar_dns = "DefaultDomainRegistrarDns" - - -class DomainType(str, Enum): - - regular = "Regular" - soft_deleted = "SoftDeleted" - - -class HostingEnvironmentStatus(str, Enum): - - preparing = "Preparing" - ready = "Ready" - scaling = "Scaling" - deleting = "Deleting" - - -class LoadBalancingMode(str, Enum): - - none = "None" - web = "Web" - publishing = "Publishing" - web_publishing = "Web, Publishing" - - -class OperationStatus(str, Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" - - -class IssueType(str, Enum): - - 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 SolutionType(str, Enum): - - quick_solution = "QuickSolution" - deep_investigation = "DeepInvestigation" - best_practices = "BestPractices" - - -class StackPreferredOs(str, Enum): - - windows = "Windows" - linux = "Linux" - - -class ResourceScopeType(str, Enum): - - server_farm = "ServerFarm" - subscription = "Subscription" - web_site = "WebSite" - - -class NotificationLevel(str, Enum): - - critical = "Critical" - warning = "Warning" - information = "Information" - non_urgent_suggestion = "NonUrgentSuggestion" - - -class Channels(str, Enum): - - notification = "Notification" - api = "Api" - email = "Email" - webhook = "Webhook" - all = "All" - - -class AppServicePlanRestrictions(str, Enum): - - none = "None" - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" - - -class InAvailabilityReasonType(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" - - -class CheckNameResourceTypes(str, Enum): - - site = "Site" - slot = "Slot" - hosting_environment = "HostingEnvironment" - publishing_user = "PublishingUser" - microsoft_websites = "Microsoft.Web/sites" - microsoft_websitesslots = "Microsoft.Web/sites/slots" - microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" - microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" - - -class ValidateResourceTypes(str, Enum): - - server_farm = "ServerFarm" - site = "Site" - microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" - - -class ResolveStatus(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 ConfigReferenceSource(str, Enum): - - key_vault = "KeyVault" - - -class LogLevel(str, Enum): - - off = "Off" - verbose = "Verbose" - information = "Information" - warning = "Warning" - error = "Error" - - -class BackupItemStatus(str, Enum): - - 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 DatabaseType(str, Enum): - - sql_azure = "SqlAzure" - my_sql = "MySql" - local_my_sql = "LocalMySql" - postgre_sql = "PostgreSql" - - -class FrequencyUnit(str, Enum): - - day = "Day" - hour = "Hour" - - -class ContinuousWebJobStatus(str, Enum): - - initializing = "Initializing" - starting = "Starting" - running = "Running" - pending_restart = "PendingRestart" - stopped = "Stopped" - - -class WebJobType(str, Enum): - - continuous = "Continuous" - triggered = "Triggered" - - -class CookieExpirationConvention(str, Enum): - - fixed_time = "FixedTime" - identity_provider_derived = "IdentityProviderDerived" - - -class PublishingProfileFormat(str, Enum): - - file_zilla3 = "FileZilla3" - web_deploy = "WebDeploy" - ftp = "Ftp" - - -class DnsVerificationTestResult(str, Enum): - - passed = "Passed" - failed = "Failed" - skipped = "Skipped" - - -class ClientCredentialMethod(str, Enum): - - client_secret_post = "ClientSecretPost" - - -class ForwardProxyConvention(str, Enum): - - no_proxy = "NoProxy" - standard = "Standard" - custom = "Custom" - - -class UnauthenticatedClientActionV2(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - return401 = "Return401" - return403 = "Return403" - - -class MSDeployLogEntryType(str, Enum): - - message = "Message" - warning = "Warning" - error = "Error" - - -class MSDeployProvisioningState(str, Enum): - - accepted = "accepted" - running = "running" - succeeded = "succeeded" - failed = "failed" - canceled = "canceled" - - -class MySqlMigrationType(str, Enum): - - local_to_remote = "LocalToRemote" - remote_to_local = "RemoteToLocal" - - -class PublicCertificateLocation(str, Enum): - - current_user_my = "CurrentUserMy" - local_machine_my = "LocalMachineMy" - unknown = "Unknown" - - -class BackupRestoreOperationType(str, Enum): - - default = "Default" - clone = "Clone" - relocation = "Relocation" - snapshot = "Snapshot" - cloud_fs = "CloudFS" - - -class UnauthenticatedClientAction(str, Enum): - - redirect_to_login_page = "RedirectToLoginPage" - allow_anonymous = "AllowAnonymous" - - -class BuiltInAuthenticationProvider(str, Enum): - - azure_active_directory = "AzureActiveDirectory" - facebook = "Facebook" - google = "Google" - microsoft_account = "MicrosoftAccount" - twitter = "Twitter" - github = "Github" - - -class CloneAbilityResult(str, Enum): - - cloneable = "Cloneable" - partially_cloneable = "PartiallyCloneable" - not_cloneable = "NotCloneable" - - -class SiteExtensionType(str, Enum): - - gallery = "Gallery" - web_root = "WebRoot" - - -class TriggeredWebJobStatus(str, Enum): - - success = "Success" - failed = "Failed" - error = "Error" - - -class SiteRuntimeState(str, Enum): - - ready = "READY" - stopped = "STOPPED" - unknown = "UNKNOWN" - - -class BuildStatus(str, Enum): - - waiting_for_deployment = "WaitingForDeployment" - uploading = "Uploading" - deploying = "Deploying" - ready = "Ready" - failed = "Failed" - deleting = "Deleting" - detached = "Detached" - - -class CustomDomainStatus(str, Enum): - - retrieving_validation_token = "RetrievingValidationToken" - validating = "Validating" - adding = "Adding" - ready = "Ready" - failed = "Failed" - deleting = "Deleting" - - -class TriggerTypes(str, Enum): - - http_trigger = "HttpTrigger" - unknown = "Unknown" - - -class ComputeModeOptions(str, Enum): - - shared = "Shared" - dedicated = "Dedicated" - dynamic = "Dynamic" - - -class WorkerSizeOptions(str, Enum): - - 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" - - -class StorageType(str, Enum): - - local_node = "LocalNode" - network_file_system = "NetworkFileSystem" - - -class FrontEndServiceType(str, Enum): - - node_port = "NodePort" - load_balancer = "LoadBalancer" - - -class KubeEnvironmentProvisioningState(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - waiting = "Waiting" - initialization_in_progress = "InitializationInProgress" - infrastructure_setup_in_progress = "InfrastructureSetupInProgress" - infrastructure_setup_complete = "InfrastructureSetupComplete" - scheduled_for_delete = "ScheduledForDelete" - upgrade_requested = "UpgradeRequested" - upgrade_failed = "UpgradeFailed" - aks_provision_complete = "AKSProvisionComplete" - - -class SkuName(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" diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/__init__.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/__init__.py deleted file mode 100644 index 491765ec4dc..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._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 GlobalModelOperations -from ._provider_operations import ProviderOperations -from ._recommendations_operations import RecommendationsOperations -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 -from ._kube_environments_operations import KubeEnvironmentsOperations -from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin - -__all__ = [ - 'AppServiceCertificateOrdersOperations', - 'CertificateOrdersDiagnosticsOperations', - 'CertificateRegistrationProviderOperations', - 'DomainsOperations', - 'TopLevelDomainsOperations', - 'DomainRegistrationProviderOperations', - 'CertificatesOperations', - 'DeletedWebAppsOperations', - 'DiagnosticsOperations', - 'GlobalModelOperations', - 'ProviderOperations', - 'RecommendationsOperations', - 'WebAppsOperations', - 'StaticSitesOperations', - 'AppServiceEnvironmentsOperations', - 'AppServicePlansOperations', - 'ResourceHealthMetadataOperations', - 'KubeEnvironmentsOperations', - 'WebSiteManagementClientOperationsMixin', -] diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_certificate_orders_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_certificate_orders_operations.py deleted file mode 100644 index 003eabf50ce..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_certificate_orders_operations.py +++ /dev/null @@ -1,1423 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceCertificateOrdersOperations(object): - """AppServiceCertificateOrdersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all certificate orders in a subscription. - - Description for List all certificate orders in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def validate_purchase_information( - self, app_service_certificate_order, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate_purchase_information.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateOrder - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateOrderPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} - - def get( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - - def _create_or_update_initial( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateOrder or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def delete( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateOrder or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} - - def list_certificates( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceCertificateResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_certificates.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceCertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} - - def get_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - - def _create_or_update_certificate_initial( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceCertificateResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def delete_certificate( - self, resource_group_name, certificate_order_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceCertificateResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_certificate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} - - def reissue( - self, resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reissue.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} - - def renew( - self, resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} - - def resend_email( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.resend_email.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} - - def resend_request_emails( - self, resource_group_name, certificate_order_name, name=None, custom_headers=None, raw=False, **operation_config): - """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: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.resend_request_emails.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} - - def retrieve_site_seal( - self, resource_group_name, certificate_order_name, light_theme=None, locale=None, custom_headers=None, raw=False, **operation_config): - """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 light_theme: If 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSeal or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSeal or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) - - # Construct URL - url = self.retrieve_site_seal.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSeal', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} - - def verify_domain_ownership( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_domain_ownership.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} - - def retrieve_certificate_actions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2020_12_01.models.CertificateOrderAction] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_actions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateOrderAction]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} - - def retrieve_certificate_email_history( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.CertificateEmail] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.retrieve_certificate_email_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[CertificateEmail]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_environments_operations.py deleted file mode 100644 index a77a02c67a9..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_environments_operations.py +++ /dev/null @@ -1,3425 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServiceEnvironmentsOperations(object): - """AppServiceEnvironmentsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all App Service Environments for a subscription. - - Description for Get all App Service Environments for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServiceEnvironmentResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServiceEnvironmentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - AppServiceEnvironmentResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - hosting_environment_envelope=hosting_environment_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - - def _delete_initial( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if force_delete is not None: - query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 true to force the deletion - even if the App Service Environment contains resources. The default is - false. - :type force_delete: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - force_delete=force_delete, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServiceEnvironmentResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} - - def list_capacities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StampCapacity - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StampCapacityPaged[~azure.mgmt.web.v2020_12_01.models.StampCapacity] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_capacities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StampCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} - - def get_vip_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AddressResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AddressResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vip_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AddressResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} - - - def _change_vnet_initial( - self, resource_group_name, name, id, subnet=None, custom_headers=None, raw=False, **operation_config): - vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) - - # Construct URL - url = self.change_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def change_vnet( - self, resource_group_name, name, id, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 id: Resource id of the Virtual Network. - :type id: str - :param subnet: Subnet within the Virtual Network. - :type subnet: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._change_vnet_initial( - resource_group_name=resource_group_name, - name=name, - id=id, - subnet=subnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} - - def get_ase_v3_networking_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AseV3NetworkingConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ase_v3_networking_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AseV3NetworkingConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} - - def update_ase_networking_configuration( - self, resource_group_name, name, kind=None, allow_new_private_endpoint_connections=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AseV3NetworkingConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - ase_networking_configuration = models.AseV3NetworkingConfiguration(kind=kind, allow_new_private_endpoint_connections=allow_new_private_endpoint_connections) - - # Construct URL - url = self.update_ase_networking_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AseV3NetworkingConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} - - def list_diagnostics( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDiagnostics] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_diagnostics.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} - - def get_diagnostics_item( - self, resource_group_name, name, diagnostics_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostingEnvironmentDiagnostics or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDiagnostics or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostics_item.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostingEnvironmentDiagnostics', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} - - def get_inbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of InboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_inbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.InboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} - - def list_multi_role_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} - - def get_multi_role_pool( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - - def _create_or_update_multi_role_pool_initial( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_multi_role_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} - - def list_multi_role_pool_instance_metric_definitions( - self, resource_group_name, name, instance, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} - - def list_multi_role_metric_definitions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} - - def list_multi_role_pool_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} - - def list_multi_role_usages( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2020_12_01.models.UsagePaged[~azure.mgmt.web.v2020_12_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_multi_role_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} - - def list_operations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.Operation] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_operations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Operation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} - - def get_outbound_network_dependencies_endpoints( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpoint] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_outbound_network_dependencies_endpoints.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} - - def get_private_endpoint_connection_list( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - RemotePrivateEndpointConnectionARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_private_endpoint_connection_list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RemotePrivateEndpointConnectionARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} - - def get_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RemotePrivateEndpointConnectionARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _approve_or_reject_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.approve_or_reject_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def approve_or_reject_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - RemotePrivateEndpointConnectionARMResource or - ClientRawResponse if - raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - kind=kind, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 202: - deserialized = self._deserialize('object', response) - if response.status_code == 204: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_private_endpoint_connection_initial( - resource_group_name=resource_group_name, - name=name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def get_private_link_resources( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_link_resources.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} - - def reboot( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reboot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} - - - def _resume_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.resume.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def resume( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._resume_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} - - def list_app_service_plans( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_app_service_plans.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} - - def list_web_apps( - self, resource_group_name, name, properties_to_include=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} - - - def _suspend_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.suspend.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def suspend( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WebAppCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._suspend_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebAppCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} - - def list_worker_pools( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkerPoolResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResourcePaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pools.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkerPoolResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} - - def get_worker_pool( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - - def _create_or_update_worker_pool_initial( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns WorkerPoolResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkerPoolResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_worker_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} - - def list_worker_pool_instance_metric_definitions( - self, resource_group_name, name, worker_pool_name, instance, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_instance_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} - - def list_web_worker_metric_definitions( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_metric_definitions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} - - def list_worker_pool_skus( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SkuInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SkuInfoPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_worker_pool_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SkuInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} - - def list_web_worker_usages( - self, resource_group_name, name, worker_pool_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Usage - :rtype: - ~azure.mgmt.web.v2020_12_01.models.UsagePaged[~azure.mgmt.web.v2020_12_01.models.Usage] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_worker_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_plans_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_plans_operations.py deleted file mode 100644 index 37307d6e85e..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_app_service_plans_operations.py +++ /dev/null @@ -1,1946 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AppServicePlansOperations(object): - """AppServicePlansOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, detailed=None, custom_headers=None, raw=False, **operation_config): - """Get all App Service plans for a subscription. - - Description for Get all App Service plans for a subscription. - - :param detailed: Specify true to return all App Service - plan properties. The default is false, which returns a - subset of the properties. - Retrieval of all properties may increase the API latency. - :type detailed: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AppServicePlan - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AppServicePlanPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AppServicePlanPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlan') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AppServicePlan or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.AppServicePlan]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - app_service_plan=app_service_plan, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppServicePlan or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} - - def list_capabilities( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.Capability] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_capabilities.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Capability]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnectionKey or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connection_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} - - def list_web_apps_by_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of str - :rtype: ~azure.mgmt.web.v2020_12_01.models.StrPaged[str] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps_by_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StrPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} - - def get_hybrid_connection_plan_limit( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnectionLimits or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnectionLimits or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_plan_limit.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionLimits', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HybridConnection - :rtype: - ~azure.mgmt.web.v2020_12_01.models.HybridConnectionPaged[~azure.mgmt.web.v2020_12_01.models.HybridConnection] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} - - def restart_web_apps( - self, resource_group_name, name, soft_restart=None, custom_headers=None, raw=False, **operation_config): - """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 true to perform a soft - restart, applies the configuration settings and restarts the apps if - necessary. The default is false, which always restarts - and reprovisions the apps - :type soft_restart: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if soft_restart is not None: - query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} - - def list_web_apps( - self, resource_group_name, name, skip_token=None, filter=None, top=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_apps.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} - - def get_server_farm_skus( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_server_farm_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} - - def list_vnets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} - - def get_vnet_from_server_farm( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_from_server_farm.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_routes_for_vnet( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_routes_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} - - def get_route_for_vnet( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_route_for_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetRoute]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def create_or_update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def delete_vnet_route( - self, resource_group_name, name, vnet_name, route_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def update_vnet_route( - self, resource_group_name, name, vnet_name, route_name, route, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetRoute or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetRoute or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_route.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(route, 'VnetRoute') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetRoute', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} - - def reboot_worker( - self, resource_group_name, name, worker_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reboot_worker.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py deleted file mode 100644 index 9d59739c7da..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py +++ /dev/null @@ -1,197 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificateOrdersDiagnosticsOperations(object): - """CertificateOrdersDiagnosticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list_app_service_certificate_order_detector_response( - self, resource_group_name, certificate_order_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_app_service_certificate_order_detector_response.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} - - def get_app_service_certificate_order_detector_response( - self, resource_group_name, certificate_order_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: The end time for the detector response. - :type end_time: datetime - :param time_grain: The time grain for the detector response. - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_app_service_certificate_order_detector_response.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_registration_provider_operations.py deleted file mode 100644 index 15f5e923a0d..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificate_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificateRegistrationProviderOperations(object): - """CertificateRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificates_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificates_operations.py deleted file mode 100644 index e955b3043ce..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_certificates_operations.py +++ /dev/null @@ -1,442 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificatesOperations(object): - """CertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CertificatePaged[~azure.mgmt.web.v2020_12_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CertificatePaged[~azure.mgmt.web.v2020_12_01.models.Certificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def create_or_update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'Certificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} - - def update( - self, resource_group_name, name, certificate_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_deleted_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_deleted_web_apps_operations.py deleted file mode 100644 index d271680b98d..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_deleted_web_apps_operations.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DeletedWebAppsOperations(object): - """DeletedWebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all deleted apps for a subscription. - - Description for Get all deleted apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_12_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DeletedSite - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DeletedSitePaged[~azure.mgmt.web.v2020_12_01.models.DeletedSite] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} - - def get_deleted_web_app_by_location( - self, location, deleted_site_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeletedSite or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DeletedSite or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deleted_web_app_by_location.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeletedSite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_diagnostics_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_diagnostics_operations.py deleted file mode 100644 index faaeb59232c..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_diagnostics_operations.py +++ /dev/null @@ -1,1713 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DiagnosticsOperations(object): - """DiagnosticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list_hosting_environment_detector_responses( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_hosting_environment_detector_responses.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} - - def get_hosting_environment_detector_response( - self, resource_group_name, name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hosting_environment_detector_response.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} - - def list_site_detector_responses( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} - - def get_site_detector_response( - self, resource_group_name, site_name, detector_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} - - def list_site_diagnostic_categories( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} - - def get_site_diagnostic_category( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AnalysisDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AnalysisDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis( - self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors( - self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector( - self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector( - self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} - - def list_site_detector_responses_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorResponse - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DetectorResponsePaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detector_responses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} - - def get_site_detector_response_slot( - self, resource_group_name, site_name, detector_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_response_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} - - def list_site_diagnostic_categories_slot( - self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticCategory - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_diagnostic_categories_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} - - def get_site_diagnostic_category_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticCategory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_diagnostic_category_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticCategory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} - - def list_site_analyses_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AnalysisDefinition - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_analyses_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} - - def get_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AnalysisDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_analysis_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AnalysisDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} - - def execute_site_analysis_slot( - self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticAnalysis or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysis or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_analysis_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticAnalysis', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} - - def list_site_detectors_slot( - self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DetectorDefinition - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DetectorDefinitionPaged[~azure.mgmt.web.v2020_12_01.models.DetectorDefinition] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_detectors_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} - - def get_site_detector_slot( - self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DetectorDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_detector_slot.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DetectorDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} - - def execute_site_detector_slot( - self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): - """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 - :param end_time: End Time - :type end_time: datetime - :param time_grain: Time Grain - :type time_grain: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorResponse - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.execute_site_detector_slot.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticDetectorResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domain_registration_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domain_registration_provider_operations.py deleted file mode 100644 index 702f153d66d..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domain_registration_provider_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DomainRegistrationProviderOperations(object): - """DomainRegistrationProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domains_operations.py deleted file mode 100644 index 8828b84578f..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_domains_operations.py +++ /dev/null @@ -1,1090 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DomainsOperations(object): - """DomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def check_availability( - self, name=None, custom_headers=None, raw=False, **operation_config): - """Check if a domain is available for registration. - - Description for Check if a domain is available for registration. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainAvailabilityCheckResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DomainAvailabilityCheckResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - identifier = models.NameIdentifier(name=name) - - # Construct URL - url = self.check_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainAvailabilityCheckResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all domains in a subscription. - - Description for Get all domains in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DomainPaged[~azure.mgmt.web.v2020_12_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} - - def get_control_center_sso_request( - self, custom_headers=None, raw=False, **operation_config): - """Generate a single sign-on request for the domain management portal. - - Description for Generate a single sign-on request for the domain - management portal. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainControlCenterSsoRequest or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DomainControlCenterSsoRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_control_center_sso_request.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainControlCenterSsoRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} - - def list_recommendations( - self, keywords=None, max_domain_recommendations=None, custom_headers=None, raw=False, **operation_config): - """Get domain name recommendations based on keywords. - - Description for Get domain name recommendations based on keywords. - - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NameIdentifier - :rtype: - ~azure.mgmt.web.v2020_12_01.models.NameIdentifierPaged[~azure.mgmt.web.v2020_12_01.models.NameIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommendations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.NameIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DomainPaged[~azure.mgmt.web.v2020_12_01.models.Domain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} - - def get( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - - def _create_or_update_initial( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'Domain') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.Domain]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - domain=domain, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def delete( - self, resource_group_name, domain_name, force_hard_delete_domain=None, custom_headers=None, raw=False, **operation_config): - """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 true to delete - the domain immediately. The default is false which - deletes the domain after 24 hours. - :type force_hard_delete_domain: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain, 'DomainPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} - - def list_ownership_identifiers( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DomainOwnershipIdentifier - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_ownership_identifiers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DomainOwnershipIdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} - - def get_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def create_or_update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.create_or_update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def delete_ownership_identifier( - self, resource_group_name, domain_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def update_ownership_identifier( - self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param ownership_id: Ownership Id. - :type ownership_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) - - # Construct URL - url = self.update_ownership_identifier.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DomainOwnershipIdentifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} - - def renew( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.renew.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_global_model_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_global_model_operations.py deleted file mode 100644 index 8d6b5e36939..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_global_model_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class GlobalModelOperations(object): - """GlobalModelOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def get_deleted_web_app( - self, deleted_site_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeletedSite or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DeletedSite or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deleted_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeletedSite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} - - def get_deleted_web_app_snapshots( - self, deleted_site_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.Snapshot] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deleted_web_app_snapshots.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[Snapshot]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} - - def get_subscription_operation_with_async_response( - self, location, operation_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_subscription_operation_with_async_response.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_kube_environments_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_kube_environments_operations.py deleted file mode 100644 index 856c9b72927..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_kube_environments_operations.py +++ /dev/null @@ -1,501 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class KubeEnvironmentsOperations(object): - """KubeEnvironmentsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Get all Kubernetes Environments for a subscription. - - Description for Get all Kubernetes Environments for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of KubeEnvironment - :rtype: - ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2020_12_01.models.KubeEnvironment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.KubeEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all the Kubernetes Environments in a resource group. - - Description for Get all the Kubernetes Environments in a resource - group. - - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of KubeEnvironment - :rtype: - ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentPaged[~azure.mgmt.web.v2020_12_01.models.KubeEnvironment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.KubeEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get the properties of a Kubernetes Environment. - - Description for Get the properties of a Kubernetes 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 Kubernetes Environment. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KubeEnvironment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.KubeEnvironment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} - - - def _create_initial( - self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironment', response) - if response.status_code == 201: - deserialized = self._deserialize('KubeEnvironment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """Create a Kubernetes Environment. - - Description for Create a Kubernetes 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 Kubernetes Environment. - :type name: str - :param kube_environment_envelope: Configuration details of the - Kubernetes Environment. - :type kube_environment_envelope: - ~azure.mgmt.web.v2020_12_01.models.KubeEnvironment - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns KubeEnvironment or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.KubeEnvironment] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.KubeEnvironment]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - name=name, - kube_environment_envelope=kube_environment_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('KubeEnvironment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} - - - def _delete_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a Kubernetes Environment. - - Description for Delete a Kubernetes 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 Kubernetes Environment. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} - - def update( - self, resource_group_name, name, kube_environment_envelope, custom_headers=None, raw=False, **operation_config): - """Updates a Kubernetes Environment. - - Description for Updates a Kubernetes 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 Kubernetes Environment. - :type name: str - :param kube_environment_envelope: Configuration details of the - Kubernetes Environment. - :type kube_environment_envelope: - ~azure.mgmt.web.v2020_12_01.models.KubeEnvironment - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KubeEnvironment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.KubeEnvironment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KubeEnvironment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_provider_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_provider_operations.py deleted file mode 100644 index e80a05e1c65..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_provider_operations.py +++ /dev/null @@ -1,533 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProviderOperations(object): - """ProviderOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def get_available_stacks( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Description for Get available application frameworks and their - versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions', 'All' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStackResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks.metadata['url'] - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} - - def get_function_app_stacks( - self, stack_os_type=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values include: - 'Windows', 'Linux', 'All' - :type stack_os_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionAppStack - :rtype: - ~azure.mgmt.web.v2020_12_01.models.FunctionAppStackPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStack] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_function_app_stacks.metadata['url'] - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionAppStackPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} - - def get_function_app_stacks_for_location( - self, location, stack_os_type=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values include: - 'Windows', 'Linux', 'All' - :type stack_os_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionAppStack - :rtype: - ~azure.mgmt.web.v2020_12_01.models.FunctionAppStackPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStack] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_function_app_stacks_for_location.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionAppStackPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} - - def get_web_app_stacks_for_location( - self, location, stack_os_type=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values include: - 'Windows', 'Linux', 'All' - :type stack_os_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebAppStack - :rtype: - ~azure.mgmt.web.v2020_12_01.models.WebAppStackPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStack] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_web_app_stacks_for_location.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebAppStackPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """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. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmOperationDescription - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmOperationDescriptionPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationDescription] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} - - def get_web_app_stacks( - self, stack_os_type=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values include: - 'Windows', 'Linux', 'All' - :type stack_os_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebAppStack - :rtype: - ~azure.mgmt.web.v2020_12_01.models.WebAppStackPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStack] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_web_app_stacks.metadata['url'] - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebAppStackPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} - - def get_available_stacks_on_prem( - self, os_type_selected=None, custom_headers=None, raw=False, **operation_config): - """Get available application frameworks and their versions. - - Description for Get available application frameworks and their - versions. - - :param os_type_selected: Possible values include: 'Windows', 'Linux', - 'WindowsFunctions', 'LinuxFunctions', 'All' - :type os_type_selected: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationStackResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ApplicationStackResourcePaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_available_stacks_on_prem.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApplicationStackResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_recommendations_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_recommendations_operations.py deleted file mode 100644 index 5344c19e581..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_recommendations_operations.py +++ /dev/null @@ -1,1070 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class RecommendationsOperations(object): - """RecommendationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """List all recommendations for a subscription. - - Description for List all recommendations for a subscription. - - :param featured: Specify true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} - - def reset_all_filters( - self, custom_headers=None, raw=False, **operation_config): - """Reset all recommendation opt-out settings for a subscription. - - Description for Reset all recommendation opt-out settings for a - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} - - def disable_recommendation_for_subscription( - self, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_subscription.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} - - def list_history_for_hosting_environment( - self, resource_group_name, hosting_environment_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} - - def list_recommended_rules_for_hosting_environment( - self, resource_group_name, hosting_environment_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} - - def disable_all_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_all_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} - - def reset_all_filters_for_hosting_environment( - self, resource_group_name, environment_name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters_for_hosting_environment.metadata['url'] - 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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} - - def get_rule_details_by_hosting_environment( - self, resource_group_name, hosting_environment_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_hosting_environment.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} - - def disable_recommendation_for_hosting_environment( - self, resource_group_name, environment_name, name, hosting_environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_hosting_environment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} - - def list_history_for_web_app( - self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 false to return all - recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_history_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} - - def list_recommended_rules_for_web_app( - self, resource_group_name, site_name, featured=None, filter=None, custom_headers=None, raw=False, **operation_config): - """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 true to return only the most - critical recommendations. The default is 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Recommendation - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RecommendationPaged[~azure.mgmt.web.v2020_12_01.models.Recommendation] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_recommended_rules_for_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} - - def disable_all_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_all_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} - - def reset_all_filters_for_web_app( - self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_all_filters_for_web_app.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} - - def get_rule_details_by_web_app( - self, resource_group_name, site_name, name, update_seen=None, recommendation_id=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.RecommendationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_rule_details_by_web_app.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} - - def disable_recommendation_for_site( - self, resource_group_name, site_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.disable_recommendation_for_site.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_resource_health_metadata_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_resource_health_metadata_operations.py deleted file mode 100644 index a1a2b2fc9f8..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_resource_health_metadata_operations.py +++ /dev/null @@ -1,468 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourceHealthMetadataOperations(object): - """ResourceHealthMetadataOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the subscription. - - Description for List all ResourceHealthMetadata for all sites in the - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} - - def get_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} - - def list_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} - - def get_by_site_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_static_sites_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_static_sites_operations.py deleted file mode 100644 index 607b9d03d77..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_static_sites_operations.py +++ /dev/null @@ -1,3803 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class StaticSitesOperations(object): - """StaticSitesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def preview_workflow( - self, location, static_sites_workflow_preview_request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSitesWorkflowPreview or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSitesWorkflowPreview - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.preview_workflow.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSitesWorkflowPreview', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all Static Sites for a subscription. - - Description for Get all Static Sites for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} - - def get_static_sites_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_static_sites_by_resource_group.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} - - def get_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - - def _create_or_update_static_site_initial( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_static_site( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns StaticSiteARMResource - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_static_site_initial( - resource_group_name=resource_group_name, - name=name, - static_site_envelope=static_site_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - - def _delete_static_site_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_static_site_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def update_static_site( - self, resource_group_name, name, static_site_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} - - def list_static_site_users( - self, resource_group_name, name, authprovider, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteUserARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_users.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteUserARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} - - def delete_static_site_user( - self, resource_group_name, name, authprovider, userid, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_static_site_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} - - def update_static_site_user( - self, resource_group_name, name, authprovider, userid, kind=None, roles=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param roles: The roles for the static site user, in free-form string - format - :type roles: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - static_site_user_envelope = models.StaticSiteUserARMResource(kind=kind, roles=roles) - - # Construct URL - url = self.update_static_site_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} - - def get_static_site_builds( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of StaticSiteBuildARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_static_site_builds.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteBuildARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} - - def get_static_site_build( - self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteBuildARMResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteBuildARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} - - - def _delete_static_site_build_initial( - self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_static_site_build( - self, resource_group_name, name, environment_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_static_site_build_initial( - resource_group_name=resource_group_name, - name=name, - environment_name=environment_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} - - def create_or_update_static_site_build_app_settings( - self, resource_group_name, name, environment_name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.create_or_update_static_site_build_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def create_or_update_static_site_build_function_app_settings( - self, resource_group_name, name, environment_name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_static_site_build_functions( - self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteFunctionOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_build_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} - - def list_static_site_build_app_settings( - self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_build_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} - - def list_static_site_build_function_app_settings( - self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_build_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} - - def get_user_provided_function_apps_for_static_site_build( - self, resource_group_name, name, environment_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteUserProvidedFunctionAppARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_user_provided_function_apps_for_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteUserProvidedFunctionAppARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} - - def get_user_provided_function_app_for_static_site_build( - self, resource_group_name, name, environment_name, function_app_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserProvidedFunctionAppARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_user_provided_function_app_for_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - - def _register_user_provided_function_app_with_static_site_build_initial( - self, resource_group_name, name, environment_name, function_app_name, static_site_user_provided_function_envelope, is_forced=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.register_user_provided_function_app_with_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if is_forced is not None: - query_parameters['isForced'] = self._serialize.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def register_user_provided_function_app_with_static_site_build( - self, resource_group_name, name, environment_name, function_app_name, static_site_user_provided_function_envelope, is_forced=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 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 - false. - :type is_forced: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StaticSiteUserProvidedFunctionAppARMResource or - ClientRawResponse if - raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} - - def detach_user_provided_function_app_from_static_site_build( - self, resource_group_name, name, environment_name, function_app_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.detach_user_provided_function_app_from_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} - - - def _create_zip_deployment_for_static_site_build_initial( - self, resource_group_name, name, environment_name, static_site_zip_deployment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_zip_deployment_for_static_site_build.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def create_zip_deployment_for_static_site_build( - self, resource_group_name, name, environment_name, static_site_zip_deployment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} - - def create_or_update_static_site_app_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.create_or_update_static_site_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} - - def create_or_update_static_site_function_app_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.create_or_update_static_site_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} - - def create_user_roles_invitation_link( - self, resource_group_name, name, static_site_user_roles_invitation_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserInvitationResponseResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserInvitationResponseResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_user_roles_invitation_link.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} - - def list_static_site_custom_domains( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteCustomDomainOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_custom_domains.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteCustomDomainOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} - - def get_static_site_custom_domain( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteCustomDomainOverviewARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - - def _create_or_update_static_site_custom_domain_initial( - self, resource_group_name, name, domain_name, kind=None, validation_method="cname-delegation", custom_headers=None, raw=False, **operation_config): - static_site_custom_domain_request_properties_envelope = models.StaticSiteCustomDomainRequestPropertiesARMResource(kind=kind, validation_method=validation_method) - - # Construct URL - url = self.create_or_update_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_static_site_custom_domain( - self, resource_group_name, name, domain_name, kind=None, validation_method="cname-delegation", custom_headers=None, raw=False, polling=True, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param validation_method: Validation method for adding a custom domain - :type validation_method: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StaticSiteCustomDomainOverviewARMResource or - ClientRawResponse if - raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_static_site_custom_domain_initial( - resource_group_name=resource_group_name, - name=name, - domain_name=domain_name, - kind=kind, - validation_method=validation_method, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - - def _delete_static_site_custom_domain_initial( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_static_site_custom_domain.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_static_site_custom_domain( - self, resource_group_name, name, domain_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_static_site_custom_domain_initial( - resource_group_name=resource_group_name, - name=name, - domain_name=domain_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} - - - def _validate_custom_domain_can_be_added_to_static_site_initial( - self, resource_group_name, name, domain_name, kind=None, validation_method="cname-delegation", custom_headers=None, raw=False, **operation_config): - static_site_custom_domain_request_properties_envelope = models.StaticSiteCustomDomainRequestPropertiesARMResource(kind=kind, validation_method=validation_method) - - # Construct URL - url = self.validate_custom_domain_can_be_added_to_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def validate_custom_domain_can_be_added_to_static_site( - self, resource_group_name, name, domain_name, kind=None, validation_method="cname-delegation", custom_headers=None, raw=False, polling=True, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param validation_method: Validation method for adding a custom domain - :type validation_method: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - kind=kind, - validation_method=validation_method, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} - - - def _detach_static_site_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.detach_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def detach_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._detach_static_site_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} - - def list_static_site_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteFunctionOverviewARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_static_site_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteFunctionOverviewARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} - - def list_static_site_app_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} - - def list_static_site_configured_roles( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_configured_roles.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} - - def list_static_site_function_app_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_function_app_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} - - def list_static_site_secrets( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_static_site_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} - - def get_private_endpoint_connection_list( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - RemotePrivateEndpointConnectionARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_private_endpoint_connection_list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RemotePrivateEndpointConnectionARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} - - def get_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RemotePrivateEndpointConnectionARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _approve_or_reject_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.approve_or_reject_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def approve_or_reject_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - RemotePrivateEndpointConnectionARMResource or - ClientRawResponse if - raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - kind=kind, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 202: - deserialized = self._deserialize('object', response) - if response.status_code == 204: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_private_endpoint_connection_initial( - resource_group_name=resource_group_name, - name=name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def get_private_link_resources( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_link_resources.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} - - def reset_static_site_api_key( - self, resource_group_name, name, reset_properties_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_static_site_api_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} - - def get_user_provided_function_apps_for_static_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - StaticSiteUserProvidedFunctionAppARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_user_provided_function_apps_for_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.StaticSiteUserProvidedFunctionAppARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} - - def get_user_provided_function_app_for_static_site( - self, resource_group_name, name, function_app_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StaticSiteUserProvidedFunctionAppARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_user_provided_function_app_for_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} - - - def _register_user_provided_function_app_with_static_site_initial( - self, resource_group_name, name, function_app_name, static_site_user_provided_function_envelope, is_forced=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.register_user_provided_function_app_with_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if is_forced is not None: - query_parameters['isForced'] = self._serialize.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def register_user_provided_function_app_with_static_site( - self, resource_group_name, name, function_app_name, static_site_user_provided_function_envelope, is_forced=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 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 - false. - :type is_forced: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StaticSiteUserProvidedFunctionAppARMResource or - ClientRawResponse if - raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} - - def detach_user_provided_function_app_from_static_site( - self, resource_group_name, name, function_app_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.detach_user_provided_function_app_from_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} - - - def _create_zip_deployment_for_static_site_initial( - self, resource_group_name, name, static_site_zip_deployment_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_zip_deployment_for_static_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def create_zip_deployment_for_static_site( - self, resource_group_name, name, static_site_zip_deployment_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_top_level_domains_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_top_level_domains_operations.py deleted file mode 100644 index 160c4d476cb..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_top_level_domains_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TopLevelDomainsOperations(object): - """TopLevelDomainsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all top-level domains supported for registration. - - Description for Get all top-level domains supported for registration. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TopLevelDomain - :rtype: - ~azure.mgmt.web.v2020_12_01.models.TopLevelDomainPaged[~azure.mgmt.web.v2020_12_01.models.TopLevelDomain] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TopLevelDomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} - - def get( - self, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TopLevelDomain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.TopLevelDomain or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TopLevelDomain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} - - def list_agreements( - self, name, include_privacy=None, for_transfer=None, custom_headers=None, raw=False, **operation_config): - """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 include_privacy: If true, then the list of - agreements will include agreements for domain privacy as well; - otherwise, false. - :type include_privacy: bool - :param for_transfer: If true, then the list of agreements - will include agreements for domain transfer as well; otherwise, - false. - :type for_transfer: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TldLegalAgreement - :rtype: - ~azure.mgmt.web.v2020_12_01.models.TldLegalAgreementPaged[~azure.mgmt.web.v2020_12_01.models.TldLegalAgreement] - :raises: - :class:`DefaultErrorResponseException` - """ - agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_agreements.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TldLegalAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py deleted file mode 100644 index 4b2b94e4776..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_apps_operations.py +++ /dev/null @@ -1,28441 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class WebAppsOperations(object): - """WebAppsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2020-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all apps for a subscription. - - Description for Get all apps for a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} - - def list_by_resource_group( - self, resource_group_name, include_slots=None, custom_headers=None, raw=False, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - 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 = {} - if include_slots is not None: - query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} - - def get( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - - def _create_or_update_initial( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def delete( - self, resource_group_name, name, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def update( - self, resource_group_name, name, site_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} - - def analyze_custom_hostname( - self, resource_group_name, name, host_name=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} - - def apply_slot_config_to_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_config_to_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} - - def backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} - - def list_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_12_01.models.BackupItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} - - def get_backup_status( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def delete_backup( - self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} - - def list_backup_status_secrets( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} - - - def _restore_initial( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} - - def get_basic_publishing_credentials_policies( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesCollection or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesCollection - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_basic_publishing_credentials_policies.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} - - def get_ftp_allowed( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ftp_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} - - def update_ftp_allowed( - self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): - """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 allow: true to allow access to a publishing - method; otherwise, false. - :type allow: bool - :param kind: Kind of resource. - :type kind: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) - - # Construct URL - url = self.update_ftp_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} - - def get_scm_allowed( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_scm_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} - - def update_scm_allowed( - self, resource_group_name, name, allow, kind=None, custom_headers=None, raw=False, **operation_config): - """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 allow: true to allow access to a publishing - method; otherwise, false. - :type allow: bool - :param kind: Kind of resource. - :type kind: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) - - # Construct URL - url = self.update_scm_allowed.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} - - def list_configurations( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} - - def update_application_settings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} - - def list_application_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} - - def update_auth_settings( - self, resource_group_name, name, site_auth_settings, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} - - def get_auth_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} - - def update_auth_settings_v2( - self, resource_group_name, name, site_auth_settings_v2, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} - - def get_auth_settings_v2( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} - - def update_azure_storage_accounts( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) - - # Construct URL - url = self.update_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} - - def list_azure_storage_accounts( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} - - def update_backup_configuration( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def delete_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} - - def get_backup_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} - - def get_app_settings_key_vault_references( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiKVReference - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ApiKVReferencePaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_app_settings_key_vault_references.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApiKVReferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} - - def get_app_setting_key_vault_reference( - self, resource_group_name, name, app_setting_key, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiKVReference or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_app_setting_key_vault_reference.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApiKVReference', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} - - def get_site_connection_string_key_vault_references( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiKVReference - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ApiKVReferencePaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_site_connection_string_key_vault_references.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApiKVReferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} - - def get_site_connection_string_key_vault_reference( - self, resource_group_name, name, connection_string_key, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiKVReference or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_connection_string_key_vault_reference.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApiKVReference', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} - - def update_connection_strings( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2020_12_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} - - def list_connection_strings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_diagnostic_logs_config( - self, resource_group_name, name, site_logs_config, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} - - def update_metadata( - self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} - - def list_metadata( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} - - - def _list_publishing_credentials_initial( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials( - self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_initial( - resource_group_name=resource_group_name, - name=name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} - - def update_site_push_settings( - self, resource_group_name, name, push_settings, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} - - def list_site_push_settings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} - - def list_slot_configuration_names( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def update_slot_configuration_names( - self, resource_group_name, name, slot_config_names, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SlotConfigNamesResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot_configuration_names.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SlotConfigNamesResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - - def get_configuration( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def create_or_update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} - - def list_configuration_snapshot_info( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} - - def get_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot( - self, resource_group_name, name, snapshot_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.recover_site_configuration_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} - - def get_container_logs_zip( - self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} - - def list_continuous_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} - - def get_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_continuous_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DeploymentPaged[~azure.mgmt.web.v2020_12_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} - - def get_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def create_deployment( - self, resource_group_name, name, id, deployment, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def delete_deployment( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_deployment.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} - - def list_deployment_log( - self, resource_group_name, name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} - - def discover_backup( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} - - def list_domain_ownership_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_12_01.models.IdentifierPaged[~azure.mgmt.web.v2020_12_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.update_domain_ownership_identifier.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_initial( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_ms_deploy_operation_initial( - resource_group_name=resource_group_name, - name=name, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} - - def get_ms_deploy_log( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} - - def list_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} - - def get_functions_admin_token( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} - - def get_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - - def _create_function_initial( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_function( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_function_initial( - resource_group_name=resource_group_name, - name=name, - function_name=function_name, - function_envelope=function_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def delete_function( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} - - def create_or_update_function_secret( - self, resource_group_name, name, function_name, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def delete_function_secret( - self, resource_group_name, name, function_name, key_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} - - def list_function_secrets( - self, resource_group_name, name, function_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} - - def list_host_keys( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} - - def list_sync_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} - - def sync_functions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} - - def create_or_update_host_secret( - self, resource_group_name, name, key_type, key_name, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def delete_host_secret( - self, resource_group_name, name, key_type, key_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2020_12_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} - - def get_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding( - self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def delete_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_name_binding.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} - - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} - - def list_relay_service_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} - - def get_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def delete_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} - - def list_instance_identifiers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebSiteInstanceStatus - :rtype: - ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} - - def get_instance_info( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebSiteInstanceStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_info.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebSiteInstanceStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} - - def get_instance_ms_deploy_status( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - - def _create_instance_ms_deploy_operation_initial( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_log.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} - - def list_instance_processes( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} - - def get_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} - - def list_instance_process_modules( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module( - self, resource_group_name, name, process_id, base_address, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} - - def list_instance_process_threads( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} - - def is_cloneable( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} - - def list_site_backups( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_12_01.models.BackupItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_backups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} - - def list_sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} - - - def _migrate_storage_initial( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_storage.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_storage( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - StorageMigrationResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.StorageMigrationResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.StorageMigrationResponse]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_storage_initial( - subscription_name=subscription_name, - resource_group_name=resource_group_name, - name=name, - migration_options=migration_options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('StorageMigrationResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} - - - def _migrate_my_sql_initial( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.migrate_my_sql.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def migrate_my_sql( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Operation or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.Operation] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.Operation]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._migrate_my_sql_initial( - resource_group_name=resource_group_name, - name=name, - migration_request_envelope=migration_request_envelope, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} - - def get_migrate_my_sql_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} - - def get_swift_virtual_network_connection( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_swift_virtual_network.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} - - def list_network_features( - self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_network_features.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} - - def get_network_trace_operation( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} - - def stop_web_site_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_web_site_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} - - def get_network_traces( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} - - def get_network_trace_operation_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} - - def get_network_traces_v2( - self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.generate_new_site_publishing_password.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} - - def list_perf_mon_counters( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2020_12_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_12_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} - - def get_site_php_error_log_flag( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} - - def list_premier_add_ons( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} - - def get_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - - def get_private_access( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def put_private_access_vnet( - self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - - def get_private_endpoint_connection_list( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - RemotePrivateEndpointConnectionARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_private_endpoint_connection_list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RemotePrivateEndpointConnectionARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} - - def get_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RemotePrivateEndpointConnectionARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _approve_or_reject_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.approve_or_reject_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def approve_or_reject_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - RemotePrivateEndpointConnectionARMResource or - ClientRawResponse if - raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - kind=kind, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_private_endpoint_connection_initial( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_private_endpoint_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 202: - deserialized = self._deserialize('object', response) - if response.status_code == 204: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_private_endpoint_connection( - self, resource_group_name, name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._delete_private_endpoint_connection_initial( - resource_group_name=resource_group_name, - name=name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def get_private_link_resources( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_link_resources.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} - - def list_processes( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} - - def get_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def delete_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_process.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def get_process_dump( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_dump.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} - - def list_process_modules( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} - - def get_process_module( - self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_module.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} - - def list_public_certificates( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2020_12_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} - - def get_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate( - self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_public_certificate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets( - self, resource_group_name, name, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} - - def reset_production_slot_config( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_production_slot_config.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} - - def restart( - self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} - - - def _restore_from_backup_blob_initial( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob( - self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_backup_blob_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_deleted_app_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} - - - def _restore_snapshot_initial( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot( - self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_snapshot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} - - def list_site_extensions( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} - - def get_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_initial( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, polling=True, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._install_site_extension_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def delete_site_extension( - self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_site_extension.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} - - def list_slots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Site - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SitePaged[~azure.mgmt.web.v2020_12_01.models.Site] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} - - def get_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - - def _create_or_update_slot_initial( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'Site') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Site or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.Site] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.Site]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_envelope=site_envelope, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def delete_slot( - self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def update_slot( - self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Site or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_envelope, 'SitePatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} - - def analyze_custom_hostname_slot( - self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CustomHostnameAnalysisResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.analyze_custom_hostname_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} - - def apply_slot_configuration_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.apply_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} - - def backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} - - def list_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_12_01.models.BackupItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} - - def get_backup_status_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def delete_backup_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} - - def list_backup_status_secrets_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupItem or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_backup_status_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} - - - def _restore_slot_initial( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_slot_initial( - resource_group_name=resource_group_name, - name=name, - backup_id=backup_id, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} - - def get_basic_publishing_credentials_policies_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesCollection or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesCollection - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_basic_publishing_credentials_policies_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} - - def get_ftp_allowed_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ftp_allowed_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} - - def update_ftp_allowed_slot( - self, resource_group_name, name, slot, allow, kind=None, custom_headers=None, raw=False, **operation_config): - """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 allow: true to allow access to a publishing - method; otherwise, false. - :type allow: bool - :param kind: Kind of resource. - :type kind: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) - - # Construct URL - url = self.update_ftp_allowed_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} - - def get_scm_allowed_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_scm_allowed_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} - - def update_scm_allowed_slot( - self, resource_group_name, name, slot, allow, kind=None, custom_headers=None, raw=False, **operation_config): - """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 allow: true to allow access to a publishing - method; otherwise, false. - :type allow: bool - :param kind: Kind of resource. - :type kind: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CsmPublishingCredentialsPoliciesEntity or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - csm_publishing_access_policies_entity = models.CsmPublishingCredentialsPoliciesEntity(kind=kind, allow=allow) - - # Construct URL - url = self.update_scm_allowed_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} - - def list_configurations_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SiteConfigResourcePaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configurations_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} - - def update_application_settings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - app_settings = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} - - def list_application_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_application_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} - - def update_auth_settings_slot( - self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} - - def get_auth_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} - - def update_auth_settings_v2_slot( - self, resource_group_name, name, site_auth_settings_v2, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_auth_settings_v2_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} - - def get_auth_settings_v2_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteAuthSettingsV2 or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_auth_settings_v2_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettingsV2', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} - - def update_azure_storage_accounts_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Azure storage accounts. - :type properties: dict[str, - ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) - - # Construct URL - url = self.update_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} - - def list_azure_storage_accounts_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AzureStoragePropertyDictionaryResource or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_azure_storage_accounts_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} - - def update_backup_configuration_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'BackupRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def delete_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} - - def get_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_backup_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} - - def get_app_settings_key_vault_references_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiKVReference - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ApiKVReferencePaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_app_settings_key_vault_references_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApiKVReferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} - - def get_app_setting_key_vault_reference_slot( - self, resource_group_name, name, app_setting_key, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiKVReference or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_app_setting_key_vault_reference_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApiKVReference', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def get_site_connection_string_key_vault_references_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiKVReference - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ApiKVReferencePaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_site_connection_string_key_vault_references_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ApiKVReferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} - - def get_site_connection_string_key_vault_reference_slot( - self, resource_group_name, name, connection_string_key, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiKVReference or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_connection_string_key_vault_reference_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApiKVReference', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def update_connection_strings_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Connection strings. - :type properties: dict[str, - ~azure.mgmt.web.v2020_12_01.models.ConnStringValueTypePair] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} - - def list_connection_strings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ConnectionStringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_connection_strings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} - - def get_diagnostic_logs_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_diagnostic_logs_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_diagnostic_logs_config_slot( - self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteLogsConfig or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_diagnostic_logs_config_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} - - def update_metadata_slot( - self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param properties: Settings. - :type properties: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - metadata = models.StringDictionary(kind=kind, properties=properties) - - # Construct URL - url = self.update_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(metadata, 'StringDictionary') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} - - def list_metadata_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_metadata_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} - - - def _list_publishing_credentials_slot_initial( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.list_publishing_credentials_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_publishing_credentials_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns User or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.User] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.User]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._list_publishing_credentials_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} - - def update_site_push_settings_slot( - self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} - - def list_site_push_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_site_push_settings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} - - def get_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def create_or_update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} - - def list_configuration_snapshot_info_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteConfigurationSnapshotInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_configuration_snapshot_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteConfigurationSnapshotInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} - - def get_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} - - def recover_site_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.recover_site_configuration_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} - - def get_web_site_container_logs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_web_site_container_logs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/octet-stream' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} - - def get_container_logs_zip_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_container_logs_zip_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/zip' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} - - def list_continuous_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContinuousWebJob - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_continuous_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ContinuousWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} - - def get_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContinuousWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContinuousWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def delete_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} - - def start_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} - - def stop_continuous_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_continuous_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} - - def list_deployments_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Deployment - :rtype: - ~azure.mgmt.web.v2020_12_01.models.DeploymentPaged[~azure.mgmt.web.v2020_12_01.models.Deployment] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_deployments_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} - - def get_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def create_deployment_slot( - self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deployment, 'Deployment') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def delete_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_deployment_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} - - def list_deployment_log_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Deployment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_deployment_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} - - def discover_backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.discover_backup_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} - - def list_domain_ownership_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_12_01.models.IdentifierPaged[~azure.mgmt.web.v2020_12_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_domain_ownership_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} - - def get_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def create_or_update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def delete_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param value: String representation of the identity. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Identifier or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - domain_ownership_identifier = models.Identifier(kind=kind, value=value) - - # Construct URL - url = self.update_domain_ownership_identifier_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} - - def get_ms_deploy_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - - def _create_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_ms_deploy_operation_slot( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_ms_deploy_operation_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} - - def get_ms_deploy_log_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} - - def list_instance_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FunctionEnvelope - :rtype: - ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopePaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FunctionEnvelopePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} - - def get_functions_admin_token_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_functions_admin_token_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} - - def get_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionEnvelope or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - - def _create_instance_function_slot_initial( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_function_slot( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FunctionEnvelope or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FunctionEnvelope', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def delete_instance_function_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_function_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} - - def create_or_update_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_function_secret_slot( - self, resource_group_name, name, function_name, key_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_function_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} - - def list_function_keys_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StringDictionary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} - - def list_function_secrets_slot( - self, resource_group_name, name, function_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_function_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} - - def list_host_keys_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HostKeys or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_host_keys_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} - - def list_sync_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} - - def sync_functions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_functions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} - - def create_or_update_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, name1=None, value=None, custom_headers=None, raw=False, **operation_config): - """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 name1: Key name - :type name1: str - :param value: Key value - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KeyInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - key = models.KeyInfo(name=name1, value=value) - - # Construct URL - url = self.create_or_update_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key, 'KeyInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('KeyInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('KeyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_host_secret_slot( - self, resource_group_name, name, key_type, key_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_secret_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} - - def list_host_name_bindings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HostNameBinding - :rtype: - ~azure.mgmt.web.v2020_12_01.models.HostNameBindingPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBinding] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_host_name_bindings_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} - - def get_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def create_or_update_host_name_binding_slot( - self, resource_group_name, name, host_name, host_name_binding, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HostNameBinding or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def delete_host_name_binding_slot( - self, resource_group_name, name, slot, host_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_host_name_binding_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} - - def get_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def create_or_update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def delete_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def update_hybrid_connection_slot( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_hybrid_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} - - def list_hybrid_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HybridConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_hybrid_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} - - def list_relay_service_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_relay_service_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} - - def get_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def create_or_update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def delete_relay_service_connection_slot( - self, resource_group_name, name, entity_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def update_relay_service_connection_slot( - self, resource_group_name, name, entity_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_relay_service_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} - - def list_instance_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebSiteInstanceStatus - :rtype: - ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatusPaged[~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_identifiers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebSiteInstanceStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} - - def get_instance_info_slot( - self, resource_group_name, name, instance_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebSiteInstanceStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_info_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebSiteInstanceStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} - - def get_instance_ms_deploy_status_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - - def _create_instance_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_instance_ms_deploy_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 409]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_instance_ms_deploy_operation_slot( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MSDeployStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} - - def get_instance_ms_deploy_log_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_ms_deploy_log_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_processes_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} - - def get_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def delete_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_instance_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - - def get_instance_process_dump_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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'} - - def list_instance_process_modules_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_instance_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def list_instance_process_threads_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_instance_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} - - def is_cloneable_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteCloneability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.is_cloneable_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} - - def list_site_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupItem - :rtype: - ~azure.mgmt.web.v2020_12_01.models.BackupItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItem] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_backups_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} - - def list_sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} - - def get_migrate_my_sql_status_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_migrate_my_sql_status_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} - - def get_swift_virtual_network_connection_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SwiftVirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SwiftVirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_swift_virtual_network_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SwiftVirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def delete_swift_virtual_network_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_swift_virtual_network_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} - - def list_network_features_slot( - self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.NetworkFeatures or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_network_features_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} - - def get_network_trace_operation_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} - - def start_web_site_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} - - - def _start_web_site_network_trace_operation_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_web_site_network_trace_operation_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_web_site_network_trace_operation_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} - - def stop_web_site_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_web_site_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} - - def get_network_traces_slot( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} - - def get_network_trace_operation_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_trace_operation_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def get_network_traces_slot_v2( - self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_network_traces_slot_v2.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} - - def generate_new_site_publishing_password_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.generate_new_site_publishing_password_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} - - def list_perf_mon_counters_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse - :rtype: - ~azure.mgmt.web.v2020_12_01.models.PerfMonResponsePaged[~azure.mgmt.web.v2020_12_01.models.PerfMonResponse] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_perf_mon_counters_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} - - def get_site_php_error_log_flag_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_php_error_log_flag_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} - - def list_premier_add_ons_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_premier_add_ons_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} - - def get_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def add_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.add_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def delete_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def update_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_premier_add_on_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} - - def get_private_access_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_access_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def put_private_access_vnet_slot( - self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param slot: The name of the slot for the web app. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.put_private_access_vnet_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(access, 'PrivateAccess') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} - - def get_private_endpoint_connection_list_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - RemotePrivateEndpointConnectionARMResource - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResourcePaged[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.get_private_endpoint_connection_list_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RemotePrivateEndpointConnectionARMResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} - - def get_private_endpoint_connection_slot( - self, resource_group_name, name, private_endpoint_connection_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RemotePrivateEndpointConnectionARMResource or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_endpoint_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _approve_or_reject_private_endpoint_connection_slot_initial( - self, resource_group_name, name, private_endpoint_connection_name, slot, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - private_endpoint_wrapper = models.PrivateLinkConnectionApprovalRequestResource(kind=kind, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.approve_or_reject_private_endpoint_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - if response.status_code == 202: - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def approve_or_reject_private_endpoint_connection_slot( - self, resource_group_name, name, private_endpoint_connection_name, slot, kind=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 kind: Kind of resource. - :type kind: str - :param private_link_service_connection_state: - :type private_link_service_connection_state: - ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - RemotePrivateEndpointConnectionARMResource or - ClientRawResponse if - raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - kind=kind, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_private_endpoint_connection_slot_initial( - self, resource_group_name, name, private_endpoint_connection_name, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_private_endpoint_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 202: - deserialized = self._deserialize('object', response) - if response.status_code == 204: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete_private_endpoint_connection_slot( - self, resource_group_name, name, private_endpoint_connection_name, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def get_private_link_resources_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesWrapper or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_private_link_resources_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesWrapper', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} - - def list_processes_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_processes_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} - - def get_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def delete_process_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_process_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} - - def get_process_dump_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_dump_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} - - def list_process_modules_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_modules_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} - - def get_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_process_module_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} - - def list_process_threads_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_process_threads_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} - - def list_public_certificates_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PublicCertificate - :rtype: - ~azure.mgmt.web.v2020_12_01.models.PublicCertificatePaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_public_certificates_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} - - def get_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def create_or_update_public_certificate_slot( - self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def delete_public_certificate_slot( - self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_public_certificate_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} - - def list_publishing_profile_xml_with_secrets_slot( - self, resource_group_name, name, slot, format=None, include_disaster_recovery_endpoints=None, custom_headers=None, raw=False, callback=None, **operation_config): - """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 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format, include_disaster_recovery_endpoints=include_disaster_recovery_endpoints) - - # Construct URL - url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=True, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = self._client.stream_download(response, callback) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} - - def reset_slot_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.reset_slot_configuration_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} - - def restart_slot( - self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.restart_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} - - - def _restore_from_backup_blob_slot_initial( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_backup_blob_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_backup_blob_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_backup_blob_slot_initial( - resource_group_name=resource_group_name, - name=name, - request=request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} - - - def _restore_from_deleted_app_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_from_deleted_app_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_from_deleted_app_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_from_deleted_app_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} - - - def _restore_snapshot_slot_initial( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore_snapshot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restore_snapshot_slot( - self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._restore_snapshot_slot_initial( - resource_group_name=resource_group_name, - name=name, - restore_request=restore_request, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} - - def list_site_extensions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SiteExtensionInfo - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_extensions_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SiteExtensionInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} - - def get_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteExtensionInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - - def _install_site_extension_slot_initial( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.install_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 429]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def install_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteExtensionInfo or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._install_site_extension_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_extension_id=site_extension_id, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteExtensionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def delete_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_site_extension_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} - - def list_slot_differences_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_12_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} - - - def _swap_slot_slot_initial( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._swap_slot_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} - - def list_snapshots_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SnapshotPaged[~azure.mgmt.web.v2020_12_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} - - def list_snapshots_from_dr_secondary_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SnapshotPaged[~azure.mgmt.web.v2020_12_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} - - def get_source_control_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - - def _create_or_update_source_control_slot_initial( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_slot_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - slot=slot, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def delete_source_control_slot( - self, resource_group_name, name, slot, additional_flags=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if additional_flags is not None: - query_parameters['additionalFlags'] = self._serialize.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} - - def start_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} - - - def _start_network_trace_slot_initial( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} - - def stop_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} - - def stop_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_network_trace_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} - - def sync_repository_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_repository_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} - - def sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_function_triggers_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} - - def list_triggered_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} - - def get_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history_slot( - self, resource_group_name, name, web_job_name, id, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_history_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def run_triggered_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.run_triggered_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} - - def list_usages_slot( - self, resource_group_name, name, slot, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} - - def list_vnet_connections_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} - - def get_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection_slot( - self, resource_group_name, name, vnet_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection_slot( - self, resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - 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}'} - - def update_vnet_connection_gateway_slot( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): - """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 - :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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2020_12_01.models.WebJobPaged[~azure.mgmt.web.v2020_12_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} - - def get_web_job_slot( - self, resource_group_name, name, web_job_name, slot, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} - - def list_slot_differences_from_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SlotDifference - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SlotDifferencePaged[~azure.mgmt.web.v2020_12_01.models.SlotDifference] - :raises: - :class:`DefaultErrorResponseException` - """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_slot_differences_from_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} - - - def _swap_slot_with_production_initial( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = self.swap_slot_with_production.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def swap_slot_with_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, polling=True, **operation_config): - """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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._swap_slot_with_production_initial( - resource_group_name=resource_group_name, - name=name, - target_slot=target_slot, - preserve_vnet=preserve_vnet, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} - - def list_snapshots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SnapshotPaged[~azure.mgmt.web.v2020_12_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} - - def list_snapshots_from_dr_secondary( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Snapshot - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SnapshotPaged[~azure.mgmt.web.v2020_12_01.models.Snapshot] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_snapshots_from_dr_secondary.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} - - def get_source_control( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - - def _create_or_update_source_control_initial( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SiteSourceControl or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl]] - :raises: - :class:`DefaultErrorResponseException` - """ - raw_result = self._create_or_update_source_control_initial( - resource_group_name=resource_group_name, - name=name, - site_source_control=site_source_control, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def delete_source_control( - self, resource_group_name, name, additional_flags=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if additional_flags is not None: - query_parameters['additionalFlags'] = self._serialize.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SiteSourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(site_source_control, 'SiteSourceControl') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 202: - deserialized = self._deserialize('SiteSourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} - - def start( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} - - - def _start_network_trace_initial( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkTrace]', response) - if response.status_code == 202: - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns list or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]]] - :raises: - :class:`DefaultErrorResponseException` - """ - 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, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('[NetworkTrace]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} - - def stop( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} - - def stop_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.stop_network_trace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} - - def sync_repository( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_repository.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} - - def sync_function_triggers( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.sync_function_triggers.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} - - def list_triggered_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredWebJob - :rtype: - ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredWebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} - - def get_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredWebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredWebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def delete_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} - - def list_triggered_web_job_history( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggeredJobHistory - :rtype: - ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TriggeredJobHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} - - def get_triggered_web_job_history( - self, resource_group_name, name, web_job_name, id, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggeredJobHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_triggered_web_job_history.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TriggeredJobHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} - - def run_triggered_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.run_triggered_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} - - def list_usages( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CsmUsageQuota - :rtype: - ~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_usages.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CsmUsageQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} - - def list_vnet_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_vnet_connections.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[VnetInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} - - def get_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def create_or_update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def delete_vnet_connection( - self, resource_group_name, name, vnet_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.delete_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def update_vnet_connection( - self, resource_group_name, name, vnet_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetInfo') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} - - def get_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def create_or_update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.create_or_update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def update_vnet_connection_gateway( - self, resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetGateway or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_vnet_connection_gateway.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(connection_envelope, 'VnetGateway') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetGateway', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} - - def list_web_jobs( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebJob - :rtype: - ~azure.mgmt.web.v2020_12_01.models.WebJobPaged[~azure.mgmt.web.v2020_12_01.models.WebJob] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_web_jobs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebJobPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} - - def get_web_job( - self, resource_group_name, name, web_job_name, custom_headers=None, raw=False, **operation_config): - """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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebJob or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.WebJob or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_web_job.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebJob', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_site_management_client_operations.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_site_management_client_operations.py deleted file mode 100644 index 6f759903c01..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/operations/_web_site_management_client_operations.py +++ /dev/null @@ -1,1125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -from .. import models -import uuid - - -class WebSiteManagementClientOperationsMixin(object): - - def generate_github_access_token_for_appservice_cli_async( - self, code, state, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AppserviceGithubToken or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - request = models.AppserviceGithubTokenRequest(code=code, state=state) - - # Construct URL - url = self.generate_github_access_token_for_appservice_cli_async.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'AppserviceGithubTokenRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AppserviceGithubToken', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generate_github_access_token_for_appservice_cli_async.metadata = {'url': '/providers/Microsoft.Web/generateGithubAccessTokenForAppserviceCLI'} - - def get_publishing_user( - self, custom_headers=None, raw=False, **operation_config): - """Gets publishing user. - - Description for Gets publishing user. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def update_publishing_user( - self, user_details, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_publishing_user.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(user_details, 'User') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} - - def list_source_controls( - self, custom_headers=None, raw=False, **operation_config): - """Gets the source controls available for Azure websites. - - Description for Gets the source controls available for Azure websites. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SourceControl - :rtype: - ~azure.mgmt.web.v2020_12_01.models.SourceControlPaged[~azure.mgmt.web.v2020_12_01.models.SourceControl] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_source_controls.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SourceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} - - def get_source_control( - self, source_control_type, custom_headers=None, raw=False, **operation_config): - """Gets source control token. - - Description for Gets source control token. - - :param source_control_type: Type of source control - :type source_control_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def update_source_control( - self, source_control_type, request_message, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SourceControl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.update_source_control.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_message, 'SourceControl') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SourceControl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} - - def list_billing_meters( - self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BillingMeter - :rtype: - ~azure.mgmt.web.v2020_12_01.models.BillingMeterPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeter] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_billing_meters.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} - - def check_name_availability( - self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): - """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. 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourceNameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) - - # Construct URL - url = self.check_name_availability.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'ResourceNameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourceNameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} - - def get_subscription_deployment_locations( - self, custom_headers=None, raw=False, **operation_config): - """Gets list of available geo regions plus ministamps. - - Description for Gets list of available geo regions plus ministamps. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeploymentLocations or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_subscription_deployment_locations.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeploymentLocations', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} - - def list_geo_regions( - self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_workers_enabled=None, custom_headers=None, raw=False, **operation_config): - """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. Possible values - include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - 'Isolated', 'IsolatedV2', 'PremiumV2', 'PremiumV3', - 'PremiumContainer', 'ElasticPremium', 'ElasticIsolated' - :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName - :param linux_workers_enabled: Specify true if you want to - filter to only regions that support Linux workers. - :type linux_workers_enabled: bool - :param xenon_workers_enabled: Specify true if you want to - filter to only regions that support Xenon workers. - :type xenon_workers_enabled: bool - :param linux_dynamic_workers_enabled: Specify true if you - want to filter to only regions that support Linux Consumption Workers. - :type linux_dynamic_workers_enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GeoRegion - :rtype: - ~azure.mgmt.web.v2020_12_01.models.GeoRegionPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegion] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_geo_regions.metadata['url'] - 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 = {} - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.GeoRegionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} - - def list_site_identifiers_assigned_to_host_name( - self, name=None, custom_headers=None, raw=False, **operation_config): - """List all apps that are assigned to a hostname. - - Description for List all apps that are assigned to a hostname. - - :param name: Name of the object. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Identifier - :rtype: - ~azure.mgmt.web.v2020_12_01.models.IdentifierPaged[~azure.mgmt.web.v2020_12_01.models.Identifier] - :raises: - :class:`DefaultErrorResponseException` - """ - name_identifier = models.NameIdentifier(name=name) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_identifier, 'NameIdentifier') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} - - def list_premier_add_on_offers( - self, custom_headers=None, raw=False, **operation_config): - """List all premier add-on offers. - - Description for List all premier add-on offers. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PremierAddOnOffer - :rtype: - ~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOffer] - :raises: - :class:`DefaultErrorResponseException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_premier_add_on_offers.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PremierAddOnOfferPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} - - def list_skus( - self, custom_headers=None, raw=False, **operation_config): - """List all SKUs. - - Description for List all SKUs. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuInfos or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.list_skus.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SkuInfos', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} - - def verify_hosting_environment_vnet( - self, parameters, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VnetValidationFailureDetails or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.verify_hosting_environment_vnet.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VnetParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VnetValidationFailureDetails', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} - - def move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} - - def validate( - self, resource_group_name, validate_request, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.validate.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate_request, 'ValidateRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidateResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} - - def validate_move( - self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): - """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 target_resource_group: - :type target_resource_group: str - :param resources: - :type resources: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - - # Construct URL - url = self.validate_move.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} diff --git a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/version.py b/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/version.py deleted file mode 100644 index ecde0bf7940..00000000000 --- a/src/appservice-kube/azext_appservice_kube/vendored_sdks/azure_mgmt_web/v2020_12_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.42.0" - From e1b8a14ed00e4ab4982d86c5aa7297de541f0b8f Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Wed, 8 Sep 2021 16:12:46 -0700 Subject: [PATCH 089/125] rewrite 'az appservice kube show' --- .../azext_appservice_kube/custom.py | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 33cb050b85a..a14c62899a9 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -121,8 +121,19 @@ def create(cls, cmd, resource_group_name, name, kube_environment_envelope, **kwa # TODO @classmethod - def show(cls): - raise NotImplementedError() + def show(cls, cmd, resource_group_name, name): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "GET", request_url) + return r.json() # TODO @classmethod @@ -136,8 +147,8 @@ def delete(cls): # TODO @classmethod - def list(cls): - raise NotImplementedError() + def list(cls, cmd, resource_group_name): + raise NotImplementedError() # TODO @classmethod @@ -146,8 +157,8 @@ def update(cls): #TODO implement -def show_kube_environments(*args, **kwargs): - raise NotImplementedError() +def show_kube_environments(cmd, name, resource_group_name): + return KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) # TODO implement def wait_kube_environment(*args, **kwargs): @@ -168,7 +179,6 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta # parsed_custom_location = parse_resource_id(custom_location) # if parsed_custom_location['resource_type'].lower() != 'customlocations': # raise CLIError('Invalid custom location') - # custom_location_object = custom_location_client.custom_locations.get( # parsed_custom_location['resource_group'], # parsed_custom_location['name']) @@ -216,10 +226,11 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta raise ValidationError(msg) # TODO fix -def list_kube_environments(client, resource_group_name=None): - if resource_group_name is None: - return client.list_by_subscription() - return client.list_by_resource_group(resource_group_name) +def list_kube_environments(cmd, resource_group_name=None): + # if resource_group_name is None: + # return client.list_by_subscription() + # return client.list_by_resource_group(resource_group_name) + return KubeEnvironmentClient.list(cmd, resource_group_name) # TODO fix def update_kube_environment(cmd, From d7df221ea61bedade4542975c45c131845bccdc5 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Wed, 8 Sep 2021 16:29:54 -0700 Subject: [PATCH 090/125] rewrite 'az appservice kube list' --- .../azext_appservice_kube/custom.py | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index a14c62899a9..a66565e846e 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -145,10 +145,32 @@ def wait(cls): def delete(cls): raise NotImplementedError() - # TODO @classmethod - def list(cls, cmd, resource_group_name): - raise NotImplementedError() + def list_by_subscription(cls, cmd): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + request_url = "{}/subscriptions/{}/providers/Microsoft.Web/kubeEnvironments?api-version={}".format( + management_hostname.strip('/'), + sub_id, + api_version) + + r = send_raw_request(cmd.cli_ctx, "GET", request_url) + return r.json() + + @classmethod + def list_by_resource_group(cls, cmd, resource_group_name): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "GET", request_url) + return r.json() # TODO @classmethod @@ -156,7 +178,6 @@ def update(cls): raise NotImplementedError() -#TODO implement def show_kube_environments(cmd, name, resource_group_name): return KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) @@ -225,12 +246,10 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta raise e raise ValidationError(msg) -# TODO fix def list_kube_environments(cmd, resource_group_name=None): - # if resource_group_name is None: - # return client.list_by_subscription() - # return client.list_by_resource_group(resource_group_name) - return KubeEnvironmentClient.list(cmd, resource_group_name) + if resource_group_name is None: + return KubeEnvironmentClient.list_by_subscription(cmd) + return KubeEnvironmentClient.list_by_resource_group(cmd, resource_group_name) # TODO fix def update_kube_environment(cmd, From defcbad29593ec63e39a2d637047fe79bba0f6bf Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Wed, 8 Sep 2021 16:51:51 -0700 Subject: [PATCH 091/125] rewrite 'az appservice kube delete' --- .../azext_appservice_kube/custom.py | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index a66565e846e..47c85306f4f 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -140,10 +140,20 @@ def show(cls, cmd, resource_group_name, name): def wait(cls): raise NotImplementedError() - # TODO @classmethod - def delete(cls): - raise NotImplementedError() + def delete(cls, cmd, resource_group_name, name): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "DELETE", request_url) + return None # API doesn't return JSON for some reason @classmethod def list_by_subscription(cls, cmd): @@ -185,9 +195,8 @@ def show_kube_environments(cmd, name, resource_group_name): def wait_kube_environment(*args, **kwargs): raise NotImplementedError() -# TODO implement -def delete_kube_environment(*args, **kwargs): - raise NotImplementedError() +def delete_kube_environment(cmd, name, resource_group_name): + return KubeEnvironmentClient.delete(cmd=cmd, name=name, resource_group_name=resource_group_name) def create_kube_environment(cmd, name, resource_group_name, custom_location, static_ip=None, location=None, tags=None, no_wait=False): From af91efa0d10728e12ca3662dbebe3123722298ad Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 9 Sep 2021 16:36:56 -0700 Subject: [PATCH 092/125] re-add appservice kube create checks and start appservice kube update impl --- .../azext_appservice_kube/custom.py | 105 ++++++++++++------ 1 file changed, 71 insertions(+), 34 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 47c85306f4f..07ff47121f0 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -105,7 +105,7 @@ # TODO remove and replace with calls to KubeEnvironmentsOperations once the SDK gets updated class KubeEnvironmentClient(): @classmethod - def create(cls, cmd, resource_group_name, name, kube_environment_envelope, **kwargs): + def create(cls, cmd, resource_group_name, name, kube_environment_envelope): management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) @@ -119,7 +119,21 @@ def create(cls, cmd, resource_group_name, name, kube_environment_envelope, **kwa r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(kube_environment_envelope)) return r.json() - # TODO + @classmethod + def update(cls, cmd, name, resource_group_name, kube_environment_envelope): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "PATCH", request_url, body=json.dumps(kube_environment_envelope)) + return r.json() + @classmethod def show(cls, cmd, resource_group_name, name): management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager @@ -181,11 +195,6 @@ def list_by_resource_group(cls, cmd, resource_group_name): r = send_raw_request(cmd.cli_ctx, "GET", request_url) return r.json() - - # TODO - @classmethod - def update(cls): - raise NotImplementedError() def show_kube_environments(cmd, name, resource_group_name): @@ -196,28 +205,27 @@ def wait_kube_environment(*args, **kwargs): raise NotImplementedError() def delete_kube_environment(cmd, name, resource_group_name): + # TODO raise error if kube environment doesn't exist return KubeEnvironmentClient.delete(cmd=cmd, name=name, resource_group_name=resource_group_name) def create_kube_environment(cmd, name, resource_group_name, custom_location, static_ip=None, location=None, - tags=None, no_wait=False): - # TODO replace some of this validation from the original method VVVV - - # custom_location_client = customlocation_client_factory(cmd.cli_ctx) - # custom_location_object = None - - # if is_valid_resource_id(custom_location): - # parsed_custom_location = parse_resource_id(custom_location) - # if parsed_custom_location['resource_type'].lower() != 'customlocations': - # raise CLIError('Invalid custom location') - # custom_location_object = custom_location_client.custom_locations.get( - # parsed_custom_location['resource_group'], - # parsed_custom_location['name']) - # else: - # custom_location_object = custom_location_client.custom_locations.get(resource_group_name, custom_location) - # custom_location = custom_location_object.id - - # if not location: - # location = custom_location_object.location + tags=None, no_wait=False): + custom_location_client = customlocation_client_factory(cmd.cli_ctx) + custom_location_object = None + + if is_valid_resource_id(custom_location): + parsed_custom_location = parse_resource_id(custom_location) + if parsed_custom_location['resource_type'].lower() != 'customlocations': + raise CLIError('Invalid custom location') + custom_location_object = custom_location_client.custom_locations.get( + parsed_custom_location['resource_group'], + parsed_custom_location['name']) + else: + custom_location_object = custom_location_client.custom_locations.get(resource_group_name, custom_location) + custom_location = custom_location_object.id + + if not location: + location = custom_location_object.location # TODO replace with a FrontEndConfiguration model from the SDK front_end_configuration = {"kind": "LoadBalancer"} @@ -236,7 +244,8 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta # TODO replace with a KubeEnvironmentEnvelope model from the SDK kube_environment = { "kind": None, - "location": location, + "location": location, + "tags": tags, "properties": { "extendedLocation": extended_location, "staticIp": static_ip, @@ -260,13 +269,41 @@ def list_kube_environments(cmd, resource_group_name=None): return KubeEnvironmentClient.list_by_subscription(cmd) return KubeEnvironmentClient.list_by_resource_group(cmd, resource_group_name) -# TODO fix -def update_kube_environment(cmd, - kube_name, - resource_group_name, - tags=None, - no_wait=False): - raise CLIError("Update is not yet supported for Kubernetes Environments.") +# TODO debug +# TODO support no_wait +def update_kube_environment(cmd, name, resource_group_name, custom_location=None, static_ip=None, location=None, + tags=None, no_wait=False): + # TODO raise an error if the kube environment doesn't exist + + # TODO replace with a FrontEndConfiguration model from the SDK + front_end_configuration = {"kind": "LoadBalancer"} + + # TODO replace with an ExtendedLocation model from the SDK + # TODO may need to make this a custom location ID + extended_location = {"customLocation":custom_location} + + # TODO replace with an ArcConfiguration model from the SDK + arc_configuration = { + "artifactsStorageType": "NetworkFileSystem", + "artifactStorageClassName": "default", + "frontEndServiceConfiguration": front_end_configuration + } + + # TODO replace with a KubeEnvironmentEnvelope model from the SDK + kube_environment = { + "kind": None, + "location": location, + "properties": { + "extendedLocation": extended_location, + "staticIp": static_ip, + "arcConfiguration": arc_configuration + } + } + + if tags is not None: + kube_environment["tags"] = tags + + return KubeEnvironmentClient.update(cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) def list_app_service_plans(cmd, resource_group_name=None): From afbac8414ee5723b7a2be27a56535ff03574f585 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 10 Sep 2021 10:37:42 -0700 Subject: [PATCH 093/125] raise exception for 'az appservice kube update' --- .../azext_appservice_kube/custom.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 07ff47121f0..5c9281fcdc0 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -205,7 +205,9 @@ def wait_kube_environment(*args, **kwargs): raise NotImplementedError() def delete_kube_environment(cmd, name, resource_group_name): - # TODO raise error if kube environment doesn't exist + # Raises an exception if the kube environment doesn't exist + KubeEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name) + return KubeEnvironmentClient.delete(cmd=cmd, name=name, resource_group_name=resource_group_name) def create_kube_environment(cmd, name, resource_group_name, custom_location, static_ip=None, location=None, @@ -255,7 +257,7 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta try: # TODO add support for wait/no_wait polling behavior - return KubeEnvironmentClient.create(cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) + return sdk_no_wait(no_wait, KubeEnvironmentClient.create, cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) except Exception as e: try: import json @@ -269,11 +271,13 @@ def list_kube_environments(cmd, resource_group_name=None): return KubeEnvironmentClient.list_by_subscription(cmd) return KubeEnvironmentClient.list_by_resource_group(cmd, resource_group_name) -# TODO debug -# TODO support no_wait +# TODO follow up with Lima team on whether the update API is functional or not and if the CLI needs to support `az appservice kube update` def update_kube_environment(cmd, name, resource_group_name, custom_location=None, static_ip=None, location=None, tags=None, no_wait=False): - # TODO raise an error if the kube environment doesn't exist + raise CLIError("Update is not yet supported for Kubernetes Environments.") + + # Raises an exception if the kube environment doesn't exist + KubeEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name) # TODO replace with a FrontEndConfiguration model from the SDK front_end_configuration = {"kind": "LoadBalancer"} @@ -303,7 +307,7 @@ def update_kube_environment(cmd, name, resource_group_name, custom_location=None if tags is not None: kube_environment["tags"] = tags - return KubeEnvironmentClient.update(cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) + return sdk_no_wait(no_wait, KubeEnvironmentClient.update, cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) def list_app_service_plans(cmd, resource_group_name=None): From 75b6efe414bba84ba9157e1157f04e0727167adf Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 10 Sep 2021 11:34:45 -0700 Subject: [PATCH 094/125] add 'az appservice kube wait' --- src/appservice-kube/azext_appservice_kube/commands.py | 2 +- src/appservice-kube/azext_appservice_kube/custom.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 51e07cc81aa..0ea68bd9006 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -51,7 +51,7 @@ def load_command_table(self, _): with self.command_group('appservice kube', is_preview=True) as g: g.custom_command('show', 'show_kube_environments') - g.custom_command('wait', 'wait_kube_environment') + g.custom_wait_command('wait', 'show_kube_environments') g.custom_command('list', 'list_kube_environments') g.custom_command('create', 'create_kube_environment', supports_no_wait=True) g.custom_command('update', 'update_kube_environment', supports_no_wait=True) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 5c9281fcdc0..1acc3faf490 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -200,10 +200,6 @@ def list_by_resource_group(cls, cmd, resource_group_name): def show_kube_environments(cmd, name, resource_group_name): return KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) -# TODO implement -def wait_kube_environment(*args, **kwargs): - raise NotImplementedError() - def delete_kube_environment(cmd, name, resource_group_name): # Raises an exception if the kube environment doesn't exist KubeEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name) From a245c5511243e23f730bc1a5e35851363155167c Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 10 Sep 2021 15:52:13 -0700 Subject: [PATCH 095/125] add kube list pagination --- .../azext_appservice_kube/_client_factory.py | 4 +- .../azext_appservice_kube/commands.py | 2 +- .../azext_appservice_kube/custom.py | 54 ++++++++++++++++--- 3 files changed, 50 insertions(+), 10 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_client_factory.py b/src/appservice-kube/azext_appservice_kube/_client_factory.py index 362b6763905..5a75782272c 100644 --- a/src/appservice-kube/azext_appservice_kube/_client_factory.py +++ b/src/appservice-kube/azext_appservice_kube/_client_factory.py @@ -42,8 +42,8 @@ def resource_client_factory(cli_ctx, **_): return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) -def cf_kube_environments(cli_ctx, *_): - return web_client_factory(cli_ctx).kube_environments +# def cf_kube_environments(cli_ctx, *_): +# return web_client_factory(cli_ctx).kube_environments def cf_plans(cli_ctx, *_): diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 0ea68bd9006..c8dbd4851b6 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -6,7 +6,7 @@ # pylint: disable=line-too-long from azure.cli.core.commands import CliCommandType -from ._client_factory import cf_kube_environments, cf_plans +from ._client_factory import cf_plans from ._validators import validate_asp_sku, validate_app_or_slot_exists_in_rg diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 1acc3faf490..f5c108168ca 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +import re import time from binascii import hexlify @@ -89,7 +90,7 @@ should_create_new_rg, set_location, get_site_availability, does_app_already_exist, get_profile_username, get_plan_to_use,get_kube_plan_to_use, get_lang_from_content, get_rg_to_use, get_sku_to_use, detect_os_form_src, get_current_stack_from_runtime, generate_default_app_service_plan_name) -from ._client_factory import web_client_factory, cf_kube_environments, ex_handler_factory, customlocation_client_factory +from ._client_factory import web_client_factory, ex_handler_factory, customlocation_client_factory import subprocess from subprocess import PIPE @@ -171,6 +172,8 @@ def delete(cls, cmd, resource_group_name, name): @classmethod def list_by_subscription(cls, cmd): + kube_list = [] + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) @@ -178,12 +181,25 @@ def list_by_subscription(cls, cmd): management_hostname.strip('/'), sub_id, api_version) - + r = send_raw_request(cmd.cli_ctx, "GET", request_url) - return r.json() + j = r.json() + for kube in j["value"]: + kube_list.append(kube) + + while j["nextLink"] is not None: + request_url = j["nextLink"] + r = send_raw_request(cmd.cli_ctx, "GET", request_url) + j = r.json() + for kube in j["value"]: + kube_list.append(kube) + + return kube_list @classmethod def list_by_resource_group(cls, cmd, resource_group_name): + kube_list = [] + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) @@ -194,8 +210,19 @@ def list_by_resource_group(cls, cmd, resource_group_name): api_version) r = send_raw_request(cmd.cli_ctx, "GET", request_url) - return r.json() - + j = r.json() + for kube in j["value"]: + kube_list.append(kube) + + while j["nextLink"] is not None: + request_url = j["nextLink"] + r = send_raw_request(cmd.cli_ctx, "GET", request_url) + j = r.json() + for kube in j["value"]: + kube_list.append(kube) + + return kube_list + def show_kube_environments(cmd, name, resource_group_name): return KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) @@ -262,6 +289,7 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta raise e raise ValidationError(msg) +# TODO check returned data format def list_kube_environments(cmd, resource_group_name=None): if resource_group_name is None: return KubeEnvironmentClient.list_by_subscription(cmd) @@ -363,6 +391,7 @@ def get_vm_sizes(cli_ctx, location): return cf_compute_service(cli_ctx).virtual_machine_sizes.list(location) +# TODO test def _get_kube_env_from_custom_location(cmd, custom_location, resource_group): kube_environment_id = "" custom_location_name = custom_location @@ -372,8 +401,14 @@ def _get_kube_env_from_custom_location(cmd, custom_location, resource_group): custom_location_name = parsed_custom_location.get("name") resource_group = parsed_custom_location.get("resource_group") - kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_subscription() + # kube_envs = # cf_kube_environments(cmd.cli_ctx).list_by_subscription() + kube_envs = KubeEnvironmentClient.list_by_subscription(cmd=cmd) + print(kube_envs) + print(type(kube_envs)) + for kube in kube_envs: + print(kube) + print(type(kube)) parsed_custom_location_2 = None if kube.additional_properties and 'extendedLocation' in kube.additional_properties: @@ -393,11 +428,14 @@ def _get_kube_env_from_custom_location(cmd, custom_location, resource_group): return kube_environment_id +# TODO test def _get_custom_location_id_from_custom_location(cmd, custom_location_name, resource_group_name): if is_valid_resource_id(custom_location_name): return custom_location_name - kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_resource_group(resource_group_name) + # kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_resource_group(resource_group_name) + kube_envs = KubeEnvironmentClient.list_by_subscription(cmd=cmd, resource_group_name=resource_group_name) + for kube in kube_envs: parsed_custom_location = None custom_location_id = None @@ -414,6 +452,7 @@ def _get_custom_location_id_from_custom_location(cmd, custom_location_name, reso return None +# TODO fix; test def _get_custom_location_id_from_kube_env(kube): if kube.additional_properties and 'extendedLocation' in kube.additional_properties: return kube.additional_properties['extendedLocation'].get('name') @@ -422,6 +461,7 @@ def _get_custom_location_id_from_kube_env(kube): raise CLIError("Could not get custom location from kube environment") +# TODO fix; test def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): From 597c3059c6b84a5dca6cade52d971510dce4412c Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Mon, 13 Sep 2021 13:10:17 -0700 Subject: [PATCH 096/125] fix 'az appservice create' --- .../azext_appservice_kube/_client_factory.py | 4 - .../azext_appservice_kube/custom.py | 78 ++++++++++++------- 2 files changed, 52 insertions(+), 30 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_client_factory.py b/src/appservice-kube/azext_appservice_kube/_client_factory.py index 5a75782272c..dec287eea06 100644 --- a/src/appservice-kube/azext_appservice_kube/_client_factory.py +++ b/src/appservice-kube/azext_appservice_kube/_client_factory.py @@ -42,10 +42,6 @@ def resource_client_factory(cli_ctx, **_): return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) -# def cf_kube_environments(cli_ctx, *_): -# return web_client_factory(cli_ctx).kube_environments - - def cf_plans(cli_ctx, *_): return web_client_factory(cli_ctx).app_service_plans diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index f5c108168ca..6dff90bd72f 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -224,6 +224,25 @@ def list_by_resource_group(cls, cmd, resource_group_name): return kube_list +class AppServiceClient(): + @classmethod + def create(cls, cmd, name, resource_group_name, appservice_json): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(appservice_json)) + return r.json() + + + def show_kube_environments(cmd, name, resource_group_name): return KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) @@ -391,7 +410,6 @@ def get_vm_sizes(cli_ctx, location): return cf_compute_service(cli_ctx).virtual_machine_sizes.list(location) -# TODO test def _get_kube_env_from_custom_location(cmd, custom_location, resource_group): kube_environment_id = "" custom_location_name = custom_location @@ -401,25 +419,21 @@ def _get_kube_env_from_custom_location(cmd, custom_location, resource_group): custom_location_name = parsed_custom_location.get("name") resource_group = parsed_custom_location.get("resource_group") - # kube_envs = # cf_kube_environments(cmd.cli_ctx).list_by_subscription() kube_envs = KubeEnvironmentClient.list_by_subscription(cmd=cmd) - print(kube_envs) - print(type(kube_envs)) for kube in kube_envs: - print(kube) - print(type(kube)) parsed_custom_location_2 = None - if kube.additional_properties and 'extendedLocation' in kube.additional_properties: - parsed_custom_location_2 = parse_resource_id(kube.additional_properties['extendedLocation'].get('name')) - elif kube.extended_location and kube.extended_location.custom_location: - parsed_custom_location_2 = parse_resource_id(kube.extended_location.custom_location) + if kube.get("properties") and 'extendedLocation' in kube["properties"]: + parsed_custom_location_2 = parse_resource_id(kube["properties"]['extendedLocation']['customLocation']) + elif kube.get("extendedLocation") and kube.get("extendedLocation").get("type") == "customLocation": + parsed_custom_location_2 = parse_resource_id(kube["extendedLocation"]["name"]) + if parsed_custom_location_2 and ( parsed_custom_location_2.get("name").lower() == custom_location_name.lower()) and ( parsed_custom_location_2.get("resource_group").lower() == resource_group.lower()): - kube_environment_id = kube.id + kube_environment_id = kube.get("id") break if not kube_environment_id: @@ -428,7 +442,6 @@ def _get_kube_env_from_custom_location(cmd, custom_location, resource_group): return kube_environment_id -# TODO test def _get_custom_location_id_from_custom_location(cmd, custom_location_name, resource_group_name): if is_valid_resource_id(custom_location_name): return custom_location_name @@ -452,21 +465,27 @@ def _get_custom_location_id_from_custom_location(cmd, custom_location_name, reso return None -# TODO fix; test def _get_custom_location_id_from_kube_env(kube): - if kube.additional_properties and 'extendedLocation' in kube.additional_properties: - return kube.additional_properties['extendedLocation'].get('name') - elif kube.extended_location and kube.extended_location.custom_location: - return kube.extended_location.custom_location + if kube.get("properties") and 'extendedLocation' in kube["properties"]: + return kube["properties"]['extendedLocation'].get('customLocation') + elif kube.get("extendedLocation") and kube["extendedLocation"].get("type") == "CustomLocation": + return kube["extendedLocation"]["name"] raise CLIError("Could not get custom location from kube environment") -# TODO fix; test +def _ensure_kube_settings_in_json(appservice_plan_json, extended_location=None, kube_env=None): + if appservice_plan_json.get("properties") and appservice_plan_json["properties"].get("kubeEnvironmentProfile") is None and kube_env is not None: + appservice_plan_json["properties"]["kubeEnvironmentProfile"] = kube_env + if appservice_plan_json.get("extendedLocation") is None and extended_location is not None: + appservice_plan_json["extendedLocation"] = extended_location + +# TODO test with an ASE def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): - HostingEnvironmentProfile, SkuDescription, AppServicePlan, KubeEnvironmentProfile, ExtendedLocationEnvelope = cmd.get_models( - 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan', 'KubeEnvironmentProfile', 'ExtendedLocationEnvelope') + HostingEnvironmentProfile, SkuDescription, AppServicePlan = cmd.get_models( + 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan') + sku = _normalize_sku(sku) _validate_asp_sku(app_service_environment, custom_location, sku) @@ -501,16 +520,20 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype extended_location_envelope = None if kube_environment and (ase_def is None): kube_id = _resolve_kube_environment_id(cmd.cli_ctx, kube_environment, resource_group_name) - kube_def = KubeEnvironmentProfile(id=kube_id) + # kube_def = KubeEnvironmentProfile(id=kube_id) + kube_def = {"id": kube_id} kind = KUBE_ASP_KIND parsed_id = parse_resource_id(kube_id) kube_name = parsed_id.get("name") kube_rg = parsed_id.get("resource_group") if kube_name is not None and kube_rg is not None: - kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) - extended_location_envelope = ExtendedLocationEnvelope(name=_get_custom_location_id_from_kube_env(kube_env), type="CustomLocation") + # kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) + kube_env = KubeEnvironmentClient.show(cmd=cmd, resource_group_name=kube_rg, name=kube_name) + # extended_location_envelope = ExtendedLocationEnvelope(name=_get_custom_location_id_from_kube_env(kube_env), type="CustomLocation") + extended_location_envelope = {"name": _get_custom_location_id_from_kube_env(kube_env), "type": "CustomLocation"} + if kube_env is not None: - location = kube_env.location + location = kube_env["location"] else: raise CLIError("Kube Environment '{}' not found in subscription.".format(kube_id)) else: @@ -526,8 +549,11 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype reserved=(is_linux or None), hyper_v=(hyper_v or None), name=name, per_site_scaling=per_site_scaling, hosting_environment_profile=ase_def, kube_environment_profile=kube_def, extended_location=extended_location_envelope) - return sdk_no_wait(no_wait, client.app_service_plans.create_or_update, name=name, - resource_group_name=resource_group_name, app_service_plan=plan_def) + plan_json = plan_def.serialize() + _ensure_kube_settings_in_json(appservice_plan_json=plan_json, extended_location=extended_location_envelope, kube_env=kube_def) + + return sdk_no_wait(no_wait, AppServiceClient.create, cmd=cmd, name=name, + resource_group_name=resource_group_name, appservice_json=plan_json) def update_app_service_plan(instance, sku=None, number_of_workers=None): From 084a0ae1307772d598bedcaf0af71539e543e53a Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Mon, 13 Sep 2021 16:30:19 -0700 Subject: [PATCH 097/125] fix 'az appservice plan update' --- .../azext_appservice_kube/commands.py | 5 +- .../azext_appservice_kube/custom.py | 58 +++++++++++++++---- 2 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index c8dbd4851b6..cd4c10dee06 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -60,8 +60,9 @@ def load_command_table(self, _): with self.command_group('appservice plan', appservice_plan_sdk) as g: g.custom_command('create', 'create_app_service_plan', supports_no_wait=True, exception_handler=ex_handler_factory(creating_plan=True)) - g.generic_update_command('update', custom_func_name='update_app_service_plan', setter_arg_name='app_service_plan', - validator=validate_asp_sku, supports_no_wait=True) + + g.custom_command('update', 'update_app_service_plan', supports_no_wait=True) + g.show_command('show', 'get') g.custom_command('list', 'list_app_service_plans') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 6dff90bd72f..e6346de4f73 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -241,6 +241,38 @@ def create(cls, cmd, name, resource_group_name, appservice_json): r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(appservice_json)) return r.json() + @classmethod + def update(cls, cmd, name, resource_group_name, appservice_json): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(appservice_json)) + return r.json() + + @classmethod + def show(cls, cmd, name, resource_group_name): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "GET", request_url) + return r.json() + def show_kube_environments(cmd, name, resource_group_name): @@ -479,7 +511,7 @@ def _ensure_kube_settings_in_json(appservice_plan_json, extended_location=None, if appservice_plan_json.get("extendedLocation") is None and extended_location is not None: appservice_plan_json["extendedLocation"] = extended_location -# TODO test with an ASE +# TODO test with an ASE, non-kube plan def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): @@ -555,22 +587,28 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype return sdk_no_wait(no_wait, AppServiceClient.create, cmd=cmd, name=name, resource_group_name=resource_group_name, appservice_json=plan_json) +# TODO test; test with non-kube plans +def update_app_service_plan(cmd, resource_group_name, name, sku=None, number_of_workers=None, no_wait=False): + client = web_client_factory(cmd.cli_ctx) + plan = client.app_service_plans.get(resource_group_name, name).serialize() + plan_with_kube_env = AppServiceClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) -def update_app_service_plan(instance, sku=None, number_of_workers=None): if number_of_workers is None and sku is None: - logger.warning( - 'No update is done. Specify --sku and/or --kube-sku and/or --number-of-workers.') - sku_def = instance.sku + logger.warning('No update is done. Specify --sku and/or --number-of-workers.') + sku_def = plan["sku"] if sku is not None: sku = _normalize_sku(sku) - sku_def.tier = get_sku_name(sku) - sku_def.name = sku + sku_def["tier"] = get_sku_name(sku) + sku_def["name"] = sku if number_of_workers is not None: - sku_def.capacity = number_of_workers - instance.sku = sku_def - return instance + sku_def["capacity"] = number_of_workers + + plan["sku"] = sku_def + + _ensure_kube_settings_in_json(appservice_plan_json=plan, extended_location=plan_with_kube_env.get("extendedLocation"), kube_env=plan_with_kube_env["properties"].get("kubeEnvironmentProfile")) + return sdk_no_wait(no_wait, AppServiceClient.update, cmd=cmd, name=name, resource_group_name=resource_group_name, appservice_json=plan) def _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): client = web_client_factory(cmd.cli_ctx) From c3330513dd80c92565046ece9b0f19f44e28ed59 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 17 Sep 2021 14:33:48 -0700 Subject: [PATCH 098/125] fix 'az webapp create' --- .../azext_appservice_kube/custom.py | 49 +++++++++++++------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index e6346de4f73..10de8c5d08a 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -273,6 +273,22 @@ def show(cls, cmd, name, resource_group_name): r = send_raw_request(cmd.cli_ctx, "GET", request_url) return r.json() +class WebAppClient: + @classmethod + def create(cls, cmd, name, resource_group_name, webapp_json): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(webapp_json)) + return r.json() def show_kube_environments(cmd, name, resource_group_name): @@ -456,12 +472,11 @@ def _get_kube_env_from_custom_location(cmd, custom_location, resource_group): for kube in kube_envs: parsed_custom_location_2 = None - if kube.get("properties") and 'extendedLocation' in kube["properties"]: + if kube.get("properties") and kube["properties"].get('extendedLocation'): parsed_custom_location_2 = parse_resource_id(kube["properties"]['extendedLocation']['customLocation']) - elif kube.get("extendedLocation") and kube.get("extendedLocation").get("type") == "customLocation": + elif kube.get("extendedLocation") and kube.get("extendedLocation").get("type") == "CustomLocation": parsed_custom_location_2 = parse_resource_id(kube["extendedLocation"]["name"]) - if parsed_custom_location_2 and ( parsed_custom_location_2.get("name").lower() == custom_location_name.lower()) and ( parsed_custom_location_2.get("resource_group").lower() == resource_group.lower()): @@ -498,7 +513,8 @@ def _get_custom_location_id_from_custom_location(cmd, custom_location_name, reso def _get_custom_location_id_from_kube_env(kube): - if kube.get("properties") and 'extendedLocation' in kube["properties"]: + pprint(kube) + if kube.get("properties") and kube["properties"].get("extendedLocation"): return kube["properties"]['extendedLocation'].get('customLocation') elif kube.get("extendedLocation") and kube["extendedLocation"].get("type") == "CustomLocation": return kube["extendedLocation"]["name"] @@ -512,6 +528,7 @@ def _ensure_kube_settings_in_json(appservice_plan_json, extended_location=None, appservice_plan_json["extendedLocation"] = extended_location # TODO test with an ASE, non-kube plan +# TODO test with new "_get_kube_env_from_custom_location" impl def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): @@ -614,16 +631,16 @@ def _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, client = web_client_factory(cmd.cli_ctx) if is_valid_resource_id(plan): parse_result = parse_resource_id(plan) - plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) + plan_info = AppServiceClient.show(cmd=cmd, name=parse_result['name'], resource_group_name=parse_result["resource_group"]) else: - plan_info = client.app_service_plans.get(resource_group_name, plan) + plan_info = AppServiceClient.show(cmd=cmd, name=plan, resource_group_name=resource_group_name) if not plan_info: raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) plan_kube_env_id = "" custom_location_kube_env_id = _get_kube_env_from_custom_location(cmd, custom_location, resource_group_name) - if plan_info.kube_environment_profile: - plan_kube_env_id = plan_info.kube_environment_profile.id + if plan_info["properties"].get("kubeEnvironmentProfile"): + plan_kube_env_id = plan_info["properties"]["kubeEnvironmentProfile"]["id"] return plan_kube_env_id.lower() == custom_location_kube_env_id.lower() @@ -650,8 +667,8 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo multicontainer_config_type=None, multicontainer_config_file=None, tags=None, using_webapp_up=False, language=None, assign_identities=None, role='Contributor', scope=None, min_worker_count=None, max_worker_count=None): - SiteConfig, SkuDescription, Site, NameValuePair, ExtendedLocationEnvelope = cmd.get_models( - 'SiteConfig', 'SkuDescription', 'Site', 'NameValuePair', 'ExtendedLocationEnvelope') + SiteConfig, SkuDescription, Site, NameValuePair, AppServicePlan = cmd.get_models( + 'SiteConfig', 'SkuDescription', 'Site', 'NameValuePair', "AppServicePlan") if deployment_source_url and deployment_local_git: raise CLIError('usage error: --deployment-source-url | --deployment-local-git') @@ -702,9 +719,9 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo client = web_client_factory(cmd.cli_ctx) if is_valid_resource_id(plan): parse_result = parse_resource_id(plan) - plan_info = client.app_service_plans.get(parse_result['resource_group'], parse_result['name']) + plan_info = AppServicePlan.from_dict(AppServiceClient.show(cmd=cmd, name=parse_result['name'], resource_group_name=parse_result["resource_group"])) else: - plan_info = client.app_service_plans.get(resource_group_name, plan) + plan_info = AppServicePlan.from_dict(AppServiceClient.show(cmd=cmd, name=plan, resource_group_name=resource_group_name)) if not plan_info: raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) @@ -733,11 +750,12 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo webapp_def.kind = KUBE_APP_KIND if custom_location: # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP + webapp_def.enable_additional_properties_sending() custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location, resource_group_name) if custom_location_id: - webapp_def.extended_location = ExtendedLocationEnvelope(name=custom_location_id, type="CustomLocation") + webapp_def.additional_properties["extendedLocation"] = {'name': custom_location_id, 'type': 'CustomLocation'} else: - webapp_def.extended_location = plan_info.extended_location + webapp_def.additional_properties["extendedLocation"] = plan_info.additional_properties["extendedLocation"] if is_kube: if min_worker_count is not None: @@ -824,7 +842,8 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo value='https://{}.scm.azurewebsites.net/detectors' .format(name))) - poller = client.web_apps.create_or_update(resource_group_name, name, webapp_def) + # WebAppClient.create(cmd=cmd, name=name, resource_group_name=resource_group_name, webapp_json=webapp_def.serialize()) + poller = client.web_apps.begin_create_or_update(resource_group_name, name, webapp_def) webapp = LongRunningOperation(cmd.cli_ctx)(poller) if deployment_container_image_name: From e941fa5fc6f9e20c05f5fe85bc5097577ce66f8b Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 17 Sep 2021 16:29:44 -0700 Subject: [PATCH 099/125] fix az webapp show/restart --- .../azext_appservice_kube/commands.py | 3 +- .../azext_appservice_kube/custom.py | 36 +++++++++++++++++-- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index cd4c10dee06..f8f736f74d0 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -68,8 +68,7 @@ def load_command_table(self, _): with self.command_group('webapp') as g: g.custom_command('create', 'create_webapp', exception_handler=ex_handler_factory()) - g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output, - validator=validate_app_or_slot_exists_in_rg) + g.custom_show_command('show', 'show_webapp', table_transformer=transform_web_output) g.custom_command('scale', 'scale_webapp') g.custom_command('restart', 'restart_webapp') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 10de8c5d08a..bdfcf99f34b 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -290,6 +290,34 @@ def create(cls, cmd, name, resource_group_name, webapp_json): r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(webapp_json)) return r.json() + @classmethod + def restart(cls, cmd, resource_group_name, name, slot=None): + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager + api_version = "2020-12-01" + sub_id = get_subscription_id(cmd.cli_ctx) + + # f"{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/restart?api-version={}" + if slot is not None: + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/slots/{}/restart?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + slot, + api_version) + else: + request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/restart?api-version={}".format( + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, + api_version) + + r = send_raw_request(cmd.cli_ctx, "POST", request_url) + return + + + def show_kube_environments(cmd, name, resource_group_name): return KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) @@ -661,6 +689,7 @@ def _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan return False +# TODO test more; test with slots def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custom_location=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None, @@ -875,12 +904,13 @@ def scale_webapp(cmd, resource_group_name, name, instance_count, slot=None): number_of_workers=instance_count, slot=slot) +# TODO test with slots def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): webapp = app_instance if not app_instance: # when the routine is invoked as a help method, not through commands webapp = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) if not webapp: - raise CLIError("'{}' app doesn't exist".format(name)) + raise ResourceNotFoundError("WebApp'{}', is not found on RG '{}'.".format(name, resource_group_name)) webapp.site_config = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get_configuration', slot) _rename_server_farm_props(webapp) @@ -1309,7 +1339,7 @@ def list_publish_profiles(cmd, resource_group_name, name, slot=None, xml=False): import xmltodict content = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, - 'list_publishing_profile_xml_with_secrets', slot) + 'list_publishing_profile_xml_with_secrets', slot, {"format": "WebDeploy"}) full_xml = '' for f in content: full_xml += f.decode() @@ -1637,7 +1667,7 @@ def _get_scm_url(cmd, resource_group_name, name, slot=None): def restart_webapp(cmd, resource_group_name, name, slot=None): - return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'restart', slot) + return WebAppClient.restart(cmd=cmd, resource_group_name=resource_group_name, name=name, slot=slot) def _check_zip_deployment_status(cmd, rg_name, name, deployment_status_url, authorization, timeout=None): From ebb6a9c0f539105e87d479e17b35dce6030404f1 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 23 Sep 2021 13:49:15 -0700 Subject: [PATCH 100/125] remove 'az webapp config container set' --- .../azext_appservice_kube/commands.py | 3 -- .../azext_appservice_kube/custom.py | 50 ++----------------- 2 files changed, 5 insertions(+), 48 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index f8f736f74d0..9cd7dd99416 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -72,9 +72,6 @@ def load_command_table(self, _): g.custom_command('scale', 'scale_webapp') g.custom_command('restart', 'restart_webapp') - with self.command_group('webapp config container') as g: - g.custom_command('set', 'update_container_settings') - with self.command_group('webapp deployment source') as g: g.custom_command('config-zip', 'enable_zip_deploy_webapp') diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index bdfcf99f34b..c35792c0d2b 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -25,6 +25,8 @@ from knack.log import get_logger from azure.cli.command_modules.appservice.custom import ( + update_container_settings, + _build_identities_info, list_webapp, _rename_server_farm_props, _generic_settings_operation, @@ -541,7 +543,6 @@ def _get_custom_location_id_from_custom_location(cmd, custom_location_name, reso def _get_custom_location_id_from_kube_env(kube): - pprint(kube) if kube.get("properties") and kube["properties"].get("extendedLocation"): return kube["properties"]['extendedLocation'].get('customLocation') elif kube.get("extendedLocation") and kube["extendedLocation"].get("type") == "CustomLocation": @@ -655,6 +656,7 @@ def update_app_service_plan(cmd, resource_group_name, name, sku=None, number_of_ return sdk_no_wait(no_wait, AppServiceClient.update, cmd=cmd, name=name, resource_group_name=resource_group_name, appservice_json=plan) + def _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): client = web_client_factory(cmd.cli_ctx) if is_valid_resource_id(plan): @@ -688,8 +690,8 @@ def _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan else: # plan is not None return False - # TODO test more; test with slots +# TODO test with assigning an identity def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custom_location=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None, @@ -871,7 +873,6 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo value='https://{}.scm.azurewebsites.net/detectors' .format(name))) - # WebAppClient.create(cmd=cmd, name=name, resource_group_name=resource_group_name, webapp_json=webapp_def.serialize()) poller = client.web_apps.begin_create_or_update(resource_group_name, name, webapp_def) webapp = LongRunningOperation(cmd.cli_ctx)(poller) @@ -899,6 +900,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo return webapp +# TODO ask calvin about this def scale_webapp(cmd, resource_group_name, name, instance_count, slot=None): return update_site_configs(cmd, resource_group_name, name, number_of_workers=instance_count, slot=slot) @@ -1160,48 +1162,6 @@ def update_container_settings_functionapp(cmd, resource_group_name, name, docker multicontainer_config_file=None, slot=slot) -def update_container_settings(cmd, resource_group_name, name, docker_registry_server_url=None, - docker_custom_image_name=None, docker_registry_server_user=None, - websites_enable_app_service_storage=None, docker_registry_server_password=None, - multicontainer_config_type=None, multicontainer_config_file=None, slot=None): - settings = [] - if docker_registry_server_url is not None: - settings.append('DOCKER_REGISTRY_SERVER_URL=' + docker_registry_server_url) - - if (not docker_registry_server_user and not docker_registry_server_password and - docker_registry_server_url and '.azurecr.io' in docker_registry_server_url): - logger.warning('No credential was provided to access Azure Container Registry. Trying to look up...') - parsed = urlparse(docker_registry_server_url) - registry_name = (parsed.netloc if parsed.scheme else parsed.path).split('.')[0] - try: - docker_registry_server_user, docker_registry_server_password = _get_acr_cred(cmd.cli_ctx, registry_name) - except Exception as ex: # pylint: disable=broad-except - logger.warning("Retrieving credentials failed with an exception:'%s'", ex) # consider throw if needed - - if docker_registry_server_user is not None: - settings.append('DOCKER_REGISTRY_SERVER_USERNAME=' + docker_registry_server_user) - if docker_registry_server_password is not None: - settings.append('DOCKER_REGISTRY_SERVER_PASSWORD=' + docker_registry_server_password) - if docker_custom_image_name is not None: - _add_fx_version(cmd, resource_group_name, name, docker_custom_image_name, slot) - if websites_enable_app_service_storage: - settings.append('WEBSITES_ENABLE_APP_SERVICE_STORAGE=' + websites_enable_app_service_storage) - - if docker_registry_server_user or docker_registry_server_password or docker_registry_server_url or websites_enable_app_service_storage: # pylint: disable=line-too-long - update_app_settings(cmd, resource_group_name, name, settings, slot) - settings = get_app_settings(cmd, resource_group_name, name, slot) - - if multicontainer_config_file and multicontainer_config_type: - encoded_config_file = _get_linux_multicontainer_encoded_config_from_file(multicontainer_config_file) - linux_fx_version = _format_fx_version(encoded_config_file, multicontainer_config_type) - update_site_configs(cmd, resource_group_name, name, linux_fx_version=linux_fx_version, slot=slot) - elif multicontainer_config_file or multicontainer_config_type: - logger.warning('Must change both settings --multicontainer-config-file FILE --multicontainer-config-type TYPE') - - return _mask_creds_related_appsettings(_filter_for_container_settings(cmd, resource_group_name, name, settings, - slot=slot)) - - def try_create_application_insights(cmd, functionapp): creation_failed_warn = 'Unable to create the Application Insights for the Function App. ' \ 'Please use the Azure Portal to manually create and configure the Application Insights, ' \ From cb66bff5e2f97171d68888e487315b774063af0a Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Mon, 27 Sep 2021 15:32:28 -0500 Subject: [PATCH 101/125] remove uneeded TODOs --- .../azext_appservice_kube/custom.py | 34 ++++++------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index c35792c0d2b..b31db8c839d 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -152,11 +152,6 @@ def show(cls, cmd, resource_group_name, name): r = send_raw_request(cmd.cli_ctx, "GET", request_url) return r.json() - # TODO - @classmethod - def wait(cls): - raise NotImplementedError() - @classmethod def delete(cls, cmd, resource_group_name, name): management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager @@ -320,7 +315,7 @@ def restart(cls, cmd, resource_group_name, name, slot=None): - +# TODO check return format def show_kube_environments(cmd, name, resource_group_name): return KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) @@ -349,21 +344,17 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta if not location: location = custom_location_object.location - # TODO replace with a FrontEndConfiguration model from the SDK front_end_configuration = {"kind": "LoadBalancer"} - # TODO replace with an ExtendedLocation model from the SDK - # TODO may need to make this a custom location ID + extended_location = {"customLocation":custom_location} - # TODO replace with an ArcConfiguration model from the SDK arc_configuration = { "artifactsStorageType": "NetworkFileSystem", "artifactStorageClassName": "default", "frontEndServiceConfiguration": front_end_configuration } - # TODO replace with a KubeEnvironmentEnvelope model from the SDK kube_environment = { "kind": None, "location": location, @@ -376,7 +367,6 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta } try: - # TODO add support for wait/no_wait polling behavior return sdk_no_wait(no_wait, KubeEnvironmentClient.create, cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) except Exception as e: try: @@ -392,29 +382,24 @@ def list_kube_environments(cmd, resource_group_name=None): return KubeEnvironmentClient.list_by_subscription(cmd) return KubeEnvironmentClient.list_by_resource_group(cmd, resource_group_name) -# TODO follow up with Lima team on whether the update API is functional or not and if the CLI needs to support `az appservice kube update` +# TODO should be able to update staticIp and tags -- remove exception once API fixed def update_kube_environment(cmd, name, resource_group_name, custom_location=None, static_ip=None, location=None, - tags=None, no_wait=False): + tags=None, no_wait=False): raise CLIError("Update is not yet supported for Kubernetes Environments.") # Raises an exception if the kube environment doesn't exist KubeEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name) - # TODO replace with a FrontEndConfiguration model from the SDK front_end_configuration = {"kind": "LoadBalancer"} - # TODO replace with an ExtendedLocation model from the SDK - # TODO may need to make this a custom location ID extended_location = {"customLocation":custom_location} - # TODO replace with an ArcConfiguration model from the SDK arc_configuration = { "artifactsStorageType": "NetworkFileSystem", "artifactStorageClassName": "default", "frontEndServiceConfiguration": front_end_configuration } - # TODO replace with a KubeEnvironmentEnvelope model from the SDK kube_environment = { "kind": None, "location": location, @@ -692,6 +677,7 @@ def _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan # TODO test more; test with slots # TODO test with assigning an identity +# TODO test with normal webapp def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custom_location=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None, @@ -900,7 +886,6 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo return webapp -# TODO ask calvin about this def scale_webapp(cmd, resource_group_name, name, instance_count, slot=None): return update_site_configs(cmd, resource_group_name, name, number_of_workers=instance_count, slot=slot) @@ -998,7 +983,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, functionapp_def.location = location is_kube = False - if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU): + if custom_location or plan_info is not None and (plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU)): is_kube = True if is_kube: @@ -1041,12 +1026,13 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, con_string = _validate_and_get_connection_string(cmd.cli_ctx, resource_group_name, storage_account) if is_kube: + functionapp_def.enable_additional_properties_sending() if custom_location: # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location, resource_group_name) if custom_location_id: - functionapp_def.extended_location = ExtendedLocationEnvelope(name=custom_location_id, type="CustomLocation") + functionapp_def.additional_properties["extendedLocation"] = {'name': custom_location_id, 'type': 'CustomLocation'} else: - functionapp_def.extended_location = plan_info.extended_location + functionapp_def.additional_properties["extendedLocation"] = plan_info.additional_properties["extendedLocation"] functionapp_def.kind = KUBE_FUNCTION_APP_KIND functionapp_def.reserved = True @@ -1127,7 +1113,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, elif not disable_app_insights: create_app_insights = True - poller = client.web_apps.create_or_update(resource_group_name, name, functionapp_def) + poller = client.web_apps.begin_create_or_update(resource_group_name, name, functionapp_def) functionapp = LongRunningOperation(cmd.cli_ctx)(poller) if consumption_plan_location and is_linux: From 7fc671e43391090736f0adfa282fd95ee8539cb2 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Mon, 27 Sep 2021 16:08:54 -0500 Subject: [PATCH 102/125] format results of 'az appservice kube show/list' --- .../azext_appservice_kube/custom.py | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index b31db8c839d..92f268dffa7 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -168,7 +168,7 @@ def delete(cls, cmd, resource_group_name, name): return None # API doesn't return JSON for some reason @classmethod - def list_by_subscription(cls, cmd): + def list_by_subscription(cls, cmd, formatter=lambda x:x): kube_list = [] management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager @@ -182,19 +182,21 @@ def list_by_subscription(cls, cmd): r = send_raw_request(cmd.cli_ctx, "GET", request_url) j = r.json() for kube in j["value"]: - kube_list.append(kube) + formatted = formatter(kube) + kube_list.append(formatted) while j["nextLink"] is not None: request_url = j["nextLink"] r = send_raw_request(cmd.cli_ctx, "GET", request_url) j = r.json() for kube in j["value"]: - kube_list.append(kube) + formatted = formatter(kube) + kube_list.append(formatted) return kube_list @classmethod - def list_by_resource_group(cls, cmd, resource_group_name): + def list_by_resource_group(cls, cmd, resource_group_name, formatter=lambda x:x): kube_list = [] management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager @@ -209,14 +211,16 @@ def list_by_resource_group(cls, cmd, resource_group_name): r = send_raw_request(cmd.cli_ctx, "GET", request_url) j = r.json() for kube in j["value"]: - kube_list.append(kube) + formatted = formatter(kube) + kube_list.append(formatted) while j["nextLink"] is not None: request_url = j["nextLink"] r = send_raw_request(cmd.cli_ctx, "GET", request_url) j = r.json() for kube in j["value"]: - kube_list.append(kube) + formatted = formatter(kube) + kube_list.append(formatted) return kube_list @@ -314,10 +318,22 @@ def restart(cls, cmd, resource_group_name, name, slot=None): return +# rectify the format of the kube environment json returned from API to comply with older version of `az appservice kube sho` +def format_kube_environment_json(kube_info_raw): + kube_info = kube_info_raw["properties"] + if kube_info.get("aksResourceID"): + kube_info["aksResourceId"] = kube_info["aksResourceID"] + del kube_info["aksResourceID"] + + other_properties = ['id', 'kind', 'kubeEnvironmentType', 'location', 'name', 'resourceGroup', 'tags', 'type', 'extendedLocation'] + for k in other_properties: + kube_info[k] = kube_info_raw.get(k) + + return kube_info + -# TODO check return format def show_kube_environments(cmd, name, resource_group_name): - return KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name) + return format_kube_environment_json(KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name)) def delete_kube_environment(cmd, name, resource_group_name): # Raises an exception if the kube environment doesn't exist @@ -376,11 +392,11 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta raise e raise ValidationError(msg) -# TODO check returned data format + def list_kube_environments(cmd, resource_group_name=None): if resource_group_name is None: - return KubeEnvironmentClient.list_by_subscription(cmd) - return KubeEnvironmentClient.list_by_resource_group(cmd, resource_group_name) + return KubeEnvironmentClient.list_by_subscription(cmd, formatter=format_kube_environment_json) + return KubeEnvironmentClient.list_by_resource_group(cmd, resource_group_name, formatter=format_kube_environment_json) # TODO should be able to update staticIp and tags -- remove exception once API fixed def update_kube_environment(cmd, name, resource_group_name, custom_location=None, static_ip=None, location=None, From 110081f19cf9458cf19b1d734615cd668c3bf9bc Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Wed, 29 Sep 2021 15:49:56 -0500 Subject: [PATCH 103/125] remove TODOs and fix 'az webapp show -s' --- .../azext_appservice_kube/_utils.py | 9 +++++---- .../azext_appservice_kube/custom.py | 14 +++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index 3ac629704b7..453a1007364 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -85,18 +85,19 @@ def validate_aks_id(cli_ctx, aks, resource_group_name): def _generic_site_operation(cli_ctx, resource_group_name, name, operation_name, slot=None, - extra_parameter=None, client=None): - client = client or web_client_factory(cli_ctx) + extra_parameter=None, client=None, api_version=None): + # api_version was added to support targeting a specific API + # Based on get_appconfig_service_client example + client = client or web_client_factory(cli_ctx, api_version=api_version) operation = getattr(client.web_apps, operation_name if slot is None else operation_name + '_slot') if slot is None: return (operation(resource_group_name, name) if extra_parameter is None else operation(resource_group_name, name, extra_parameter)) - return (operation(resource_group_name, name, slot) if extra_parameter is None else operation(resource_group_name, - name, extra_parameter, slot)) + name, slot, extra_parameter)) def _get_location_from_resource_group(cli_ctx, resource_group_name): diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 92f268dffa7..424637c3ae4 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -318,7 +318,7 @@ def restart(cls, cmd, resource_group_name, name, slot=None): return -# rectify the format of the kube environment json returned from API to comply with older version of `az appservice kube sho` +# rectify the format of the kube environment json returned from API to comply with older version of `az appservice kube show` def format_kube_environment_json(kube_info_raw): kube_info = kube_info_raw["properties"] if kube_info.get("aksResourceID"): @@ -557,8 +557,7 @@ def _ensure_kube_settings_in_json(appservice_plan_json, extended_location=None, if appservice_plan_json.get("extendedLocation") is None and extended_location is not None: appservice_plan_json["extendedLocation"] = extended_location -# TODO test with an ASE, non-kube plan -# TODO test with new "_get_kube_env_from_custom_location" impl + def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): @@ -634,7 +633,7 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype return sdk_no_wait(no_wait, AppServiceClient.create, cmd=cmd, name=name, resource_group_name=resource_group_name, appservice_json=plan_json) -# TODO test; test with non-kube plans + def update_app_service_plan(cmd, resource_group_name, name, sku=None, number_of_workers=None, no_wait=False): client = web_client_factory(cmd.cli_ctx) plan = client.app_service_plans.get(resource_group_name, name).serialize() @@ -691,9 +690,7 @@ def _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan else: # plan is not None return False -# TODO test more; test with slots -# TODO test with assigning an identity -# TODO test with normal webapp + def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custom_location=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', deployment_local_git=None, docker_registry_server_password=None, docker_registry_server_user=None, @@ -907,7 +904,6 @@ def scale_webapp(cmd, resource_group_name, name, instance_count, slot=None): number_of_workers=instance_count, slot=slot) -# TODO test with slots def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): webapp = app_instance if not app_instance: # when the routine is invoked as a help method, not through commands @@ -917,7 +913,7 @@ def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): webapp.site_config = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get_configuration', slot) _rename_server_farm_props(webapp) - # TODO: get rid of this conditional once the api's are implemented for kubapps + # TODO: get rid of this conditional once the api's are implemented for kubeapps if KUBE_APP_KIND.lower() not in webapp.kind.lower(): _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot) From 6731f84e13c5d1e2989b7b2e97f35331f84a6f7c Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 30 Sep 2021 09:28:40 -0500 Subject: [PATCH 104/125] add misc style fixes --- .../azext_appservice_kube/__init__.py | 3 - .../_appservice_utils.py | 1 - .../azext_appservice_kube/_client_factory.py | 7 +- .../azext_appservice_kube/_create_util.py | 10 +- .../azext_appservice_kube/_params.py | 4 +- .../azext_appservice_kube/_utils.py | 2 +- .../azext_appservice_kube/_validators.py | 4 - .../azext_appservice_kube/commands.py | 1 - .../azext_appservice_kube/custom.py | 240 ++++++++---------- 9 files changed, 121 insertions(+), 151 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/__init__.py b/src/appservice-kube/azext_appservice_kube/__init__.py index 06f46a0ca09..ba10f2510ea 100644 --- a/src/appservice-kube/azext_appservice_kube/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/__init__.py @@ -4,7 +4,6 @@ # -------------------------------------------------------------------------------------------- from azure.cli.core import AzCommandsLoader -from azure.cli.core.profiles import register_resource_type from azext_appservice_kube._help import helps # pylint: disable=unused-import @@ -36,5 +35,3 @@ def load_arguments(self, command): COMMAND_LOADER_CLS = AppserviceCommandsLoader - - diff --git a/src/appservice-kube/azext_appservice_kube/_appservice_utils.py b/src/appservice-kube/azext_appservice_kube/_appservice_utils.py index de5ade1fe70..2e6b646ceda 100644 --- a/src/appservice-kube/azext_appservice_kube/_appservice_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_appservice_utils.py @@ -19,4 +19,3 @@ def _generic_site_operation(cli_ctx, resource_group_name, name, operation_name, return (operation(resource_group_name, name, slot) if extra_parameter is None else operation(resource_group_name, name, extra_parameter, slot)) - diff --git a/src/appservice-kube/azext_appservice_kube/_client_factory.py b/src/appservice-kube/azext_appservice_kube/_client_factory.py index dec287eea06..68b3c60a951 100644 --- a/src/appservice-kube/azext_appservice_kube/_client_factory.py +++ b/src/appservice-kube/azext_appservice_kube/_client_factory.py @@ -3,9 +3,9 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.command_modules.appservice._client_factory import web_client_factory -from azure.cli.core.profiles import ResourceType, CustomResourceType +from azure.cli.core.profiles import ResourceType # pylint: disable=inconsistent-return-statements @@ -35,10 +35,9 @@ def _polish_bad_errors(ex): def customlocation_client_factory(cli_ctx, **_): return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_CUSTOMLOCATION) - + def resource_client_factory(cli_ctx, **_): - from azure.cli.core.profiles import ResourceType return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py index 500d97c7f84..50701255c19 100644 --- a/src/appservice-kube/azext_appservice_kube/_create_util.py +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -8,7 +8,6 @@ from os import path from knack.util import CLIError from knack.log import get_logger -from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.mgmt.web.models import SkuDescription from ._constants import (NETCORE_VERSION_DEFAULT, NETCORE_VERSIONS, NODE_VERSION_DEFAULT, @@ -18,7 +17,8 @@ from ._client_factory import web_client_factory, resource_client_factory logger = get_logger(__name__) -def get_runtime_version_details(file_path, lang_name, is_kube = False): + +def get_runtime_version_details(file_path, lang_name, is_kube=False): version_detected = None version_to_create = None if lang_name.lower() == NETCORE_RUNTIME_NAME: @@ -46,7 +46,8 @@ def get_runtime_version_details(file_path, lang_name, is_kube = False): version_to_create = "-" return {'detected': version_detected, 'to_create': version_to_create} -def zip_contents_from_dir(dirPath, lang, is_kube = None): + +def zip_contents_from_dir(dirPath, lang, is_kube=None): relroot = os.path.abspath(os.path.join(dirPath, os.pardir)) path_and_file = os.path.splitdrive(dirPath)[1] @@ -71,6 +72,7 @@ def zip_contents_from_dir(dirPath, lang, is_kube = None): zf.write(absname, arcname) return zip_file_path + def create_resource_group(cmd, rg_name, location): from azure.cli.core.profiles import ResourceType, get_sdk rcf = resource_client_factory(cmd.cli_ctx) @@ -369,6 +371,7 @@ def get_plan_to_use(cmd, user, os_name, loc, sku, create_rg, resource_group_name return _determine_if_default_plan_to_use(cmd, _default_asp, resource_group_name, loc, sku, create_rg) return plan + def get_kube_plan_to_use(cmd, kube_environment, loc, sku, create_rg, resource_group_name, plan=None): _default_asp = "{}_asp_{}_{}_0".format(kube_environment, sku, resource_group_name) if plan is None: # --plan not provided by user @@ -426,4 +429,3 @@ def generate_default_app_service_plan_name(webapp_name): webapp_name = webapp_name[:222] # max length for app service plan name is 260 return '{}_plan_{}'.format(webapp_name, random_uuid) - diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index f842f5f19a9..c3ba37d5438 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -141,8 +141,8 @@ def load_arguments(self, _): with self.argument_context('appservice plan update') as c: c.argument('sku', - help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), K1 (Kubernetes)', - arg_type=sku_arg_type) + help='The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), K1 (Kubernetes)', + arg_type=sku_arg_type) c.ignore('allow_pending_state') # App Service on Kubernetes Commands diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index 453a1007364..51de8b6b029 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -14,7 +14,7 @@ def _normalize_sku(sku): return 'F1' if sku == 'SHARED': return 'D1' - if sku == 'ANY' or sku == 'ELASTICANY': # old kube skus + if sku in ('ANY', 'ELASTICANY'): # old kube skus return 'K1' if sku == 'KUBE': return 'K1' diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py index 67ffe556779..e9a4f110f9b 100644 --- a/src/appservice-kube/azext_appservice_kube/_validators.py +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -4,10 +4,6 @@ # -------------------------------------------------------------------------------------------- from knack.util import CLIError -from msrestazure.tools import is_valid_resource_id, parse_resource_id -from azure.cli.command_modules.appservice._validators import ( - validate_site_create -) from azure.cli.core.commands.client_factory import get_mgmt_service_client from ._client_factory import web_client_factory from ._utils import _normalize_sku diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index 9cd7dd99416..e31ae6a6825 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -7,7 +7,6 @@ from azure.cli.core.commands import CliCommandType from ._client_factory import cf_plans -from ._validators import validate_asp_sku, validate_app_or_slot_exists_in_rg def transform_web_output(web): diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 424637c3ae4..5646499de29 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -3,38 +3,24 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -import re import time from binascii import hexlify from os import urandom import json -import ssl -import sys -import platform from azure.cli.core.util import send_raw_request from azure.cli.core.commands.client_factory import get_subscription_id -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse # pylint: disable=import-error - from knack.util import CLIError from knack.log import get_logger from azure.cli.command_modules.appservice.custom import ( update_container_settings, - _build_identities_info, - list_webapp, _rename_server_farm_props, - _generic_settings_operation, - _build_app_settings_output, get_site_configs, get_webapp, _get_site_credential, - _mask_creds_related_appsettings, _format_fx_version, _get_extension_version_functionapp, _validate_app_service_environment_id, @@ -50,10 +36,7 @@ is_plan_elastic_premium, enable_local_git, _validate_and_get_connection_string, - _get_acr_cred, _get_linux_multicontainer_encoded_config_from_file, - _filter_for_container_settings, - _get_url, _StackRuntimeHelper, upload_zip_to_storage, is_plan_consumption, @@ -64,48 +47,37 @@ from azure.cli.command_modules.appservice.utils import retryable_method -from azure.cli.core.util import sdk_no_wait, shell_safe_json_parse, get_json_object, ConfiguredDefaultSetter +from azure.cli.core.util import sdk_no_wait, get_json_object from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands import LongRunningOperation -from azure.mgmt.storage import StorageManagementClient from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient from azure.cli.core.util import get_az_user_agent from azure.cli.core.azclierror import (ResourceNotFoundError, RequiredArgumentMissingError, ValidationError, - CLIInternalError, UnclassifiedUserFault, AzureResponseError, ArgumentUsageError, MutuallyExclusiveArgumentError) from msrestazure.tools import is_valid_resource_id, parse_resource_id -from six.moves.urllib.request import urlopen - from ._constants import (FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION, FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION, - FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_VERSION_DEFAULT, NODE_EXACT_VERSION_DEFAULT, + FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, NODE_EXACT_VERSION_DEFAULT, DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION, KUBE_DEFAULT_SKU, - KUBE_ASP_KIND, KUBE_APP_KIND, KUBE_FUNCTION_APP_KIND, KUBE_FUNCTION_CONTAINER_APP_KIND, KUBE_CONTAINER_APP_KIND, - LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES,CONTAINER_APPSETTING_NAMES, APPSETTINGS_TO_MASK) - -from ._utils import (_normalize_sku, get_sku_name, validate_subnet_id, _generic_site_operation, - _get_location_from_resource_group, validate_aks_id) -from ._create_util import (zip_contents_from_dir, get_runtime_version_details, create_resource_group, get_app_details, - should_create_new_rg, set_location, get_site_availability, does_app_already_exist, get_profile_username, - get_plan_to_use,get_kube_plan_to_use, get_lang_from_content, get_rg_to_use, get_sku_to_use, - detect_os_form_src, get_current_stack_from_runtime, generate_default_app_service_plan_name) + KUBE_ASP_KIND, KUBE_APP_KIND, KUBE_FUNCTION_APP_KIND, KUBE_FUNCTION_CONTAINER_APP_KIND, + KUBE_CONTAINER_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES) + +from ._utils import (_normalize_sku, get_sku_name, _generic_site_operation, + _get_location_from_resource_group) +from ._create_util import (get_app_details, get_site_availability, get_current_stack_from_runtime, + generate_default_app_service_plan_name) from ._client_factory import web_client_factory, ex_handler_factory, customlocation_client_factory -import subprocess -from subprocess import PIPE -import tempfile -import shutil -import os logger = get_logger(__name__) # pylint: disable=too-many-locals,too-many-lines -# TODO remove and replace with calls to KubeEnvironmentsOperations once the SDK gets updated +# TODO remove and replace with calls to KubeEnvironmentsOperations once the SDK gets updated class KubeEnvironmentClient(): @classmethod def create(cls, cmd, resource_group_name, name, kube_environment_envelope): @@ -113,10 +85,10 @@ def create(cls, cmd, resource_group_name, name, kube_environment_envelope): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(kube_environment_envelope)) @@ -128,10 +100,10 @@ def update(cls, cmd, name, resource_group_name, kube_environment_envelope): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) r = send_raw_request(cmd.cli_ctx, "PATCH", request_url, body=json.dumps(kube_environment_envelope)) @@ -143,10 +115,10 @@ def show(cls, cmd, resource_group_name, name): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) r = send_raw_request(cmd.cli_ctx, "GET", request_url) @@ -158,33 +130,33 @@ def delete(cls, cmd, resource_group_name, name): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) - r = send_raw_request(cmd.cli_ctx, "DELETE", request_url) - return None # API doesn't return JSON for some reason + send_raw_request(cmd.cli_ctx, "DELETE", request_url) + return None # API doesn't return JSON for some reason @classmethod - def list_by_subscription(cls, cmd, formatter=lambda x:x): + def list_by_subscription(cls, cmd, formatter=lambda x: x): kube_list = [] management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/providers/Microsoft.Web/kubeEnvironments?api-version={}".format( - management_hostname.strip('/'), + management_hostname.strip('/'), sub_id, api_version) - + r = send_raw_request(cmd.cli_ctx, "GET", request_url) j = r.json() for kube in j["value"]: formatted = formatter(kube) kube_list.append(formatted) - + while j["nextLink"] is not None: request_url = j["nextLink"] r = send_raw_request(cmd.cli_ctx, "GET", request_url) @@ -196,14 +168,14 @@ def list_by_subscription(cls, cmd, formatter=lambda x:x): return kube_list @classmethod - def list_by_resource_group(cls, cmd, resource_group_name, formatter=lambda x:x): + def list_by_resource_group(cls, cmd, resource_group_name, formatter=lambda x: x): kube_list = [] - + management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments?api-version={}".format( - management_hostname.strip('/'), + management_hostname.strip('/'), sub_id, resource_group_name, api_version) @@ -213,7 +185,7 @@ def list_by_resource_group(cls, cmd, resource_group_name, formatter=lambda x:x): for kube in j["value"]: formatted = formatter(kube) kube_list.append(formatted) - + while j["nextLink"] is not None: request_url = j["nextLink"] r = send_raw_request(cmd.cli_ctx, "GET", request_url) @@ -233,10 +205,10 @@ def create(cls, cmd, name, resource_group_name, appservice_json): sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(appservice_json)) @@ -249,10 +221,10 @@ def update(cls, cmd, name, resource_group_name, appservice_json): sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(appservice_json)) @@ -265,15 +237,16 @@ def show(cls, cmd, name, resource_group_name): sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) r = send_raw_request(cmd.cli_ctx, "GET", request_url) return r.json() + class WebAppClient: @classmethod def create(cls, cmd, name, resource_group_name, webapp_json): @@ -282,10 +255,10 @@ def create(cls, cmd, name, resource_group_name, webapp_json): sub_id = get_subscription_id(cmd.cli_ctx) request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) r = send_raw_request(cmd.cli_ctx, "PUT", request_url, body=json.dumps(webapp_json)) @@ -300,23 +273,23 @@ def restart(cls, cmd, resource_group_name, name, slot=None): # f"{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/restart?api-version={}" if slot is not None: request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/slots/{}/restart?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, slot, api_version) else: request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/restart?api-version={}".format( - management_hostname.strip('/'), - sub_id, - resource_group_name, - name, + management_hostname.strip('/'), + sub_id, + resource_group_name, + name, api_version) - r = send_raw_request(cmd.cli_ctx, "POST", request_url) - return - + send_raw_request(cmd.cli_ctx, "POST", request_url) + return + # rectify the format of the kube environment json returned from API to comply with older version of `az appservice kube show` def format_kube_environment_json(kube_info_raw): @@ -324,25 +297,27 @@ def format_kube_environment_json(kube_info_raw): if kube_info.get("aksResourceID"): kube_info["aksResourceId"] = kube_info["aksResourceID"] del kube_info["aksResourceID"] - + other_properties = ['id', 'kind', 'kubeEnvironmentType', 'location', 'name', 'resourceGroup', 'tags', 'type', 'extendedLocation'] for k in other_properties: kube_info[k] = kube_info_raw.get(k) - + return kube_info def show_kube_environments(cmd, name, resource_group_name): return format_kube_environment_json(KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name)) + def delete_kube_environment(cmd, name, resource_group_name): - # Raises an exception if the kube environment doesn't exist + # Raises an exception if the kube environment doesn't exist KubeEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name) return KubeEnvironmentClient.delete(cmd=cmd, name=name, resource_group_name=resource_group_name) + def create_kube_environment(cmd, name, resource_group_name, custom_location, static_ip=None, location=None, - tags=None, no_wait=False): + tags=None, no_wait=False): custom_location_client = customlocation_client_factory(cmd.cli_ctx) custom_location_object = None @@ -361,23 +336,22 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta location = custom_location_object.location front_end_configuration = {"kind": "LoadBalancer"} - - extended_location = {"customLocation":custom_location} - + extended_location = {"customLocation": custom_location} + arc_configuration = { - "artifactsStorageType": "NetworkFileSystem", - "artifactStorageClassName": "default", + "artifactsStorageType": "NetworkFileSystem", + "artifactStorageClassName": "default", "frontEndServiceConfiguration": front_end_configuration } - + kube_environment = { - "kind": None, + "kind": None, "location": location, "tags": tags, "properties": { - "extendedLocation": extended_location, - "staticIp": static_ip, + "extendedLocation": extended_location, + "staticIp": static_ip, "arcConfiguration": arc_configuration } } @@ -388,7 +362,7 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta try: import json msg = json.loads(e.response._content)['Message'] - except Exception as err: + except Exception: raise e raise ValidationError(msg) @@ -398,36 +372,37 @@ def list_kube_environments(cmd, resource_group_name=None): return KubeEnvironmentClient.list_by_subscription(cmd, formatter=format_kube_environment_json) return KubeEnvironmentClient.list_by_resource_group(cmd, resource_group_name, formatter=format_kube_environment_json) -# TODO should be able to update staticIp and tags -- remove exception once API fixed + +# TODO should be able to update staticIp and tags -- remove exception once API fixed def update_kube_environment(cmd, name, resource_group_name, custom_location=None, static_ip=None, location=None, - tags=None, no_wait=False): + tags=None, no_wait=False): raise CLIError("Update is not yet supported for Kubernetes Environments.") - - # Raises an exception if the kube environment doesn't exist + + # Raises an exception if the kube environment doesn't exist KubeEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name) front_end_configuration = {"kind": "LoadBalancer"} - - extended_location = {"customLocation":custom_location} - + + extended_location = {"customLocation": custom_location} + arc_configuration = { - "artifactsStorageType": "NetworkFileSystem", - "artifactStorageClassName": "default", + "artifactsStorageType": "NetworkFileSystem", + "artifactStorageClassName": "default", "frontEndServiceConfiguration": front_end_configuration } - + kube_environment = { - "kind": None, - "location": location, + "kind": None, + "location": location, "properties": { - "extendedLocation": extended_location, - "staticIp": static_ip, + "extendedLocation": extended_location, + "staticIp": static_ip, "arcConfiguration": arc_configuration } } if tags is not None: - kube_environment["tags"] = tags + kube_environment["tags"] = tags return sdk_no_wait(no_wait, KubeEnvironmentClient.update, cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) @@ -480,7 +455,7 @@ def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, p raise ArgumentUsageError('Only Linux is supported with using Custom Location. Please re-run with --is-linux flag.') return create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling, custom_location, - app_service_environment, sku, number_of_workers, location, tags, no_wait) + app_service_environment, sku, number_of_workers, location, tags, no_wait) def get_vm_sizes(cli_ctx, location): @@ -526,7 +501,7 @@ def _get_custom_location_id_from_custom_location(cmd, custom_location_name, reso # kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_resource_group(resource_group_name) kube_envs = KubeEnvironmentClient.list_by_subscription(cmd=cmd, resource_group_name=resource_group_name) - + for kube in kube_envs: parsed_custom_location = None custom_location_id = None @@ -559,8 +534,8 @@ def _ensure_kube_settings_in_json(appservice_plan_json, extended_location=None, def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, - app_service_environment=None, sku=None, - number_of_workers=None, location=None, tags=None, no_wait=False): + app_service_environment=None, sku=None, + number_of_workers=None, location=None, tags=None, no_wait=False): HostingEnvironmentProfile, SkuDescription, AppServicePlan = cmd.get_models( 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan') @@ -734,7 +709,8 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) create_app_service_plan(cmd=cmd, resource_group_name=resource_group_name, - name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True, number_of_workers=1) + name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, + per_site_scaling=True, number_of_workers=1) if custom_location and plan: if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): @@ -794,7 +770,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo if max_worker_count is not None: site_config.app_settings.append(NameValuePair(name='K8SE_APP_MAX_INSTANCE_COUNT', value=max_worker_count)) - if deployment_container_image_name: + if deployment_container_image_name: site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) if docker_registry_server_user is not None and docker_registry_server_password is not None: site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) @@ -899,6 +875,7 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo return webapp + def scale_webapp(cmd, resource_group_name, name, instance_count, slot=None): return update_site_configs(cmd, resource_group_name, name, number_of_workers=instance_count, slot=slot) @@ -972,7 +949,8 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) create_app_service_plan(cmd=cmd, resource_group_name=resource_group_name, - name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, per_site_scaling=True, number_of_workers=1) + name=plan, is_linux=True, hyper_v=False, custom_location=custom_location, + per_site_scaling=True, number_of_workers=1) if custom_location and plan: if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): @@ -1596,8 +1574,9 @@ def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=No if is_kube and res.status_code != 202 and res.status_code != 409: logger.warning('Something went wrong. It may take a few seconds for a new deployment to reflect on kube cluster. Retrying deployment...') - time.sleep(10) # retry in a moment - res = requests.post(zip_url, data=zip_content, headers=headers, verify=not should_disable_connection_verify()) + time.sleep(10) # retry in a moment + res = requests.post(zip_url, data=zip_content, headers=headers, + verify=not should_disable_connection_verify()) logger.warning("Deployment endpoint responded with status code %d", res.status_code) # check if there's an ongoing process @@ -1606,7 +1585,6 @@ def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=No "Please track your deployment in {} and ensure the WEBSITE_RUN_FROM_PACKAGE app setting " "is removed.".format(deployment_status_url)) - # check the status of async deployment response = _check_zip_deployment_status(cmd, resource_group_name, name, deployment_status_url, authorization, timeout) @@ -1666,7 +1644,7 @@ def _fill_ftp_publishing_url(cmd, webapp, resource_group_name, name, slot=None): try: url = next((p['publishUrl'] for p in profiles if p['publishMethod'] == 'FTP'), None) setattr(webapp, 'ftpPublishingUrl', url) - except StopIteration as e: + except StopIteration: pass return webapp From e2344c87ac1705122cde0bce373056c2ea1cfe1c Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 30 Sep 2021 13:33:38 -0500 Subject: [PATCH 105/125] fix more style issues --- .../azext_appservice_kube/_create_util.py | 23 +- .../azext_appservice_kube/_help.py | 11 +- .../azext_appservice_kube/_params.py | 7 +- .../azext_appservice_kube/custom.py | 272 ++++++++++-------- 4 files changed, 182 insertions(+), 131 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py index 50701255c19..f66f4e8bacf 100644 --- a/src/appservice-kube/azext_appservice_kube/_create_util.py +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -5,7 +5,6 @@ import os import zipfile -from os import path from knack.util import CLIError from knack.log import get_logger from azure.mgmt.web.models import SkuDescription @@ -125,7 +124,7 @@ def get_lang_from_content(src_path, html=False): fnmatch.fnmatch(file, "*shtml.")): static_html_file = os.path.join(src_path, file) break - elif fnmatch.fnmatch(file, "*.csproj"): + if fnmatch.fnmatch(file, "*.csproj"): package_netcore_file = os.path.join(src_path, file) break @@ -247,11 +246,11 @@ def detect_node_version_tocreate(detected_ver): node_ver = NODE_VERSION_DEFAULT if major_ver < 4: node_ver = NODE_VERSION_DEFAULT - elif major_ver >= 4 and major_ver < 6: + elif 4 <= major_ver < 6: node_ver = '4.5' - elif major_ver >= 6 and major_ver < 8: + elif 6 <= major_ver < 8: node_ver = '6.9' - elif major_ver >= 8 and major_ver < 10: + elif 8 <= major_ver < 10: node_ver = NODE_VERSION_DEFAULT elif major_ver >= 10: node_ver = '10.14' @@ -313,13 +312,13 @@ def does_app_already_exist(cmd, name): def get_app_details(cmd, name, resource_group): client = web_client_factory(cmd.cli_ctx) return client.web_apps.get(resource_group, name) - ''' - data = (list(filter(lambda x: name.lower() in x.name.lower(), client.web_apps.list()))) - _num_items = len(data) - if _num_items > 0: - return data[0] - return None - ''' + # ''' + # data = (list(filter(lambda x: name.lower() in x.name.lower(), client.web_apps.list()))) + # _num_items = len(data) + # if _num_items > 0: + # return data[0] + # return None + # ''' def get_rg_to_use(cmd, user, loc, os_name, rg_name=None): diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index d2abec08890..5b9f07c5c66 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -53,7 +53,16 @@ examples: - name: Create Kubernetes Environment text: | - az appservice kube create -n MyKubeEnvironment -g MyResourceGroup --static-ip 0.0.0.0 + az appservice kube create -n MyKubeEnvironment -g MyResourceGroup --static-ip 0.0.0.0 --custom-location custom_location_id +""" + +helps['appservice kube update'] = """ + type: command + short-summary: Update a Kubernetes Environment. Currently not supported + examples: + - name: Update Kubernetes Environment + text: | + az appservice kube update -n MyKubeEnvironment -g MyResourceGroup --static-ip 0.0.0.0 """ helps['appservice kube show'] = """ diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index c3ba37d5438..e79f789fe05 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -11,10 +11,9 @@ get_resource_name_completion_list, get_three_state_flag, get_enum_type, tags_type) -from ._completers import get_kube_sku_completion_list, get_vm_size_completion_list -from ._constants import (FUNCTIONS_VERSIONS, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, KUBE_DEFAULT_SKU, +from ._constants import (FUNCTIONS_VERSIONS, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES, OS_TYPES) -from ._validators import validate_asp_create, validate_nodes_count, validate_nodepool_name +from ._validators import validate_asp_create def load_arguments(self, _): @@ -27,7 +26,7 @@ def load_arguments(self, _): completer=get_resource_name_completion_list('Microsoft.Web/sites'), id_part='name', help="name of the web app. You can configure the default using `az configure --defaults web=`") - K8SENetworkPlugin = self.get_models('K8SENetworkPlugin') + self.get_models('K8SENetworkPlugin') # combine all runtime versions for all functions versions functionapp_runtime_to_version = {} diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 5646499de29..bbce06490ae 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -9,12 +9,11 @@ from os import urandom import json -from azure.cli.core.util import send_raw_request -from azure.cli.core.commands.client_factory import get_subscription_id - from knack.util import CLIError from knack.log import get_logger +from azure.cli.core.util import send_raw_request, sdk_no_wait, get_json_object +from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.command_modules.appservice.custom import ( update_container_settings, _rename_server_farm_props, @@ -44,15 +43,10 @@ assign_identity, delete_app_settings, update_app_settings) - from azure.cli.command_modules.appservice.utils import retryable_method - -from azure.cli.core.util import sdk_no_wait, get_json_object from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands import LongRunningOperation - from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient - from azure.cli.core.util import get_az_user_agent from azure.cli.core.azclierror import (ResourceNotFoundError, RequiredArgumentMissingError, ValidationError, ArgumentUsageError, MutuallyExclusiveArgumentError) @@ -74,9 +68,9 @@ logger = get_logger(__name__) - # pylint: disable=too-many-locals,too-many-lines + # TODO remove and replace with calls to KubeEnvironmentsOperations once the SDK gets updated class KubeEnvironmentClient(): @classmethod @@ -84,7 +78,8 @@ def create(cls, cmd, resource_group_name, name, kube_environment_envelope): management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -99,7 +94,8 @@ def update(cls, cmd, name, resource_group_name, kube_environment_envelope): management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -114,7 +110,8 @@ def show(cls, cmd, resource_group_name, name): management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -129,15 +126,15 @@ def delete(cls, cmd, resource_group_name, name): management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments/{}?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, name, api_version) - send_raw_request(cmd.cli_ctx, "DELETE", request_url) - return None # API doesn't return JSON for some reason + send_raw_request(cmd.cli_ctx, "DELETE", request_url) # API doesn't return JSON for some reason @classmethod def list_by_subscription(cls, cmd, formatter=lambda x: x): @@ -174,7 +171,8 @@ def list_by_resource_group(cls, cmd, resource_group_name, formatter=lambda x: x) management_hostname = cmd.cli_ctx.cloud.endpoints.resource_manager api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/kubeEnvironments?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -204,7 +202,8 @@ def create(cls, cmd, name, resource_group_name, appservice_json): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -220,7 +219,8 @@ def update(cls, cmd, name, resource_group_name, appservice_json): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -236,7 +236,8 @@ def show(cls, cmd, name, resource_group_name): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/serverfarms/{}?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -254,7 +255,8 @@ def create(cls, cmd, name, resource_group_name, webapp_json): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -270,9 +272,10 @@ def restart(cls, cmd, resource_group_name, name, slot=None): api_version = "2020-12-01" sub_id = get_subscription_id(cmd.cli_ctx) - # f"{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/restart?api-version={}" if slot is not None: - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/slots/{}/restart?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/"\ + "Microsoft.Web/sites/{}/slots/{}/restart?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -280,7 +283,8 @@ def restart(cls, cmd, resource_group_name, name, slot=None): slot, api_version) else: - request_url = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/restart?api-version={}".format( + url_fmt = "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/sites/{}/restart?api-version={}" + request_url = url_fmt.format( management_hostname.strip('/'), sub_id, resource_group_name, @@ -288,17 +292,17 @@ def restart(cls, cmd, resource_group_name, name, slot=None): api_version) send_raw_request(cmd.cli_ctx, "POST", request_url) - return -# rectify the format of the kube environment json returned from API to comply with older version of `az appservice kube show` +# rectify the format of the kube env json returned from API to comply with older version of `az appservice kube show` def format_kube_environment_json(kube_info_raw): kube_info = kube_info_raw["properties"] if kube_info.get("aksResourceID"): kube_info["aksResourceId"] = kube_info["aksResourceID"] del kube_info["aksResourceID"] - other_properties = ['id', 'kind', 'kubeEnvironmentType', 'location', 'name', 'resourceGroup', 'tags', 'type', 'extendedLocation'] + other_properties = ['id', 'kind', 'kubeEnvironmentType', 'location', 'name', + 'resourceGroup', 'tags', 'type', 'extendedLocation'] for k in other_properties: kube_info[k] = kube_info_raw.get(k) @@ -306,7 +310,8 @@ def format_kube_environment_json(kube_info_raw): def show_kube_environments(cmd, name, resource_group_name): - return format_kube_environment_json(KubeEnvironmentClient.show(cmd=cmd, name=name, resource_group_name=resource_group_name)) + return format_kube_environment_json(KubeEnvironmentClient.show(cmd=cmd, + name=name, resource_group_name=resource_group_name)) def delete_kube_environment(cmd, name, resource_group_name): @@ -357,20 +362,23 @@ def create_kube_environment(cmd, name, resource_group_name, custom_location, sta } try: - return sdk_no_wait(no_wait, KubeEnvironmentClient.create, cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) + return sdk_no_wait(no_wait, KubeEnvironmentClient.create, + cmd=cmd, resource_group_name=resource_group_name, + name=name, kube_environment_envelope=kube_environment) except Exception as e: try: - import json msg = json.loads(e.response._content)['Message'] - except Exception: - raise e + except Exception as e2: + raise e from e2 raise ValidationError(msg) def list_kube_environments(cmd, resource_group_name=None): if resource_group_name is None: return KubeEnvironmentClient.list_by_subscription(cmd, formatter=format_kube_environment_json) - return KubeEnvironmentClient.list_by_resource_group(cmd, resource_group_name, formatter=format_kube_environment_json) + return KubeEnvironmentClient.list_by_resource_group(cmd, + resource_group_name, + formatter=format_kube_environment_json) # TODO should be able to update staticIp and tags -- remove exception once API fixed @@ -379,32 +387,33 @@ def update_kube_environment(cmd, name, resource_group_name, custom_location=None raise CLIError("Update is not yet supported for Kubernetes Environments.") # Raises an exception if the kube environment doesn't exist - KubeEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name) + # KubeEnvironmentClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name) - front_end_configuration = {"kind": "LoadBalancer"} + # front_end_configuration = {"kind": "LoadBalancer"} - extended_location = {"customLocation": custom_location} + # extended_location = {"customLocation": custom_location} - arc_configuration = { - "artifactsStorageType": "NetworkFileSystem", - "artifactStorageClassName": "default", - "frontEndServiceConfiguration": front_end_configuration - } + # arc_configuration = { + # "artifactsStorageType": "NetworkFileSystem", + # "artifactStorageClassName": "default", + # "frontEndServiceConfiguration": front_end_configuration + # } - kube_environment = { - "kind": None, - "location": location, - "properties": { - "extendedLocation": extended_location, - "staticIp": static_ip, - "arcConfiguration": arc_configuration - } - } + # kube_environment = { + # "kind": None, + # "location": location, + # "properties": { + # "extendedLocation": extended_location, + # "staticIp": static_ip, + # "arcConfiguration": arc_configuration + # } + # } - if tags is not None: - kube_environment["tags"] = tags + # if tags is not None: + # kube_environment["tags"] = tags - return sdk_no_wait(no_wait, KubeEnvironmentClient.update, cmd=cmd, resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment) + # return sdk_no_wait(no_wait, KubeEnvironmentClient.update, cmd=cmd, resource_group_name=resource_group_name, + # name=name, kube_environment_envelope=kube_environment) def list_app_service_plans(cmd, resource_group_name=None): @@ -422,7 +431,8 @@ def list_app_service_plans(cmd, resource_group_name=None): def _validate_asp_sku(app_service_environment, custom_location, sku): # Isolated SKU is supported only for ASE - if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: + if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', + 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: raise CLIError('Invalid sku entered: {}'.format(sku)) if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: @@ -431,14 +441,15 @@ def _validate_asp_sku(app_service_environment, custom_location, sku): "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") elif app_service_environment: raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " - "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") elif custom_location: # Custom Location only supports K1 if sku.upper() != 'K1': raise CLIError("Only pricing tier 'K1' is allowed for this type of app service plan.") -def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, +def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, + custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): if not sku: @@ -446,16 +457,19 @@ def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, p if custom_location: if not per_site_scaling: - raise ArgumentUsageError('Per Site Scaling must be true when using Custom Location. Please re-run with --per-site-scaling flag') + raise ArgumentUsageError('Per Site Scaling must be true when using Custom Location. ' + 'Please re-run with --per-site-scaling flag') if app_service_environment: raise ArgumentUsageError('App Service Environment is not supported with using Custom Location') if hyper_v: raise ArgumentUsageError('Hyper V is not supported with using Custom Location') if not is_linux: - raise ArgumentUsageError('Only Linux is supported with using Custom Location. Please re-run with --is-linux flag.') + raise ArgumentUsageError('Only Linux is supported with using Custom Location. ' + 'Please re-run with --is-linux flag.') - return create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling, custom_location, - app_service_environment, sku, number_of_workers, location, tags, no_wait) + return create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling, + custom_location, app_service_environment, sku, number_of_workers, location, + tags, no_wait) def get_vm_sizes(cli_ctx, location): @@ -499,8 +513,7 @@ def _get_custom_location_id_from_custom_location(cmd, custom_location_name, reso if is_valid_resource_id(custom_location_name): return custom_location_name - # kube_envs = cf_kube_environments(cmd.cli_ctx).list_by_resource_group(resource_group_name) - kube_envs = KubeEnvironmentClient.list_by_subscription(cmd=cmd, resource_group_name=resource_group_name) + kube_envs = KubeEnvironmentClient.list_by_resource_group(cmd=cmd, resource_group_name=resource_group_name) for kube in kube_envs: parsed_custom_location = None @@ -521,20 +534,22 @@ def _get_custom_location_id_from_custom_location(cmd, custom_location_name, reso def _get_custom_location_id_from_kube_env(kube): if kube.get("properties") and kube["properties"].get("extendedLocation"): return kube["properties"]['extendedLocation'].get('customLocation') - elif kube.get("extendedLocation") and kube["extendedLocation"].get("type") == "CustomLocation": + if kube.get("extendedLocation") and kube["extendedLocation"].get("type") == "CustomLocation": return kube["extendedLocation"]["name"] raise CLIError("Could not get custom location from kube environment") def _ensure_kube_settings_in_json(appservice_plan_json, extended_location=None, kube_env=None): - if appservice_plan_json.get("properties") and appservice_plan_json["properties"].get("kubeEnvironmentProfile") is None and kube_env is not None: + if appservice_plan_json.get("properties") and (appservice_plan_json["properties"].get("kubeEnvironmentProfile") + is None and kube_env is not None): appservice_plan_json["properties"]["kubeEnvironmentProfile"] = kube_env + if appservice_plan_json.get("extendedLocation") is None and extended_location is not None: appservice_plan_json["extendedLocation"] = extended_location -def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, - app_service_environment=None, sku=None, +def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, + custom_location=None, app_service_environment=None, sku=None, number_of_workers=None, location=None, tags=None, no_wait=False): HostingEnvironmentProfile, SkuDescription, AppServicePlan = cmd.get_models( 'HostingEnvironmentProfile', 'SkuDescription', 'AppServicePlan') @@ -580,10 +595,9 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype kube_name = parsed_id.get("name") kube_rg = parsed_id.get("resource_group") if kube_name is not None and kube_rg is not None: - # kube_env = cf_kube_environments(cmd.cli_ctx).get(kube_rg, kube_name) kube_env = KubeEnvironmentClient.show(cmd=cmd, resource_group_name=kube_rg, name=kube_name) - # extended_location_envelope = ExtendedLocationEnvelope(name=_get_custom_location_id_from_kube_env(kube_env), type="CustomLocation") - extended_location_envelope = {"name": _get_custom_location_id_from_kube_env(kube_env), "type": "CustomLocation"} + extended_location_envelope = {"name": _get_custom_location_id_from_kube_env(kube_env), + "type": "CustomLocation"} if kube_env is not None: location = kube_env["location"] @@ -603,7 +617,8 @@ def create_app_service_plan_inner(cmd, resource_group_name, name, is_linux, hype per_site_scaling=per_site_scaling, hosting_environment_profile=ase_def, kube_environment_profile=kube_def, extended_location=extended_location_envelope) plan_json = plan_def.serialize() - _ensure_kube_settings_in_json(appservice_plan_json=plan_json, extended_location=extended_location_envelope, kube_env=kube_def) + _ensure_kube_settings_in_json(appservice_plan_json=plan_json, + extended_location=extended_location_envelope, kube_env=kube_def) return sdk_no_wait(no_wait, AppServiceClient.create, cmd=cmd, name=name, resource_group_name=resource_group_name, appservice_json=plan_json) @@ -627,16 +642,19 @@ def update_app_service_plan(cmd, resource_group_name, name, sku=None, number_of_ plan["sku"] = sku_def - _ensure_kube_settings_in_json(appservice_plan_json=plan, extended_location=plan_with_kube_env.get("extendedLocation"), kube_env=plan_with_kube_env["properties"].get("kubeEnvironmentProfile")) + _ensure_kube_settings_in_json(appservice_plan_json=plan, + extended_location=plan_with_kube_env.get("extendedLocation"), + kube_env=plan_with_kube_env["properties"].get("kubeEnvironmentProfile")) - return sdk_no_wait(no_wait, AppServiceClient.update, cmd=cmd, name=name, resource_group_name=resource_group_name, appservice_json=plan) + return sdk_no_wait(no_wait, AppServiceClient.update, cmd=cmd, name=name, + resource_group_name=resource_group_name, appservice_json=plan) def _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): - client = web_client_factory(cmd.cli_ctx) if is_valid_resource_id(plan): parse_result = parse_resource_id(plan) - plan_info = AppServiceClient.show(cmd=cmd, name=parse_result['name'], resource_group_name=parse_result["resource_group"]) + plan_info = AppServiceClient.show(cmd=cmd, name=parse_result['name'], + resource_group_name=parse_result["resource_group"]) else: plan_info = AppServiceClient.show(cmd=cmd, name=plan, resource_group_name=resource_group_name) if not plan_info: @@ -653,17 +671,20 @@ def _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, def _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan, resource_group_name): if custom_location and plan: return False - elif custom_location: + if custom_location: existing_app_details = get_app_details(cmd, name, resource_group_name) if not existing_app_details: return True - else: - if _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, existing_app_details.server_farm_id): # existing app and kube environments match - return False - else: # existing app but new custom location - return True - else: # plan is not None - return False + if _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, + existing_app_details.server_farm_id): + return False # existing app and kube environments match + return True # existing app but new custom location + return False # plan is not None + + +def _is_webapp_kube(custom_location, plan_info, SkuDescription): + return custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or ( + isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU) def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custom_location=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches @@ -704,7 +725,9 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo else: site_config = SiteConfig(app_settings=[]) - _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan, resource_group_name) + _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, + name, custom_location, + plan, resource_group_name) if _should_create_new_plan: plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) @@ -714,7 +737,8 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo if custom_location and plan: if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): - raise ValidationError("Custom location's kube environment and App Service Plan's kube environment don't match") + raise ValidationError("Custom location's kube environment and App Service Plan's " + "kube environment don't match") elif custom_location and not plan: app_details = get_app_details(cmd, name, resource_group_name) if app_details is not None: @@ -725,16 +749,15 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo client = web_client_factory(cmd.cli_ctx) if is_valid_resource_id(plan): parse_result = parse_resource_id(plan) - plan_info = AppServicePlan.from_dict(AppServiceClient.show(cmd=cmd, name=parse_result['name'], resource_group_name=parse_result["resource_group"])) + plan_info = AppServicePlan.from_dict(AppServiceClient.show(cmd=cmd, name=parse_result['name'], + resource_group_name=parse_result["resource_group"])) else: - plan_info = AppServicePlan.from_dict(AppServiceClient.show(cmd=cmd, name=plan, resource_group_name=resource_group_name)) + plan_info = AppServicePlan.from_dict(AppServiceClient.show(cmd=cmd, + name=plan, resource_group_name=resource_group_name)) if not plan_info: raise CLIError("The plan '{}' doesn't exist in the resource group '{}".format(plan, resource_group_name)) if custom_location: - sku_tier = None - if isinstance(plan_info.sku, SkuDescription): - sku_tier = plan_info.sku.tier _validate_asp_sku(app_service_environment=None, custom_location=custom_location, sku=plan_info.sku.name) is_linux = plan_info.reserved @@ -747,21 +770,23 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo webapp_def = Site(location=location, site_config=site_config, server_farm_id=plan_info.id, tags=tags, https_only=using_webapp_up) - is_kube = False - if custom_location or plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU): - is_kube = True + is_kube = _is_webapp_kube(custom_location, plan_info, SkuDescription) + if is_kube: if deployment_container_image_name: webapp_def.kind = KUBE_CONTAINER_APP_KIND else: webapp_def.kind = KUBE_APP_KIND - if custom_location: # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP + # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP + if custom_location: webapp_def.enable_additional_properties_sending() custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location, resource_group_name) if custom_location_id: - webapp_def.additional_properties["extendedLocation"] = {'name': custom_location_id, 'type': 'CustomLocation'} + extended_loc = {'name': custom_location_id, 'type': 'CustomLocation'} + webapp_def.additional_properties["extendedLocation"] = extended_loc else: - webapp_def.additional_properties["extendedLocation"] = plan_info.additional_properties["extendedLocation"] + extended_loc = plan_info.additional_properties["extendedLocation"] + webapp_def.additional_properties["extendedLocation"] = extended_loc if is_kube: if min_worker_count is not None: @@ -771,10 +796,15 @@ def create_webapp(cmd, resource_group_name, name, plan=None, runtime=None, custo site_config.app_settings.append(NameValuePair(name='K8SE_APP_MAX_INSTANCE_COUNT', value=max_worker_count)) if deployment_container_image_name: - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', + value=docker_registry_server_url)) + if docker_registry_server_user is not None and docker_registry_server_password is not None: - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', + value=docker_registry_server_user)) + + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', + value=docker_registry_server_password)) helper = _StackRuntimeHelper(cmd, client, linux=(is_linux or is_kube)) if runtime: runtime = helper.remove_delimiters(runtime) @@ -897,6 +927,12 @@ def show_webapp(cmd, resource_group_name, name, slot=None, app_instance=None): return webapp +def _is_function_kube(custom_location, plan_info, SkuDescription): + return custom_location or plan_info is not None and ( + plan_info.kind.upper() == KUBE_ASP_KIND.upper() or ( + isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU)) + + def create_function(cmd, resource_group_name, name, storage_account, plan=None, custom_location=None, os_type=None, functions_version=None, runtime=None, runtime_version=None, consumption_plan_location=None, app_insights=None, app_insights_key=None, @@ -923,7 +959,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if consumption_plan_location and plan: raise MutuallyExclusiveArgumentError("Consumption Plan and Plan cannot be used together") - SiteConfig, Site, NameValuePair, ExtendedLocationEnvelope = cmd.get_models('SiteConfig', 'Site', 'NameValuePair', 'ExtendedLocationEnvelope') + SiteConfig, Site, NameValuePair = cmd.get_models('SiteConfig', 'Site', 'NameValuePair') docker_registry_server_url = parse_docker_image_name(deployment_container_image_name) site_config = SiteConfig(app_settings=[]) @@ -935,7 +971,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if consumption_plan_location: locations = list_consumption_locations(cmd) - location = next((l for l in locations if l['name'].lower() == consumption_plan_location.lower()), None) + location = next((loc for loc in locations if loc['name'].lower() == consumption_plan_location.lower()), None) if location is None: raise CLIError("Location is invalid. Use: az functionapp list-consumption-locations") functionapp_def.location = consumption_plan_location @@ -944,7 +980,9 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, is_linux = os_type and os_type.lower() == 'linux' else: # apps with SKU based plan - _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, name, custom_location, plan, resource_group_name) + _should_create_new_plan = _should_create_new_appservice_plan_for_k8se(cmd, + name, custom_location, + plan, resource_group_name) if _should_create_new_plan: plan = generate_default_app_service_plan_name(name) logger.warning("Plan not specified. Creating Plan '%s' with sku '%s'", plan, KUBE_DEFAULT_SKU) @@ -954,7 +992,8 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if custom_location and plan: if not _validate_asp_and_custom_location_kube_envs_match(cmd, resource_group_name, custom_location, plan): - raise ValidationError("Custom location's kube environment and App Service Plan's kube environment don't match") + raise ValidationError("Custom location's kube environment " + "and App Service Plan's kube environment don't match") elif custom_location and not plan: app_details = get_app_details(cmd, name, resource_group_name) if app_details is not None: @@ -972,9 +1011,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, functionapp_def.server_farm_id = plan_info.id functionapp_def.location = location - is_kube = False - if custom_location or plan_info is not None and (plan_info.kind.upper() == KUBE_ASP_KIND.upper() or (isinstance(plan_info.sku, SkuDescription) and plan_info.sku.name.upper() == KUBE_DEFAULT_SKU)): - is_kube = True + is_kube = _is_function_kube(custom_location, plan_info, SkuDescription) if is_kube: if min_worker_count is not None: @@ -1017,12 +1054,15 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, if is_kube: functionapp_def.enable_additional_properties_sending() - if custom_location: # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP + # if Custom Location provided, use that for Extended Location Envelope. Otherwise, get Custom Location from ASP + if custom_location: custom_location_id = _get_custom_location_id_from_custom_location(cmd, custom_location, resource_group_name) if custom_location_id: - functionapp_def.additional_properties["extendedLocation"] = {'name': custom_location_id, 'type': 'CustomLocation'} + extended_loc = {'name': custom_location_id, 'type': 'CustomLocation'} + functionapp_def.additional_properties["extendedLocation"] = extended_loc else: - functionapp_def.additional_properties["extendedLocation"] = plan_info.additional_properties["extendedLocation"] + extended_loc = plan_info.additional_properties["extendedLocation"] + functionapp_def.additional_properties["extendedLocation"] = extended_loc functionapp_def.kind = KUBE_FUNCTION_APP_KIND functionapp_def.reserved = True @@ -1035,10 +1075,13 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None, value=deployment_container_image_name)) site_config.app_settings.append(NameValuePair(name='FUNCTION_APP_EDIT_MODE', value='readOnly')) site_config.linux_fx_version = _format_fx_version(deployment_container_image_name) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', value=docker_registry_server_url)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_URL', + value=docker_registry_server_url)) if docker_registry_server_user is not None and docker_registry_server_password is not None: - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', value=docker_registry_server_user)) - site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', value=docker_registry_server_password)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_USERNAME', + value=docker_registry_server_user)) + site_config.app_settings.append(NameValuePair(name='DOCKER_REGISTRY_SERVER_PASSWORD', + value=docker_registry_server_password)) else: site_config.app_settings.append(NameValuePair(name='WEBSITES_ENABLE_APP_SERVICE_STORAGE', value='true')) site_config.linux_fx_version = _get_linux_fx_kube_functionapp(runtime, runtime_version) @@ -1269,6 +1312,7 @@ def config_source_control(cmd, resource_group_name, name, repo_url, repository_t raise logger.warning('retrying %s/4', i + 1) time.sleep(5) # retry in a moment + return None def list_publish_profiles(cmd, resource_group_name, name, slot=None, xml=False): @@ -1305,7 +1349,6 @@ def _resolve_kube_environment_id(cli_ctx, kube_environment, resource_group_name) return kube_environment from msrestazure.tools import resource_id - from azure.cli.core.commands.client_factory import get_subscription_id return resource_id( subscription=get_subscription_id(cli_ctx), resource_group=resource_group_name, @@ -1549,8 +1592,8 @@ def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=No time.sleep(7) try: scm_url = _get_scm_url(cmd, resource_group_name, name, slot) - except ValueError: - raise CLIError('Failed to fetch scm url for function app') + except ValueError as e: + raise CLIError('Failed to fetch scm url for function app') from e zip_url = scm_url + '/api/zipdeploy?isAsync=true' deployment_status_url = scm_url + '/api/deployments/latest' @@ -1573,7 +1616,8 @@ def enable_zip_deploy(cmd, resource_group_name, name, src, timeout=None, slot=No logger.warning("Deployment endpoint responded with status code %d", res.status_code) if is_kube and res.status_code != 202 and res.status_code != 409: - logger.warning('Something went wrong. It may take a few seconds for a new deployment to reflect on kube cluster. Retrying deployment...') + logger.warning('Something went wrong. It may take a few seconds for a new deployment to reflect' + 'on kube cluster. Retrying deployment...') time.sleep(10) # retry in a moment res = requests.post(zip_url, data=zip_content, headers=headers, verify=not should_disable_connection_verify()) From 68d70e4ca78ac99398e512a3cd31bf028ab995b1 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 30 Sep 2021 13:36:11 -0500 Subject: [PATCH 106/125] revert src/index.json to master version --- src/index.json | 1740 +++++++++++++++++------------------------------- 1 file changed, 599 insertions(+), 1141 deletions(-) diff --git a/src/index.json b/src/index.json index f0ed162c92f..3cb4ac12b64 100644 --- a/src/index.json +++ b/src/index.json @@ -3261,6 +3261,92 @@ "version": "0.5.23" }, "sha256Digest": "1d5ad0d8d49f0cf13ffb65cbb3a60651dfa87a8b8b9537f7d9574d4bdc68c1d6" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.24-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.24-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.24" + }, + "sha256Digest": "4f2e624cc8e1a9ef653295b563d883f2fe58016ca1ba5b45485f17d60d410de7" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.25-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.25-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.25" + }, + "sha256Digest": "67e35a0b44ffa2c73c98e0ef8604705302707a383b1ffe37a5a9368f2d2a24bb" } ], "alertsmanagement": [ @@ -3663,1099 +3749,37 @@ "isodate (~=0.6.0)" ] } - ], - "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", - "version": "0.1.8" - }, - "sha256Digest": "f2f041e166f0b587e7c92252ef59e3bcecb8721f15c5e96f4496871a85a81f61" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.9-py2.py3-none-any.whl", - "filename": "application_insights-0.1.9-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.79", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "aleldeib@microsoft.com", - "name": "Ace Eldeib", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "application-insights", - "run_requires": [ - { - "requires": [ - "isodate (~=0.6.0)" - ] - } - ], - "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", - "version": "0.1.9" - }, - "sha256Digest": "4ed371e2e02a31133bec6d416dd98c0de3e1ffbf56089e034abc36609c9dfa97" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.10-py2.py3-none-any.whl", - "filename": "application_insights-0.1.10-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.79", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "aleldeib@microsoft.com", - "name": "Ace Eldeib", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "application-insights", - "run_requires": [ - { - "requires": [ - "isodate (~=0.6.0)" - ] - } - ], - "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", - "version": "0.1.10" - }, - "sha256Digest": "4f6ef254677ae32523f44af0f6b99bbdf6e5a8d1c894c7d2d72f4c8f8f359fb0" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.11-py2.py3-none-any.whl", - "filename": "application_insights-0.1.11-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.79", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "aleldeib@microsoft.com", - "name": "Ace Eldeib", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "application-insights", - "run_requires": [ - { - "requires": [ - "isodate (~=0.6.0)" - ] - } - ], - "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", - "version": "0.1.11" - }, - "sha256Digest": "ffb9b4daf395966226786cc55bce2beff7d9a22ccec739cb21910ff03f582e90" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.12-py2.py3-none-any.whl", - "filename": "application_insights-0.1.12-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.79", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "aleldeib@microsoft.com", - "name": "Ace Eldeib", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "application-insights", - "run_requires": [ - { - "requires": [ - "isodate (~=0.6.0)" - ] - } - ], - "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", - "version": "0.1.12" - }, - "sha256Digest": "94ecdd71a1007df791a193e9273e902c39caa53dc965823c019d41cd679ee27c" - }, - { - "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.13-py2.py3-none-any.whl", - "filename": "application_insights-0.1.13-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.79", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "aleldeib@microsoft.com", - "name": "Ace Eldeib", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "application-insights", - "run_requires": [ - { - "requires": [ - "isodate (~=0.6.0)" - ] - } - ], - "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", - "version": "0.1.13" - }, - "sha256Digest": "b1d5d31cfbd8a75595943d7248e585d63d0a1c6b43c69febbd7162239af98933" - } - ], - "appservice-kube": [ - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.0-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.0-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.0" - }, - "sha256Digest": "a124af484f98d77e9f8bdb0b8944ab7bf9fec63b8ff94cddc3c2d20386116cda" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.1-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.1-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.1" - }, - "sha256Digest": "6e9184d7bc608aad51136528038c95a79dc8d4839c89716679a167fbf3d56784" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.2-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.2-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.2" - }, - "sha256Digest": "4d9fad5a646a414337cd261b2efd4eafd9c03923b8992312b9a32cab295e91e9" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.3-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.3-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.3" - }, - "sha256Digest": "10fc3945a4c805617ee0e0de56112f35a50f769128e9d4829071682aa8db56a1" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.4-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.4-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.4" - }, - "sha256Digest": "743ab9c3aef88ccba22d5f61aa56cb6ed68feb885433d6c8f2b39c7f2e2d5d34" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.5-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.5-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.5" - }, - "sha256Digest": "4ce71979442759a7d3cfabdaafe4962556f0ab9130dee887f2938d888c5ee322" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.6-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.6-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.6" - }, - "sha256Digest": "2adaa4b4552cd8d32869969000ac07d12ee108a50c358c3081e76a2500a5aeec" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.7-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.7-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "extras": [], - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "run_requires": [ - { - "requires": [ - "azure-cli-core" - ] - } - ], - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.7" - }, - "sha256Digest": "9070e0f440582c26148f4307b7752235c3f5034fe4fe56f82d13723c918afee6" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.8-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.8-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "classifiers": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License" - ], - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.8" - }, - "sha256Digest": "9530c1347525a91b62311a443e3df4d80f00e2cdb1d40e6326cbd90cf500cfea" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.9-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.9-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.9" - }, - "sha256Digest": "42c94905f45cba8c36a110a23fb7f5aa66d401cf717169d317bd02250698b6df" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.10-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.10-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.10" - }, - "sha256Digest": "f2ed3a01136fd73c1f0012724472877be668c5c4703cb6d9d21b7ab3355937ad" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.11-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.11-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.11" - }, - "sha256Digest": "22070b7f92bfdbca9cf0dc74d530d5092d6ddc0c479921e68984c06b860bde30" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.12-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.12-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.12" - }, - "sha256Digest": "8d9b597be01c0d350452ff658d8b3cb5bdf68778438d94e5188242450a2ef2df" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.13-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.13-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.13" - }, - "sha256Digest": "d093990522776ab7f1a8a251c7d729384b8fcac1c865c86f82642c7af6c22188" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.14-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.14-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.14" - }, - "sha256Digest": "99b2ddefbb9f413fe9ee545bb9d6e46568d312d0c97d1158bee5004bac61e5c1" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.15-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.15-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.15" - }, - "sha256Digest": "af23aaeda8bc0def74d2ffdbb95a86826ff2902f6706aecaf974d6b047414047" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.16-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.16-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.16" - }, - "sha256Digest": "ebeeb8e176238c9ebd757c4c266ffdb01330b718f5da1dbc1ff8750120920404" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.17-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.17-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.17" - }, - "sha256Digest": "efac7dd91365530d5b5a37944baaae5acc0fccebc76178ff0df50bd139858080" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.18-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.18-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.18" - }, - "sha256Digest": "0b8a79b3ced746526c2efe53c6e5c29c2bf4ccf35a1c1877bb3e916848e4bf12" - }, - { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.19-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.19-py2.py3-none-any.whl", - "metadata": { - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", - "extensions": { - "python.details": { - "contacts": [ - { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", - "role": "author" - } - ], - "document_names": { - "description": "DESCRIPTION.rst" - }, - "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" - } - } - }, - "generator": "bdist_wheel (0.30.0)", - "license": "MIT", - "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.19" + ], + "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", + "version": "0.1.8" }, - "sha256Digest": "cb3057feaaf95dbe96470720becae5f13abc86d08ec0ba71879e7e497762fe03" + "sha256Digest": "f2f041e166f0b587e7c92252ef59e3bcecb8721f15c5e96f4496871a85a81f61" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.20-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.20-py2.py3-none-any.whl", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.9-py2.py3-none-any.whl", + "filename": "application_insights-0.1.9-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", + "azext.minCliCoreVersion": "2.0.79", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], "extensions": { "python.details": { "contacts": [ { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", + "email": "aleldeib@microsoft.com", + "name": "Ace Eldeib", "role": "author" } ], @@ -4763,31 +3787,52 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" } } }, + "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.20" + "name": "application-insights", + "run_requires": [ + { + "requires": [ + "isodate (~=0.6.0)" + ] + } + ], + "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", + "version": "0.1.9" }, - "sha256Digest": "d18f97814d97c7bd0680004e654a7113a9e6b789230949ebbe99c619a71b6f17" + "sha256Digest": "4ed371e2e02a31133bec6d416dd98c0de3e1ffbf56089e034abc36609c9dfa97" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.21-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.21-py2.py3-none-any.whl", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.10-py2.py3-none-any.whl", + "filename": "application_insights-0.1.10-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.0.67", + "azext.minCliCoreVersion": "2.0.79", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], "extensions": { "python.details": { "contacts": [ { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", + "email": "aleldeib@microsoft.com", + "name": "Ace Eldeib", "role": "author" } ], @@ -4795,31 +3840,52 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" } } }, + "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.21" + "name": "application-insights", + "run_requires": [ + { + "requires": [ + "isodate (~=0.6.0)" + ] + } + ], + "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", + "version": "0.1.10" }, - "sha256Digest": "4a9fcea9a2699874c6a2e31c2e84ad34d5b290b70b813ae00d1e0cbedb465adf" + "sha256Digest": "4f6ef254677ae32523f44af0f6b99bbdf6e5a8d1c894c7d2d72f4c8f8f359fb0" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.1.22-py2.py3-none-any.whl", - "filename": "appservice_kube-0.1.22-py2.py3-none-any.whl", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.11-py2.py3-none-any.whl", + "filename": "application_insights-0.1.11-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.26.0", + "azext.minCliCoreVersion": "2.0.79", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], "extensions": { "python.details": { "contacts": [ { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", + "email": "aleldeib@microsoft.com", + "name": "Ace Eldeib", "role": "author" } ], @@ -4827,31 +3893,52 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" } } }, + "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.1.22" + "name": "application-insights", + "run_requires": [ + { + "requires": [ + "isodate (~=0.6.0)" + ] + } + ], + "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", + "version": "0.1.11" }, - "sha256Digest": "0bbe6d6e7e51d5eb18e2c0829d8e74792ee19925ea842c6d7569af51edb1eba9" + "sha256Digest": "ffb9b4daf395966226786cc55bce2beff7d9a22ccec739cb21910ff03f582e90" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.2.0-py2.py3-none-any.whl", - "filename": "appservice_kube-0.2.0-py2.py3-none-any.whl", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.12-py2.py3-none-any.whl", + "filename": "application_insights-0.1.12-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.26.0", + "azext.minCliCoreVersion": "2.0.79", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], "extensions": { "python.details": { "contacts": [ { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", + "email": "aleldeib@microsoft.com", + "name": "Ace Eldeib", "role": "author" } ], @@ -4859,31 +3946,52 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" } } }, + "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.2.0" + "name": "application-insights", + "run_requires": [ + { + "requires": [ + "isodate (~=0.6.0)" + ] + } + ], + "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", + "version": "0.1.12" }, - "sha256Digest": "16194a9462b70405ca0be89c26e0b595723bf228d318182c8b699af42b00b2b5" + "sha256Digest": "94ecdd71a1007df791a193e9273e902c39caa53dc965823c019d41cd679ee27c" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.2.1-py2.py3-none-any.whl", - "filename": "appservice_kube-0.2.1-py2.py3-none-any.whl", + "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.13-py2.py3-none-any.whl", + "filename": "application_insights-0.1.13-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.26.0", + "azext.minCliCoreVersion": "2.0.79", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], "extensions": { "python.details": { "contacts": [ { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", + "email": "aleldeib@microsoft.com", + "name": "Ace Eldeib", "role": "author" } ], @@ -4891,31 +3999,52 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" } } }, + "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.2.1" + "name": "application-insights", + "run_requires": [ + { + "requires": [ + "isodate (~=0.6.0)" + ] + } + ], + "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", + "version": "0.1.13" }, - "sha256Digest": "9d809e4b1e742a258c77323d9e9345cf6ac08d4f79d6698c476d738fc6f380f5" + "sha256Digest": "b1d5d31cfbd8a75595943d7248e585d63d0a1c6b43c69febbd7162239af98933" }, { - "downloadUrl": "https://k8seazurecliextensiondev.blob.core.windows.net/azure-cli-extension/appservice_kube-0.2.2-py2.py3-none-any.whl", - "filename": "appservice_kube-0.2.2-py2.py3-none-any.whl", + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.14-py2.py3-none-any.whl", + "filename": "application_insights-0.1.14-py2.py3-none-any.whl", "metadata": { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.26.0", + "azext.minCliCoreVersion": "2.0.79", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], "extensions": { "python.details": { "contacts": [ { - "email": "azpycli@microsoft.com", - "name": "Microsoft Corporation", + "email": "aleldeib@microsoft.com", + "name": "Ace Eldeib", "role": "author" } ], @@ -4923,18 +4052,26 @@ "description": "DESCRIPTION.rst" }, "project_urls": { - "Home": "https://github.com/Azure/azure-cli-extensions" + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights" } } }, + "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", - "name": "appservice-kube", - "summary": "Microsoft Azure Command-Line Tools App Service on Kubernetes Extension", - "version": "0.2.2" + "name": "application-insights", + "run_requires": [ + { + "requires": [ + "isodate (~=0.6.0)" + ] + } + ], + "summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.", + "version": "0.1.14" }, - "sha256Digest": "3c2939d00438946eb20ebef76337be7b17dea2abdc7661b31fa477c51eb8b076" + "sha256Digest": "9e20c68a41b089691881813fa67596ee96141dda0575f57651417a5dc361d807" } ], "arcappliance": [ @@ -6576,9 +5713,54 @@ "metadata_version": "2.0", "name": "azure-firewall", "summary": "Manage Azure Firewall resources.", - "version": "0.11.0" + "version": "0.11.0" + }, + "sha256Digest": "31100b4d554939502454bf9dbe0a42e2ee4319a1af3f9c93c9b51200bb547707" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/azure_firewall-0.12.0-py2.py3-none-any.whl", + "filename": "azure_firewall-0.12.0-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/azure-firewall" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "azure-firewall", + "summary": "Manage Azure Firewall resources.", + "version": "0.12.0" }, - "sha256Digest": "31100b4d554939502454bf9dbe0a42e2ee4319a1af3f9c93c9b51200bb547707" + "sha256Digest": "e8273165377adcbc1effcaaa447d4b7b38c49aadd1ff9255cabf400f6846edb4" } ], "azure-iot": [ @@ -10056,6 +9238,48 @@ "version": "0.7.2" }, "sha256Digest": "daf595a051a47dded0fbe18a289e454f221eaaae11d1aadaa3f45612aff1b05f" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/databricks-0.7.3-py3-none-any.whl", + "filename": "databricks-0.7.3-py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.3.1", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/databricks" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "databricks", + "summary": "Microsoft Azure Command-Line Tools DatabricksClient Extension", + "version": "0.7.3" + }, + "sha256Digest": "b70d79f20b8b2e116df9afc321243d847bbe83db75d863e2e3a00c79bbd0908b" } ], "datadog": [ @@ -14151,6 +13375,56 @@ "version": "1.0.0" }, "sha256Digest": "80b79b09d9caa8e1813dad25703c442aec35e01d60a3ea13389ebaec3e94933c" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/k8s_configuration-1.1.0-py3-none-any.whl", + "filename": "k8s_configuration-1.1.0-py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/k8s-configuration" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "k8s-configuration", + "run_requires": [ + { + "requires": [ + "pycryptodome (~=3.9.8)" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools K8s-configuration Extension", + "version": "1.1.0" + }, + "sha256Digest": "2ca4d1e87dfa0614592b758d3441bfeaaa85e4d151b734ce27cc74c6a400edec" } ], "k8s-extension": [ @@ -14591,6 +13865,92 @@ "version": "0.5.1" }, "sha256Digest": "b04378d1c1699cf8cf37fc84a0f77fd5b87c653cc4d06049ba546660ce57fe42" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/k8s_extension-0.6.0-py3-none-any.whl", + "filename": "k8s_extension-0.6.0-py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.24.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "k8s-extension", + "summary": "Microsoft Azure Command-Line Tools K8s-extension Extension", + "version": "0.6.0" + }, + "sha256Digest": "a1b642402345b71cb0f06aa31653a3161ab3f5f874e29d59863b987200bc535d" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/k8s_extension-0.6.1-py3-none-any.whl", + "filename": "k8s_extension-0.6.1-py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.24.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "k8s-extension", + "summary": "Microsoft Azure Command-Line Tools K8s-extension Extension", + "version": "0.6.1" + }, + "sha256Digest": "42b366184ab6dd9f46bb44e7c0e10eace4f25f514f97dd1912552c6900f2fd9e" } ], "k8sconfiguration": [ @@ -18426,6 +17786,59 @@ "sha256Digest": "407f23c06a7bd6e1200f108abcd0127904334d9813ccae8df8fc3e63b3eaa97f" } ], + "serial-console": [ + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/serial_console-0.1.0-py3-none-any.whl", + "filename": "serial_console-0.1.0-py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/serialconsole" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "serial-console", + "run_requires": [ + { + "requires": [ + "websocket-client (~=0.56.0)" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools for Serial Console Extension", + "version": "0.1.0" + }, + "sha256Digest": "39317e5d4ecc6add26a624a6fa0d48344cfb6b3faaefb6ccbdcb30de9d35fb50" + } + ], "spring-cloud": [ { "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/spring_cloud-0.1.0-py2.py3-none-any.whl", @@ -22710,6 +22123,51 @@ "version": "0.3.5" }, "sha256Digest": "70112e8c4ce186f0c494e89680d751f8f4c6dc906c47cc44b8b5cdf0e19d2e50" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/vm_repair-0.3.6-py2.py3-none-any.whl", + "filename": "vm_repair-0.3.6-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": false, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "caiddev@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/vm-repair" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "vm-repair", + "summary": "Auto repair commands to fix VMs.", + "version": "0.3.6" + }, + "sha256Digest": "bd7d1259bb095ab238d8efca72c201570c5144816d7d4e98e73d1a82eb08a80a" } ], "vmware": [ From 1f640fc586906b4e5c9bf6d0691f5ca88a32feda Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 30 Sep 2021 13:49:43 -0500 Subject: [PATCH 107/125] add summary --- src/appservice-kube/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/README.rst b/src/appservice-kube/README.rst index 686f74888f6..f652fc6599f 100644 --- a/src/appservice-kube/README.rst +++ b/src/appservice-kube/README.rst @@ -1,5 +1,5 @@ Microsoft Azure CLI 'appservice-kube' Extension ========================================== -This package is for the 'appservice-kube' extension. -i.e. 'az appservice-kube' \ No newline at end of file +The appservice-kube extension adds support for controlling App Service Kubernetes Environments. +See here for more information: https://docs.microsoft.com/en-us/azure/app-service/manage-create-arc-environment?tabs=bash \ No newline at end of file From 6f4319c9b396cf35d02c6631fce204a5737fe28c Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 30 Sep 2021 14:38:10 -0500 Subject: [PATCH 108/125] fix linter issues --- src/appservice-kube/azext_appservice_kube/__init__.py | 10 +++++----- src/appservice-kube/azext_appservice_kube/custom.py | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/__init__.py b/src/appservice-kube/azext_appservice_kube/__init__.py index ba10f2510ea..e8cc91b6528 100644 --- a/src/appservice-kube/azext_appservice_kube/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/__init__.py @@ -14,12 +14,12 @@ def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType from azure.cli.core.profiles import ResourceType appservice_custom = CliCommandType(operations_tmpl='azext_appservice_kube.custom#{}') - super(AppserviceCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=appservice_custom, - resource_type=ResourceType.MGMT_APPSERVICE) + super().__init__(cli_ctx=cli_ctx, + custom_command_type=appservice_custom, + resource_type=ResourceType.MGMT_APPSERVICE) def load_command_table(self, args): - super(AppserviceCommandsLoader, self).load_command_table(args) + super().load_command_table(args) from azext_appservice_kube.commands import load_command_table load_command_table(self, args) return self.command_table @@ -27,7 +27,7 @@ def load_command_table(self, args): def load_arguments(self, command): from sys import version_info if version_info[0] < 3: - super(AppserviceCommandsLoader, self).load_arguments(command) + super().load_arguments(command) else: super().load_arguments(command) from azext_appservice_kube._params import load_arguments diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index bbce06490ae..8e88555cf0e 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -323,6 +323,8 @@ def delete_kube_environment(cmd, name, resource_group_name): def create_kube_environment(cmd, name, resource_group_name, custom_location, static_ip=None, location=None, tags=None, no_wait=False): + # pylint: disable=broad-except,no-member,protected-access + custom_location_client = customlocation_client_factory(cmd.cli_ctx) custom_location_object = None From 9382be0ac4c08ef99f0b83f6dc7aa5bd875a1d96 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 30 Sep 2021 14:48:01 -0500 Subject: [PATCH 109/125] remove out-of-date test --- .../latest/test_appservice_kube_scenario.py | 34 ++----------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py b/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py index dcb56ccb2f0..876b8e50d9f 100644 --- a/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py +++ b/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py @@ -13,36 +13,6 @@ TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) +# TODO class AppserviceKubernetesScenarioTest(ScenarioTest): - @AllowLargeResponse() - @ResourceGroupPreparer(location='North Central US (Stage)') - @RoleBasedServicePrincipalPreparer() - def test_kube_environment_create(self, resource_group, sp_name, sp_password): - kube_env_name = self.create_random_name('kube_env_test', 16) - - self.kwargs.update({ - 'name': kube_env_name - }) - - create_cmd = 'appservice kube create -g {rg} -n {name} ' \ - '--client-id {sp} --client-secret {sp_pass}' - - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('name', '{name}'), - self.check('servicePrincipalClientId', '{sp}') - ]) - - count = len(self.cmd('appservice kube list -g {rg}').get_output_in_json()) - - self.cmd('appservice kube show -g {rg} -n {name}', checks=[ - self.check('name', '{name}'), - self.check('resourceGroup', '{rg}'), - self.check('servicePrincipalClientId', '{sp}') - ]) - - self.cmd('appservice-kube delete -g {rg} -n {name}') - - final_count = len(self.cmd('appservice-kube list').get_output_in_json()) - - self.assertTrue(final_count, count - 1) + pass From 0b8c1ddcc1e349015883199e4ee2519e14b0ea01 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Thu, 30 Sep 2021 17:31:41 -0500 Subject: [PATCH 110/125] fix appservice kube CLI linter issues --- .../azext_appservice_kube/_help.py | 11 ++++++- .../azext_appservice_kube/_params.py | 30 +++++++++++++++++-- .../azext_appservice_kube/_validators.py | 7 +++++ .../azext_appservice_kube/commands.py | 2 +- .../azext_appservice_kube/custom.py | 2 +- 5 files changed, 47 insertions(+), 5 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_help.py b/src/appservice-kube/azext_appservice_kube/_help.py index 5b9f07c5c66..3fa301c209d 100644 --- a/src/appservice-kube/azext_appservice_kube/_help.py +++ b/src/appservice-kube/azext_appservice_kube/_help.py @@ -7,6 +7,15 @@ from knack.help_files import helps # pylint: disable=line-too-long, too-many-lines +helps['webapp scale'] = """ +type: command +short-summary: Modify the number of instances of a webapp. +examples: + - name: Change the number of instances of MyApp to 2. + text: > + az webapp scale -g MyResourceGroup -n MyApp --instance-count 2 +""" + helps['appservice plan create'] = """ type: command short-summary: Create an app service plan. @@ -62,7 +71,7 @@ examples: - name: Update Kubernetes Environment text: | - az appservice kube update -n MyKubeEnvironment -g MyResourceGroup --static-ip 0.0.0.0 + az appservice kube update --name MyKubeEnvironment -g MyResourceGroup --static-ip 0.0.0.0 """ helps['appservice kube show'] = """ diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index e79f789fe05..99e41f5fc45 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -13,7 +13,7 @@ from ._constants import (FUNCTIONS_VERSIONS, FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS, LINUX_RUNTIMES, WINDOWS_RUNTIMES, MULTI_CONTAINER_TYPES, OS_TYPES) -from ._validators import validate_asp_create +from ._validators import validate_asp_create, validate_timeout_value def load_arguments(self, _): @@ -78,6 +78,16 @@ def load_arguments(self, _): c.argument('slot', options_list=['--slot', '-s'], help="the name of the slot. Default to the productions slot if not specified") + with self.argument_context('functionapp config container set') as c: + c.argument('docker_custom_image_name', options_list=['--docker-custom-image-name', '-c', '-i'], + help='the container custom image name and optionally the tag name') + c.argument('docker_registry_server_password', options_list=['--docker-registry-server-password', '-p'], + help='the container registry server password') + c.argument('docker_registry_server_url', options_list=['--docker-registry-server-url', '-r'], + help='the container registry server url') + c.argument('docker_registry_server_user', options_list=['--docker-registry-server-user', '-u'], + help='the container registry server username') + with self.argument_context('functionapp create') as c: c.argument('plan', options_list=['--plan', '-p'], configured_default='appserviceplan', completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), @@ -101,6 +111,11 @@ def load_arguments(self, _): for scope in ['webapp', 'functionapp']: with self.argument_context(scope + ' create') as c: + c.argument('assign_identities', nargs='*', options_list=['--assign-identity'], + help='accept system or user assigned identities separated by spaces. Use \'[system]\' to refer system assigned identity, or a resource id to refer user assigned identity. Check out help for more examples') + c.argument('scope', options_list=['--scope'], help="Scope that the system assigned identity can access") + c.argument('role', options_list=['--role'], help="Role name or id the system assigned identity will have") + c.argument('deployment_container_image_name', options_list=['--deployment-container-image-name', '-i'], help='Linux only. Container image name from Docker Hub, e.g. publisher/image-name:tag') c.argument('deployment_local_git', action='store_true', options_list=['--deployment-local-git', '-l'], help='enable local git') c.argument('deployment_zip', options_list=['--deployment-zip', '-z'], help='perform deployment using zip file') @@ -110,6 +125,15 @@ def load_arguments(self, _): c.argument('max_worker_count', help='Maximum number of workers to be allocated.', type=int, default=None, is_preview=True) c.argument('tags', arg_type=tags_type) + with self.argument_context(scope + ' deployment source config-zip') as c: + c.argument('src', help='a zip file path for deployment') + c.argument('build_remote', help='enable remote build during deployment', + arg_type=get_three_state_flag(return_label=True)) + c.argument('timeout', type=int, options_list=['--timeout', '-t'], + help='Configurable timeout in seconds for checking the status of deployment', + validator=validate_timeout_value) + c.argument('is_kube', help='the app is a kubernetes app') + with self.argument_context('appservice') as c: c.argument('resource_group_name', arg_type=resource_group_name_type) c.argument('location', arg_type=get_location_type(self.cli_ctx)) @@ -153,8 +177,10 @@ def load_arguments(self, _): c.argument('no_wait', help='Do not wait for the create to complete, and return immediately after queuing the create.') with self.argument_context('appservice kube update') as c: - c.argument('kube_name', arg_type=name_arg_type, help='Name of the kubernetes environment.') + c.argument('name', arg_type=name_arg_type, help='Name of the kubernetes environment.') c.argument('tags', arg_type=tags_type) + c.argument('custom_location', options_list=['--custom-location', '-c'], help="ID of the custom location") + c.argument('static_ip', help='New Static IP Address.') with self.argument_context('appservice kube delete') as c: c.argument('name', arg_type=name_arg_type, help='Name of the Kubernetes Environment.') diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py index e9a4f110f9b..765e03874a4 100644 --- a/src/appservice-kube/azext_appservice_kube/_validators.py +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -92,3 +92,10 @@ def validate_app_or_slot_exists_in_rg(cmd, namespace): app = client.web_apps.get(resource_group_name, webapp, None, raw=True) if app.response.status_code != 200: raise CLIError(app.response.text) + + +def validate_timeout_value(namespace): + """Validates that zip deployment timeout is set to a reasonable min value""" + if isinstance(namespace.timeout, int): + if namespace.timeout <= 29: + raise CLIError('--timeout value should be a positive value in seconds and should be at least 30') diff --git a/src/appservice-kube/azext_appservice_kube/commands.py b/src/appservice-kube/azext_appservice_kube/commands.py index e31ae6a6825..cc5b065a754 100644 --- a/src/appservice-kube/azext_appservice_kube/commands.py +++ b/src/appservice-kube/azext_appservice_kube/commands.py @@ -49,7 +49,7 @@ def load_command_table(self, _): ) with self.command_group('appservice kube', is_preview=True) as g: - g.custom_command('show', 'show_kube_environments') + g.custom_show_command('show', 'show_kube_environments') g.custom_wait_command('wait', 'show_kube_environments') g.custom_command('list', 'list_kube_environments') g.custom_command('create', 'create_kube_environment', supports_no_wait=True) diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 8e88555cf0e..4ff1740720a 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -384,7 +384,7 @@ def list_kube_environments(cmd, resource_group_name=None): # TODO should be able to update staticIp and tags -- remove exception once API fixed -def update_kube_environment(cmd, name, resource_group_name, custom_location=None, static_ip=None, location=None, +def update_kube_environment(cmd, name, resource_group_name, custom_location=None, static_ip=None, tags=None, no_wait=False): raise CLIError("Update is not yet supported for Kubernetes Environments.") From 22566383e8a25ef059652bec90753ad2541ee56a Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 1 Oct 2021 10:33:56 -0500 Subject: [PATCH 111/125] fix ASP sku validation --- .../azext_appservice_kube/_utils.py | 23 +++++++++++++++++++ .../azext_appservice_kube/_validators.py | 14 ++++++++--- .../azext_appservice_kube/custom.py | 21 +---------------- 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index 51de8b6b029..b41ea418d4a 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -21,6 +21,25 @@ def _normalize_sku(sku): return sku +def _validate_asp_sku(app_service_environment, custom_location, sku): + # Isolated SKU is supported only for ASE + if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P1V3', 'P2V2', + 'P3V2','PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: + raise CLIError('Invalid sku entered: {}'.format(sku)) + + if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: + if not app_service_environment: + raise CLIError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + elif app_service_environment: + raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + elif custom_location: + # Custom Location only supports K1 + if sku.upper() != 'K1': + raise CLIError("Only pricing tier 'K1' is allowed for this type of app service plan.") + + def get_sku_name(tier): # pylint: disable=too-many-return-statements tier = tier.upper() if tier in ['F1', 'FREE']: @@ -35,12 +54,16 @@ def get_sku_name(tier): # pylint: disable=too-many-return-statements return 'PREMIUM' if tier in ['P1V2', 'P2V2', 'P3V2']: return 'PREMIUMV2' + if tier in ['P1V3', 'P2V3', 'P3V3']: + return 'PREMIUMV3' if tier in ['PC2', 'PC3', 'PC4']: return 'PremiumContainer' if tier in ['EP1', 'EP2', 'EP3']: return 'ElasticPremium' if tier in ['I1', 'I2', 'I3']: return 'Isolated' + if tier in ['I1V2', 'I2V2', 'I3V2']: + return 'IsolatedV2' if tier in ['K1']: return 'Kubernetes' raise CLIError("Invalid sku(pricing tier), please refer to command help for valid values") diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py index 765e03874a4..62774895353 100644 --- a/src/appservice-kube/azext_appservice_kube/_validators.py +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -6,8 +6,8 @@ from knack.util import CLIError from azure.cli.core.commands.client_factory import get_mgmt_service_client from ._client_factory import web_client_factory -from ._utils import _normalize_sku - +from ._utils import _normalize_sku, _validate_asp_sku +from ._constants import KUBE_DEFAULT_SKU def validate_asp_sku(cmd, namespace): import json @@ -35,6 +35,14 @@ def validate_asp_sku(cmd, namespace): def validate_asp_create(cmd, namespace): """Validate the SiteName that is being used to create is available This API requires that the RG is already created""" + + # need to validate SKU before the general ASP create validation + sku = namespace.sku + if not sku: + sku = 'B1' if not namespace.custom_location else KUBE_DEFAULT_SKU + sku = _normalize_sku(sku) + _validate_asp_sku(namespace.app_service_environment, namespace.custom_location, sku) + client = web_client_factory(cmd.cli_ctx) if isinstance(namespace.name, str) and isinstance(namespace.resource_group_name, str): resource_group_name = namespace.resource_group_name @@ -51,7 +59,7 @@ def validate_asp_create(cmd, namespace): "type": "Microsoft.Web/serverfarms", "location": location, "properties": { - "skuName": _normalize_sku(namespace.sku) if namespace.sku else None, + "skuName": sku, "capacity": namespace.number_of_workers or 1, "needLinuxWorkers": namespace.is_linux if namespace.custom_location is None else 'false', "isXenon": namespace.hyper_v diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 4ff1740720a..61cd745ba5b 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -60,7 +60,7 @@ KUBE_CONTAINER_APP_KIND, LINUX_RUNTIMES, WINDOWS_RUNTIMES) from ._utils import (_normalize_sku, get_sku_name, _generic_site_operation, - _get_location_from_resource_group) + _get_location_from_resource_group, _validate_asp_sku) from ._create_util import (get_app_details, get_site_availability, get_current_stack_from_runtime, generate_default_app_service_plan_name) from ._client_factory import web_client_factory, ex_handler_factory, customlocation_client_factory @@ -431,25 +431,6 @@ def list_app_service_plans(cmd, resource_group_name=None): return plans -def _validate_asp_sku(app_service_environment, custom_location, sku): - # Isolated SKU is supported only for ASE - if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P2V2', 'P3V2', - 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: - raise CLIError('Invalid sku entered: {}'.format(sku)) - - if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: - if not app_service_environment: - raise CLIError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " - "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") - elif app_service_environment: - raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " - "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") - elif custom_location: - # Custom Location only supports K1 - if sku.upper() != 'K1': - raise CLIError("Only pricing tier 'K1' is allowed for this type of app service plan.") - - def create_app_service_plan(cmd, resource_group_name, name, is_linux, hyper_v, per_site_scaling=False, custom_location=None, app_service_environment=None, sku=None, From 8345bdf57ffdbb546aaab4f2558c689a52aee83f Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 1 Oct 2021 11:05:03 -0500 Subject: [PATCH 112/125] fix style --- .../azext_appservice_kube/_params.py | 14 +++++++------- .../azext_appservice_kube/_utils.py | 2 +- .../azext_appservice_kube/_validators.py | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 99e41f5fc45..86e1c68f4b5 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -80,13 +80,13 @@ def load_arguments(self, _): with self.argument_context('functionapp config container set') as c: c.argument('docker_custom_image_name', options_list=['--docker-custom-image-name', '-c', '-i'], - help='the container custom image name and optionally the tag name') + help='the container custom image name and optionally the tag name') c.argument('docker_registry_server_password', options_list=['--docker-registry-server-password', '-p'], - help='the container registry server password') + help='the container registry server password') c.argument('docker_registry_server_url', options_list=['--docker-registry-server-url', '-r'], - help='the container registry server url') + help='the container registry server url') c.argument('docker_registry_server_user', options_list=['--docker-registry-server-user', '-u'], - help='the container registry server username') + help='the container registry server username') with self.argument_context('functionapp create') as c: c.argument('plan', options_list=['--plan', '-p'], configured_default='appserviceplan', @@ -128,10 +128,10 @@ def load_arguments(self, _): with self.argument_context(scope + ' deployment source config-zip') as c: c.argument('src', help='a zip file path for deployment') c.argument('build_remote', help='enable remote build during deployment', - arg_type=get_three_state_flag(return_label=True)) + arg_type=get_three_state_flag(return_label=True)) c.argument('timeout', type=int, options_list=['--timeout', '-t'], - help='Configurable timeout in seconds for checking the status of deployment', - validator=validate_timeout_value) + help='Configurable timeout in seconds for checking the status of deployment', + validator=validate_timeout_value) c.argument('is_kube', help='the app is a kubernetes app') with self.argument_context('appservice') as c: diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index b41ea418d4a..96545376146 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -24,7 +24,7 @@ def _normalize_sku(sku): def _validate_asp_sku(app_service_environment, custom_location, sku): # Isolated SKU is supported only for ASE if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P1V3', 'P2V2', - 'P3V2','PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: + 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: raise CLIError('Invalid sku entered: {}'.format(sku)) if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: diff --git a/src/appservice-kube/azext_appservice_kube/_validators.py b/src/appservice-kube/azext_appservice_kube/_validators.py index 62774895353..0393681561a 100644 --- a/src/appservice-kube/azext_appservice_kube/_validators.py +++ b/src/appservice-kube/azext_appservice_kube/_validators.py @@ -9,6 +9,7 @@ from ._utils import _normalize_sku, _validate_asp_sku from ._constants import KUBE_DEFAULT_SKU + def validate_asp_sku(cmd, namespace): import json client = web_client_factory(cmd.cli_ctx) From 34aeafab61225eec347f0ef580212e7a00d75fe0 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 1 Oct 2021 12:34:19 -0500 Subject: [PATCH 113/125] increment appservice-kube release number and fix service_name.json --- scripts/ci/verify_linter.py | 52 +++++++++++++++++++++++---------- src/appservice-kube/HISTORY.rst | 6 +++- src/appservice-kube/setup.py | 2 +- src/service_name.json | 14 +++++++-- 4 files changed, 54 insertions(+), 20 deletions(-) mode change 100644 => 100755 scripts/ci/verify_linter.py diff --git a/scripts/ci/verify_linter.py b/scripts/ci/verify_linter.py old mode 100644 new mode 100755 index 7fee6294307..8c7d0bd7640 --- a/scripts/ci/verify_linter.py +++ b/scripts/ci/verify_linter.py @@ -88,22 +88,42 @@ def find_modified_files_against_master_branch(): A: Added, C: Copied, M: Modified, R: Renamed, T: File type changed. Deleted files don't count in diff. """ - ado_pr_target_branch = 'origin/' + os.environ.get('ADO_PULL_REQUEST_TARGET_BRANCH') - - separator_line() - print('pull request target branch:', ado_pr_target_branch) - - cmd = 'git --no-pager diff --name-only --diff-filter=ACMRT {} -- src/'.format(ado_pr_target_branch) - files = check_output(cmd.split()).decode('utf-8').split('\n') - files = [f for f in files if len(f) > 0] - - if files: - print('modified files:') - separator_line() - for f in files: - print(f) - - return files + # ado_pr_target_branch = 'origin/' + os.environ.get('ADO_PULL_REQUEST_TARGET_BRANCH') + + # separator_line() + # print('pull request target branch:', ado_pr_target_branch) + + # cmd = 'git --no-pager diff --name-only --diff-filter=ACMRT {} -- src/'.format(ado_pr_target_branch) + # files = check_output(cmd.split()).decode('utf-8').split('\n') + # files = [f for f in files if len(f) > 0] + + # if files: + # print('modified files:') + # separator_line() + # for f in files: + # print(f) + + return ['src/appservice-kube/HISTORY.rst', + 'src/appservice-kube/README.rst', + 'src/appservice-kube/azext_appservice_kube/__init__.py', + 'src/appservice-kube/azext_appservice_kube/_appservice_utils.py', + 'src/appservice-kube/azext_appservice_kube/_client_factory.py', + 'src/appservice-kube/azext_appservice_kube/_completers.py', + 'src/appservice-kube/azext_appservice_kube/_constants.py', + 'src/appservice-kube/azext_appservice_kube/_create_util.py', + 'src/appservice-kube/azext_appservice_kube/_help.py', + 'src/appservice-kube/azext_appservice_kube/_params.py', + 'src/appservice-kube/azext_appservice_kube/_utils.py', + 'src/appservice-kube/azext_appservice_kube/_validators.py', + 'src/appservice-kube/azext_appservice_kube/azext_metadata.json', + 'src/appservice-kube/azext_appservice_kube/commands.py', + 'src/appservice-kube/azext_appservice_kube/custom.py', + 'src/appservice-kube/azext_appservice_kube/getfunctionsjson.sh', + 'src/appservice-kube/azext_appservice_kube/tests/__init__.py', + 'src/appservice-kube/azext_appservice_kube/tests/latest/__init__.py', + 'src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py', + 'src/appservice-kube/setup.cfg', + 'src/appservice-kube/setup.py'] def contain_index_json(files): diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index acb15d3202d..8adb810bb68 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.2.3 +++++++ +* Rewrite commands to use the CLI's SDKs + 0.2.2 ++++++ * Fix wrong custom location being used if multiple custom locations of the same name in different RG @@ -65,7 +69,7 @@ Release History 0.1.11 ++++++ -* Oops broke AppService plan create for non-k8se +* Oops broke AppService plan create for non-k8se 0.1.10 ++++++ diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index 33a17331352..ac9eb096831 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.2.2' +VERSION = '0.2.3' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/service_name.json b/src/service_name.json index 84e98f4f131..c01791d4a24 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -19,6 +19,11 @@ "AzureServiceName": "Azure CLI", "URL": "" }, + { + "Command": "az appservice", + "AzureServiceName": "Azure App Service", + "URL": "https://docs.microsoft.com/azure/app-service/" + }, { "Command": "az attestation", "AzureServiceName": "Azure Attestation", @@ -154,6 +159,11 @@ "AzureServiceName": "Azure Monitor", "URL": "" }, + { + "Command": "az functionapp", + "AzureServiceName": "Azure Functions", + "URL": "https://docs.microsoft.com/azure/azure-functions/" + }, { "Command": "az fzf", "AzureServiceName": "Azure CLI", @@ -443,12 +453,12 @@ "Command": "az arcdata", "AzureServiceName": "Azure Arc", "URL": "https://docs.microsoft.com/en-us/azure/azure-arc/data/" - }, + }, { "Command": "az arcappliance", "AzureServiceName": "Azure Arc", "URL": "https://docs.microsoft.com/en-us/azure/azure-arc/" - }, + }, { "Command": "az customlocation", "AzureServiceName": "Azure Arc", From 2d03c5d3f6444fabdc649b30e3dcbc2c7f3a6a08 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Fri, 1 Oct 2021 12:37:32 -0500 Subject: [PATCH 114/125] fix hardcoded 'verify_linter.py' --- scripts/ci/verify_linter.py | 52 ++++++++++++------------------------- 1 file changed, 16 insertions(+), 36 deletions(-) mode change 100755 => 100644 scripts/ci/verify_linter.py diff --git a/scripts/ci/verify_linter.py b/scripts/ci/verify_linter.py old mode 100755 new mode 100644 index 8c7d0bd7640..7fee6294307 --- a/scripts/ci/verify_linter.py +++ b/scripts/ci/verify_linter.py @@ -88,42 +88,22 @@ def find_modified_files_against_master_branch(): A: Added, C: Copied, M: Modified, R: Renamed, T: File type changed. Deleted files don't count in diff. """ - # ado_pr_target_branch = 'origin/' + os.environ.get('ADO_PULL_REQUEST_TARGET_BRANCH') - - # separator_line() - # print('pull request target branch:', ado_pr_target_branch) - - # cmd = 'git --no-pager diff --name-only --diff-filter=ACMRT {} -- src/'.format(ado_pr_target_branch) - # files = check_output(cmd.split()).decode('utf-8').split('\n') - # files = [f for f in files if len(f) > 0] - - # if files: - # print('modified files:') - # separator_line() - # for f in files: - # print(f) - - return ['src/appservice-kube/HISTORY.rst', - 'src/appservice-kube/README.rst', - 'src/appservice-kube/azext_appservice_kube/__init__.py', - 'src/appservice-kube/azext_appservice_kube/_appservice_utils.py', - 'src/appservice-kube/azext_appservice_kube/_client_factory.py', - 'src/appservice-kube/azext_appservice_kube/_completers.py', - 'src/appservice-kube/azext_appservice_kube/_constants.py', - 'src/appservice-kube/azext_appservice_kube/_create_util.py', - 'src/appservice-kube/azext_appservice_kube/_help.py', - 'src/appservice-kube/azext_appservice_kube/_params.py', - 'src/appservice-kube/azext_appservice_kube/_utils.py', - 'src/appservice-kube/azext_appservice_kube/_validators.py', - 'src/appservice-kube/azext_appservice_kube/azext_metadata.json', - 'src/appservice-kube/azext_appservice_kube/commands.py', - 'src/appservice-kube/azext_appservice_kube/custom.py', - 'src/appservice-kube/azext_appservice_kube/getfunctionsjson.sh', - 'src/appservice-kube/azext_appservice_kube/tests/__init__.py', - 'src/appservice-kube/azext_appservice_kube/tests/latest/__init__.py', - 'src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py', - 'src/appservice-kube/setup.cfg', - 'src/appservice-kube/setup.py'] + ado_pr_target_branch = 'origin/' + os.environ.get('ADO_PULL_REQUEST_TARGET_BRANCH') + + separator_line() + print('pull request target branch:', ado_pr_target_branch) + + cmd = 'git --no-pager diff --name-only --diff-filter=ACMRT {} -- src/'.format(ado_pr_target_branch) + files = check_output(cmd.split()).decode('utf-8').split('\n') + files = [f for f in files if len(f) > 0] + + if files: + print('modified files:') + separator_line() + for f in files: + print(f) + + return files def contain_index_json(files): From 02d2e2e9a779fb8c546304c97f511b3244309c80 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 5 Oct 2021 11:21:43 -0500 Subject: [PATCH 115/125] add testing -- WIP --- .../tests/latest/recordings/test_basic.yaml | 2176 +++++++++++++++++ .../latest/test_appservice_kube_scenario.py | 93 +- 2 files changed, 2265 insertions(+), 4 deletions(-) create mode 100644 src/appservice-kube/azext_appservice_kube/tests/latest/recordings/test_basic.yaml diff --git a/src/appservice-kube/azext_appservice_kube/tests/latest/recordings/test_basic.yaml b/src/appservice-kube/azext_appservice_kube/tests/latest/recordings/test_basic.yaml new file mode 100644 index 00000000000..ddb7418e8f1 --- /dev/null +++ b/src/appservice-kube/azext_appservice_kube/tests/latest/recordings/test_basic.yaml @@ -0,0 +1,2176 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2021-10-05T16:09:58Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '326' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:10:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "clitestpfb-clitestpfbvgslo2-2edc29", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", + "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, + "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqCuCisw1lE4I45CENzAJA4N6gJjOGCatOnXfcQ79E0A+J8DwHcUe0BOFGss0wyemWm2Ablh+FBlZajfGEkb/JyzKaBoGLwa5hLhBt5i39QAJezn7jzKTY5VDqu+V2E9SCBPiFPmXf4aLViwkZJzc0cw92nl0R134vTIxTZDFnMBfHsiluE7zV43sKDdjMBqX2mGSxPyHCpP3H2aIdSBHnzjPVCkNbaeiYLue2P0Wc4mhrc/5fLapeLG8JhvDH7cXu+QEpxepSVRO3CQMUEoSu3R1HG7MKPzvo9qaVdqO0ZzdRm+GYqtlX4tgA0WQsEVEtRoKxY33lDZ3CTAFbhWSz + strawnsc@gmail.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "networkProfile": + {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", + "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": + "loadBalancer", "loadBalancerSku": "standard"}, "aadProfile": {"managed": true, + "enableAzureRBAC": false}, "disableLocalAccounts": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1346' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks?api-version=2021-07-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks\",\n + \ \"location\": \"eastus\",\n \"name\": \"clitest000001-aks\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"clitestpfb-clitestpfbvgslo2-2edc29\",\n \"fqdn\": + \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": + \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.portal.hcp.eastus.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.28\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQCqCuCisw1lE4I45CENzAJA4N6gJjOGCatOnXfcQ79E0A+J8DwHcUe0BOFGss0wyemWm2Ablh+FBlZajfGEkb/JyzKaBoGLwa5hLhBt5i39QAJezn7jzKTY5VDqu+V2E9SCBPiFPmXf4aLViwkZJzc0cw92nl0R134vTIxTZDFnMBfHsiluE7zV43sKDdjMBqX2mGSxPyHCpP3H2aIdSBHnzjPVCkNbaeiYLue2P0Wc4mhrc/5fLapeLG8JhvDH7cXu+QEpxepSVRO3CQMUEoSu3R1HG7MKPzvo9qaVdqO0ZzdRm+GYqtlX4tgA0WQsEVEtRoKxY33lDZ3CTAFbhWSz + strawnsc@gmail.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\": \"msi\"\n },\n \"nodeResourceGroup\": \"MC_clitest000001_clitest000001-aks_eastus\",\n + \ \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"aadProfile\": {\n \"managed\": true,\n \"adminGroupObjectIDs\": + null,\n \"enableAzureRBAC\": false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\": false\n },\n + \ \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\": \"09299a05-e3da-405f-aff7-df3b96472cba\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '2861' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:10:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:10:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:11:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:11:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:12:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:12:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\",\n \"endTime\": + \"2021-10-05T16:13:31.2285666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --generate-ssh-keys + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks?api-version=2021-07-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks\",\n + \ \"location\": \"eastus\",\n \"name\": \"clitest000001-aks\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"clitestpfb-clitestpfbvgslo2-2edc29\",\n \"fqdn\": + \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": + \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.portal.hcp.eastus.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.28\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQCqCuCisw1lE4I45CENzAJA4N6gJjOGCatOnXfcQ79E0A+J8DwHcUe0BOFGss0wyemWm2Ablh+FBlZajfGEkb/JyzKaBoGLwa5hLhBt5i39QAJezn7jzKTY5VDqu+V2E9SCBPiFPmXf4aLViwkZJzc0cw92nl0R134vTIxTZDFnMBfHsiluE7zV43sKDdjMBqX2mGSxPyHCpP3H2aIdSBHnzjPVCkNbaeiYLue2P0Wc4mhrc/5fLapeLG8JhvDH7cXu+QEpxepSVRO3CQMUEoSu3R1HG7MKPzvo9qaVdqO0ZzdRm+GYqtlX4tgA0WQsEVEtRoKxY33lDZ3CTAFbhWSz + strawnsc@gmail.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\": \"msi\"\n },\n \"nodeResourceGroup\": \"MC_clitest000001_clitest000001-aks_eastus\",\n + \ \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/05fac316-c50d-4820-bc3c-cce50eb906a6\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": null,\n \"enableAzureRBAC\": + false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n + \ \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/clitest000001-aks-agentpool\",\n + \ \"clientId\": \"78eae02c-f5e9-4c68-a182-a00cf73b201d\",\n \"objectId\": + \"f4bb979f-c8e7-4145-a4ea-1f60075b7040\"\n }\n },\n \"disableLocalAccounts\": + false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\": + \"09299a05-e3da-405f-aff7-df3b96472cba\",\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"sku\": {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n + }" + headers: + cache-control: + - no-cache + content-length: + - '3572' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --output --query + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks?api-version=2021-07-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks\",\n + \ \"location\": \"eastus\",\n \"name\": \"clitest000001-aks\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"clitestpfb-clitestpfbvgslo2-2edc29\",\n \"fqdn\": + \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": + \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.portal.hcp.eastus.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.28\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQCqCuCisw1lE4I45CENzAJA4N6gJjOGCatOnXfcQ79E0A+J8DwHcUe0BOFGss0wyemWm2Ablh+FBlZajfGEkb/JyzKaBoGLwa5hLhBt5i39QAJezn7jzKTY5VDqu+V2E9SCBPiFPmXf4aLViwkZJzc0cw92nl0R134vTIxTZDFnMBfHsiluE7zV43sKDdjMBqX2mGSxPyHCpP3H2aIdSBHnzjPVCkNbaeiYLue2P0Wc4mhrc/5fLapeLG8JhvDH7cXu+QEpxepSVRO3CQMUEoSu3R1HG7MKPzvo9qaVdqO0ZzdRm+GYqtlX4tgA0WQsEVEtRoKxY33lDZ3CTAFbhWSz + strawnsc@gmail.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\": \"msi\"\n },\n \"nodeResourceGroup\": \"MC_clitest000001_clitest000001-aks_eastus\",\n + \ \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/05fac316-c50d-4820-bc3c-cce50eb906a6\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": null,\n \"enableAzureRBAC\": + false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n + \ \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/clitest000001-aks-agentpool\",\n + \ \"clientId\": \"78eae02c-f5e9-4c68-a182-a00cf73b201d\",\n \"objectId\": + \"f4bb979f-c8e7-4145-a4ea-1f60075b7040\"\n }\n },\n \"disableLocalAccounts\": + false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\": + \"09299a05-e3da-405f-aff7-df3b96472cba\",\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"sku\": {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n + }" + headers: + cache-control: + - no-cache + content-length: + - '3572' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "sku": {"name": "Standard"}, "properties": {"publicIPAllocationMethod": + "Static", "publicIPAddressVersion": "IPv4", "idleTimeoutInMinutes": 4}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + Content-Length: + - '166' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --sku + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"MyPublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP\",\r\n + \ \"etag\": \"W/\\\"223f6e79-674a-4013-84a5-0664241d6d66\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"0a879c78-dc82-4495-b2f7-6d0077b573c9\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/44b51196-cc7b-47e0-9cc9-3857c3101172?api-version=2021-02-01 + cache-control: + - no-cache + content-length: + - '683' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 22c842a0-9dd4-4a88-b5bd-1853a558a772 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --sku + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/44b51196-cc7b-47e0-9cc9-3857c3101172?api-version=2021-02-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - f1c21393-361b-48a5-88f6-d2a4222f4ed4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --sku + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"MyPublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP\",\r\n + \ \"etag\": \"W/\\\"ff2bce44-8662-4edc-9c8c-71e149f4b776\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"0a879c78-dc82-4495-b2f7-6d0077b573c9\",\r\n \"ipAddress\": + \"52.224.180.108\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n + \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": + {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '720' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:40 GMT + etag: + - W/"ff2bce44-8662-4edc-9c8c-71e149f4b776" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 27be7f46-fa8f-48c8-b8b4-277d65740a01 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --output --query + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP?api-version=2021-02-01 + response: + body: + string: "{\r\n \"name\": \"MyPublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP\",\r\n + \ \"etag\": \"W/\\\"ff2bce44-8662-4edc-9c8c-71e149f4b776\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"0a879c78-dc82-4495-b2f7-6d0077b573c9\",\r\n \"ipAddress\": + \"52.224.180.108\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n + \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": + {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '720' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:40 GMT + etag: + - W/"ff2bce44-8662-4edc-9c8c-71e149f4b776" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 5761f654-b634-4ebe-abd0-672116da93da + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks get-credentials + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name --admin + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks/listClusterAdminCredential?api-version=2021-07-01 + response: + body: + string: "{\n \"kubeconfigs\": [\n {\n \"name\": \"clusterAdmin\",\n \"value\": + \"YXBpVmVyc2lvbjogdjEKY2x1c3RlcnM6Ci0gY2x1c3RlcjoKICAgIGNlcnRpZmljYXRlLWF1dGhvcml0eS1kYXRhOiBMUzB0TFMxQ1JVZEpUaUJEUlZKVVNVWkpRMEZVUlMwdExTMHRDazFKU1VVMlJFTkRRWFJEWjBGM1NVSkJaMGxSVGtORmVVNUNTVkp4UjJOUFlVOURTU3R6WlV0bGVrRk9RbWRyY1docmFVYzVkekJDUVZGelJrRkVRVTRLVFZGemQwTlJXVVJXVVZGRVJYZEthbGxVUVdkR2R6QjVUVlJGZDAxRVZYaE9ha0YzVFhwYVlVZEJPSGxOUkZWNFRWUkJkMDVVUlRKTlZFRjZUbXh2ZHdwRVZFVk1UVUZyUjBFeFZVVkJlRTFEV1RKRmQyZG5TV2xOUVRCSFExTnhSMU5KWWpORVVVVkNRVkZWUVVFMFNVTkVkMEYzWjJkSlMwRnZTVU5CVVVSV0NuSmxWMWh2WjJKclNXNUxVVlZPWnpCbVNHcHhUVE0yZDJOYVVURnJZMUE0ZFVvM09XOUNiVzFCU0ZWTFIybFBObkpZVVdGVVZqaGFWV3hKVjNKUlZuWUtNM1ptYzBkTFQwUmhTRU0wUnpkcFozTlBUVGhRVFVVMlJFeG5Na3czYlhGNGFEVjNVbmRhWkRKMGRtdHZOR29yWWl0T1VIbEpRMGxxZEZWRU1XZFBMd3BHVjI5SFUyOUpaamhyUkZZeVRIbEZjRll3VGxKM1dWSmlaRVptVlhKS1ZIRnRRamRQV1ZCTVUyVkdUR3hzYkVwVGVqRnhWbXREUkdaVU0yNDBkV3B6Q2pKaksxTjJTbTFsVGxWUlRXWjNhRzFtY1VSWUswdDFTM1JxVlZWbWNFMTZTRW94VUZkWU5ESndNMHRGUkZaRmMwZHpOMFZQV0Vkck0wcHdSV2xQTjNrS1pIaE5ZamxMTVVWVk5HeDJhbXRhT1ZCSVZrMVdiekpCU1VkUU9HODJVRzlhZDNSSlFtVndOR3h3ZDFNNVJ6ZHdlWGhrY1ZRdlVteFdUMHRwV1c5WU5BcG5abFkxTm1oT2VsVlZVVWhqUm1sdFFtSlpibUZqWVVRMGVtNW1WMVZ3Tms4dmMxcE9aM1pGYzJ0d01WRXdaV2RyYkV4RlVtNXBSRWh1VDBZMlJuY3hDbkYyY0hoalRUVlpOVUpKVUVWaE5YZHVkRGRDYkZGYUx6QldRakEyUTAxaVYxSlNaMmhaUml0dmJqWnBha0k1YTFGRk5IbEpNemxVZEhGRWNWVkJWRXNLWTBoWU5XWmpNelo1T1dsa2VFMXpZVFUyU0VaWWRXRkVkbmh4SzJGM2QwOUZUR28xZUZkdWVrRkplRTlEUVdJMVZ6TjFSR3BhTkU5WGIwVnZiRzlLWWdwWU1qQk1aU3RJY0ZKRk1rUmxTR04yTmtSclVsTnFiakpCTmxSVlZUa3hWRFkxYURGbWNVTlZWblJQYjBaV1FrbHdSVU55V1U1Vk5rVlJkbXM1ZFdKWENtTlNMMFZGTDBGNFpVSTNlalU0VGxGNFVFdFdNM0ZQZUdKeFJIZHJNalF6SzJOV1FUTXpZa28xUnpsUVN6UlJPVUZpVjBoNVpXMDNPV1pPWTNRd1JUY0tkWFpWYWpaeVIxRkhibXM1TVZCeldXaEVhVGN6VGtwUFpFeDBNSGQyTjFaTU5rUlpabmg2ZWs5UlNVUkJVVUZDYnpCSmQxRkVRVTlDWjA1V1NGRTRRZ3BCWmpoRlFrRk5RMEZ4VVhkRWQxbEVWbEl3VkVGUlNDOUNRVlYzUVhkRlFpOTZRV1JDWjA1V1NGRTBSVVpuVVZWRVNtbHBWR05MY25KVGEyMVFla3BUQ21aWFFtaDVaa2hYV2k5TmQwUlJXVXBMYjFwSmFIWmpUa0ZSUlV4Q1VVRkVaMmRKUWtGSGQwdExibFV5V1RKNFFrVnJURU5rT1ZBMWREY3hiMloyY1ZrS1NGSjFka1pOVmtsVGFTOXRVamgxZFZaYVlWSkNhbW95YkhSM1JXVTJZM0F5YXpaSmVrVkxjWFZGWnpoS1ZFTTJMeXRRVW1zMllqWTVlUzlWYVdWV1NBcGpWVE4wZUZkbFpscFlkek15UlhaclVHTTVUMm8xU3paSlZrTkxXRmhVY1dOR2RXa3ZkekJYZUZWRFduY3dhWGxoUlZwcGRGVXdSemN3VjNOeFQyeGtDalZKVVVkeFFXdDJPRmRqVFdaTGNrVnFTR0pGVTI1bFpsVXpTR3RFWVRkRFZUbExiRzlCUjBscWFubHFjSEJCYmtRM2NFdHNWa3RGWlRaTGJrbG1hRGtLWWtzNGJWaFFlRUYzVEdzMFJGazNTRFZDWVZKcmNFbGhZM2MyYW1jMlpHTndTa1ZMU0RGSWJraG5ia04yTlZsMmFsRk9SWGxoVDFkWFozRnVWVmwxTmdwWVVHaEJTMGx4Y1dRMVdXaGhlVEY1ZVU1a1NuTnhjR05UVW5rM1dVSnBUbUZ5TWpGNVJIZDBZa0Y0Um5sUllVSnhOa2wzUlRsYWNrbGtWRGxtYzNOa0NrTjFjRnBoUlZab05HVldWV1I0UTJaalZqZGpjazR4ZUdNd2FraE1PRXBFVVZOUVdqTlZRbU5xVDFkQkt6TjJTemhoU1hSVWJrbFZkVUY2YkdGMGJEWUtXVVlyUzFsVWFHVnRUemRRYURCMGRsUXJZMjh2TmpOcU5qSkVaRGhxWkhneFlsSTJMMHQ2ZUZCWmRHRk9hMUl2T0ZKcWFWVjFTMGRyYlRaRVduaHpMd3BMWXpGb05IWkhkbFoyVUVWQmR5dG9ZM3BoZEVWSmIxZFlkVXBqUVRaV2IzcGlRV2xaYzFONllWSm1URVZLT0VzMWJrTkVjMjlqZUZoSGRscHhSVFZPQ2paVVVrRndaMjg0YjNsR2VqRllTRkpPUlhObGJ6VjVlRGRqY0hOcldpOTBPSGN3Y2pWcU1ESk5PVVJYS3pkd1ltSjJVekJyZFUxdU0yRk9NMkY1U0NzS1FrOWFkMEpuYTBoMlltWlllRlJUUm1OMWIyZHZTQzlaTDFCUE0waEpUMmRKVWxKUFpIQlhXRlZZU1RSQ0wzSlJRMWsyYlRoQ2RDczRjWGg2VjJaR2RBcHFjVTU0VEVNeWVraHdja0ZrVm01VkNpMHRMUzB0UlU1RUlFTkZVbFJKUmtsRFFWUkZMUzB0TFMwSwogICAgc2VydmVyOiBodHRwczovL2NsaXRlc3RwZmItY2xpdGVzdHBmYnZnc2xvMi0yZWRjMjktMjFkOTFhNzguaGNwLmVhc3R1cy5hem1rOHMuaW86NDQzCiAgbmFtZTogY2xpdGVzdHBmYnZnc2xvMmhndXhjZjRsLWFrcwpjb250ZXh0czoKLSBjb250ZXh0OgogICAgY2x1c3RlcjogY2xpdGVzdHBmYnZnc2xvMmhndXhjZjRsLWFrcwogICAgdXNlcjogY2x1c3RlckFkbWluX2NsaXRlc3RwZmJ2Z3NsbzJoZ3V4Y2Y0bF9jbGl0ZXN0cGZidmdzbG8yaGd1eGNmNGwtYWtzCiAgbmFtZTogY2xpdGVzdHBmYnZnc2xvMmhndXhjZjRsLWFrcwpjdXJyZW50LWNvbnRleHQ6IGNsaXRlc3RwZmJ2Z3NsbzJoZ3V4Y2Y0bC1ha3MKa2luZDogQ29uZmlnCnByZWZlcmVuY2VzOiB7fQp1c2VyczoKLSBuYW1lOiBjbHVzdGVyQWRtaW5fY2xpdGVzdHBmYnZnc2xvMmhndXhjZjRsX2NsaXRlc3RwZmJ2Z3NsbzJoZ3V4Y2Y0bC1ha3MKICB1c2VyOgogICAgY2xpZW50LWNlcnRpZmljYXRlLWRhdGE6IExTMHRMUzFDUlVkSlRpQkRSVkpVU1VaSlEwRlVSUzB0TFMwdENrMUpTVVpJYWtORFFYZGhaMEYzU1VKQlowbFNRVTB2ZVM4M1dtRXZkSEI1VXpoNlJqWXdibEkwY2pSM1JGRlpTa3R2V2tsb2RtTk9RVkZGVEVKUlFYY0tSRlJGVEUxQmEwZEJNVlZGUVhoTlExa3lSWGRJYUdOT1RXcEZlRTFFUVRGTlZGbDNUVVJOTWxkb1kwNU5hazE0VFVSQk1VMVVXWGhOUkUweVYycEJkd3BOVW1OM1JsRlpSRlpSVVV0RmR6VjZaVmhPTUZwWE1EWmlWMFo2WkVkV2VXTjZSVlpOUWsxSFFURlZSVUY0VFUxaVYwWjZaRWRXZVZreWVIQmFWelV3Q2sxSlNVTkpha0ZPUW1kcmNXaHJhVWM1ZHpCQ1FWRkZSa0ZCVDBOQlp6aEJUVWxKUTBOblMwTkJaMFZCTTFSTGVFcHdNREpGSzAxUVdqQjNPQ3RrV2xVS05ucHJPVEl4T1ZCRFFTdDNNREV5WkRSTlpqTmhaVEJFY0dKQ1VUTlNjMkpTTmpSemNuZDJjRVEzVlRocFZVcEhWVmdyVXpWNU5FSkpZelpEYTB4Mk1RcHBVVElyWkd0Q1kybDZibTVrWlZSM05VbGxNaTkzV0ZkTE9EaFdjMjFUY1Rnd2EzQk1kV2xoUW1zMVRqVmFPWGh6VG5ab2VrUktUMmQ0ZFdoWVNuWnlDa2N4ZUd4T1JsaFhRVVZ2TTFwMmVXdDJPV1I0TVZSSVVtMDBkMXBvVkdjMmVuSllSUzlDT0VGa1p6UndZMll2TkdoTWIxRnFSMmxhUVZkV00wSjJaMjhLWmsxcmRrMUZObnB6VGxGV1RtOVFUMlJMV0dkeldHeGFjMHBsU0dOMFZteEZSRGhZYmtSQlpFczNZV1J4ZWtwWVVVZHJkMXBSUjBrM2JFdEZhR3BTU2dvclExaG9WbU13UmpSdldERnBlR2wyVkVsQ2RtOUdOR051V0hvM2MzaGpRVEE0VkhWclVVaFNTVTAxUW1sQ1FXVnJRV0Y1VFVkMVp6WjJRMVZhVnpCbUNuUnpWMGRMZEhCa1ptNWtSRTUxUVZkSFMzaG5iR0Z3ZUhaaFpFcHpSM1p2UkdoMk4zb3ZlRVJoU0V0eVJHUm9LMlJ1VGpGa05HUnJiV0pCYTB0WFpXUUtNbmxVVmpoRU1HRlVORGdyUlM5c1lXRm9SRlpPWWpsdVdqbHdZU3RGV0hkNFdVVnBNWFZzVEdSaFIwdFFORlJrVmprNFFuWlljMHBrWVZKck1XdHpjZ296V2k5YVVrVlFhelJMVEd4TVZVMU5iR3BLTUUxRVpFNU5aMHhDYjFaNFNtODBUMVJZT1hoa2JEVlVTSEJ4ZW5GYVNqVkZaRTVyZUcwMVVqSTJWak5XQ2xVNFJtWTBhbGNyVTJSYVlWaFVjekFyVjBkUE4wWmxWRWd6TUhFME1HTnpVVE41ZW10S1NVWmtkV2swYzBzNVZYVlNPVWsyZDNwUGEzUjVTbVp4VVZBS0x6WnRTMUF3YzBzdlprZDFPR2xHU2pOaVozTlJiSHBoUzBoUlVtTjBWRklyWkhodlQyUkJZa3hHUXlzMGFFMHdabVZyUWpneFRsbGlVelZVZFdKc1N3cFhUazlKTmxSVFdGVlRkVmw0TjI5VFVGaGxTMnBUT0VOQmQwVkJRV0ZPVjAxR1VYZEVaMWxFVmxJd1VFRlJTQzlDUVZGRVFXZFhaMDFDVFVkQk1WVmtDa3BSVVUxTlFXOUhRME56UjBGUlZVWkNkMDFEVFVGM1IwRXhWV1JGZDBWQ0wzZFJRMDFCUVhkSWQxbEVWbEl3YWtKQ1ozZEdiMEZWUkVwcGFWUmpTM0lLY2xOcmJWQjZTbE5tVjBKb2VXWklWMW92VFhkRVVWbEtTMjlhU1doMlkwNUJVVVZNUWxGQlJHZG5TVUpCUVN0TlNYQkNaemxrU2pWVFIwazFWbTFrYndwbmFDdHVSSFozUWsxbkswWTJSRmhDUjFOak5VaFNRVEpZWkRWaVVHTllTSGQxUlRKMFRsZEdlbUU0UWxOU2FXSmFaMGRZWVZGNmNrWm9OMDFzY2tOMUNqWkRNelp6VkV0TWNFZHRkbmRzZUhCTlMwbGphazRyU1ZsWGFFdDBURkpQVm5KTWJFRnVNVGhXV1ZVNFNVbGFTRkJoZW04M1NtRlBaVzFWZEZabGNVUUtUbVpPUlRWV2J6VkxUa0ZPYmpKeU16QkxkRE5QVUVjMmNXWXpMMU5UUVcxNlNXNXJOWGczVkVzeFYzQkJOMDFGVWpCRGFVWTJMMk51ZFZodWNtTndhZ296T0dKS1FtczNUbkkyYURZd1NuUlZUVEZFUVdaSWJTdHJUVEZUYms5R05WaGlTM0pxTTNoR0wybE5TV0ZoVVV4VVpUQlZhV1lyYmsxSGVtNUZhRzl1Q2xwYU0wOHhkVTVpVGtWcmRuSmhPRUZqVWsxS1MxRmhjemRWY1hSUWRuaEdUek52UTJNMGQzVmpTVEoxV21Fck1VNXFRamRFYm01SVNqQlZVVlZFUnpjS2IzTXdZMVpVU0hkaGJWZ3ZTbVF6Y1hBNVdqTTVja1J6Y1V4Q1VFdzVTbk5PV2sxWFoxaEJibFJvT0U5bVQzTmFkRXR2U0ZCeGNubEdaMEYxVkV4R2F3cE9XV05wUjFORU1EZzVlWGxCVGtKWGFVUnBiM1ZCVlhwaU1VMURlbkZ5ZEVOelNGUTNZek52ZDBsNFFUVmFjV3BWZVU0MVZHSlpTbGxVZG5WWU5tcGlDa0YxUlN0cGVYSXdPSGxSYVhsS1MzRlVhVGQxV25aVFNDOVRka0pQYkhCeFJXaGtibTFYV0RGeFZIcEROMWwwTDFoSWRFcHZhVFE0TW5Fd1ZUSkhRelFLVTFaRlJHcHVaalpSYnpoNWFTODFOWEZ0VkhaNVVWQkJialJqUTJkNk9XcFlVRTgwWlc1R1l6SjFTa2hWVWxGUmIzaHpkbmtyUTJZNVYzQlhkVEZRTkFwRFRuTm5abGs1YkdSRE9VMTZaWFl4WTNob1pYRlZialpQZEdkR1MxbDZkMFU1TkN0a1lsQTBla2hqWm5OU1dFOXFVWFJYV1ZrclFWWmFSbVIxYkdabENsUkVTRWg1YldwNWNERklWR2c1TkVZeVRGUlZZUzlWUmdvdExTMHRMVVZPUkNCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2c9PQogICAgY2xpZW50LWtleS1kYXRhOiBMUzB0TFMxQ1JVZEpUaUJTVTBFZ1VGSkpWa0ZVUlNCTFJWa3RMUzB0TFFwTlNVbEtTMEZKUWtGQlMwTkJaMFZCTTFSTGVFcHdNREpGSzAxUVdqQjNPQ3RrV2xVMmVtczVNakU1VUVOQkszY3dNVEprTkUxbU0yRmxNRVJ3WWtKUkNqTlNjMkpTTmpSemNuZDJjRVEzVlRocFZVcEhWVmdyVXpWNU5FSkpZelpEYTB4Mk1XbFJNaXRrYTBKamFYcHVibVJsVkhjMVNXVXlMM2RZVjBzNE9GWUtjMjFUY1Rnd2EzQk1kV2xoUW1zMVRqVmFPWGh6VG5ab2VrUktUMmQ0ZFdoWVNuWnlSekY0YkU1R1dGZEJSVzh6V25aNWEzWTVaSGd4VkVoU2JUUjNXZ3BvVkdjMmVuSllSUzlDT0VGa1p6UndZMll2TkdoTWIxRnFSMmxhUVZkV00wSjJaMjltVFd0MlRVVTJlbk5PVVZaT2IxQlBaRXRZWjNOWWJGcHpTbVZJQ21OMFZteEZSRGhZYmtSQlpFczNZV1J4ZWtwWVVVZHJkMXBSUjBrM2JFdEZhR3BTU2l0RFdHaFdZekJHTkc5WU1XbDRhWFpVU1VKMmIwWTBZMjVZZWpjS2MzaGpRVEE0VkhWclVVaFNTVTAxUW1sQ1FXVnJRV0Y1VFVkMVp6WjJRMVZhVnpCbWRITlhSMHQwY0dSbWJtUkVUblZCVjBkTGVHZHNZWEI0ZG1Ga1NncHpSM1p2UkdoMk4zb3ZlRVJoU0V0eVJHUm9LMlJ1VGpGa05HUnJiV0pCYTB0WFpXUXllVlJXT0VRd1lWUTBPQ3RGTDJ4aFlXaEVWazVpT1c1YU9YQmhDaXRGV0hkNFdVVnBNWFZzVEdSaFIwdFFORlJrVmprNFFuWlljMHBrWVZKck1XdHpjak5hTDFwU1JWQnJORXRNYkV4VlRVMXNha293VFVSa1RrMW5URUlLYjFaNFNtODBUMVJZT1hoa2JEVlVTSEJ4ZW5GYVNqVkZaRTVyZUcwMVVqSTJWak5XVlRoR1pqUnFWeXRUWkZwaFdGUnpNQ3RYUjA4M1JtVlVTRE13Y1FvME1HTnpVVE41ZW10S1NVWmtkV2swYzBzNVZYVlNPVWsyZDNwUGEzUjVTbVp4VVZBdk5tMUxVREJ6U3k5bVIzVTRhVVpLTTJKbmMxRnNlbUZMU0ZGU0NtTjBWRklyWkhodlQyUkJZa3hHUXlzMGFFMHdabVZyUWpneFRsbGlVelZVZFdKc1MxZE9UMGsyVkZOWVZWTjFXWGczYjFOUVdHVkxhbE00UTBGM1JVRUtRVkZMUTBGblFXOWxiazVUY0hGb1ZIZFdVamRUWTJSTGVsQTRhbEZKYkdsVlRFZHpkblp3VkRRMmFsWnFjVXB1U0hac2R6UTNRVmxzYWtwTGVuTlFZd3ByUzJodmRVaHFTV2RZYkU5NGNreERXRmhtVm10UE0zaDNTVTk0VUdaUGFIWnBkSGhUZG5Cb1dqZEVlR3RUYUdGNVRqSnNha3hNYVhZeWRFNU9Ra1V5Q2xKV2FWTlhUbWRIWTJ0UmFUUnJiMU42VVRONlJHbGFZMUpUWjJ0RVMyUXdhVlpUZEVoMVpTdHFMMDE1VEVOSWJuRnpUVFV6VFhnMmVGbDRNV05YZDBnS01qQkRRbGRvZDFwbldXTm1LM1JETW1OU2JUSXlURTlOWTJaTmRYbHlORFEzT1RSUlQwODVZekUwWmpkaWNrOU5jSEpHVlVWS1lUTXlMMk4yYm5WM1lRcEtLeTlsY0ZBNU4yRmhNM1l5Y0VGQ2JTdE9UVUZaZGtFMU1tRXhORE5ETVNzNWRtTXhWR3BYTmtsRFJERnRhMWhDYzBocWVrSkNabVZLUlhSTU4yVmpDbW8yUjA5cFJrRlVjbmxrTkc5a1JWQTNWa2swVkVOb1RESXdiRmhIVUZGUlRWaHVSME5wT0Rnd1IwcEtkR0pZUXk5aGJtTmxWbWhGYmxWWFVIWmFLMWNLZEd3d0szRlhaMGxyY1VaMFZEVm9kemg0YXpOU1NVNWFUQzh5U1VaeWVrUkpOek01ZWpkMVpIcGxZM2c0VDB0WFlVaFpWWGhHWTFKdFluSXlNR1U1WVFwd2FreHdibUZPYmpoaFJDdENRMGhKUjJKS01ucGtlRlJrTUdScFMzUkhXV3R2Y0hGc1lVRnZTbEZGYUhGclkyc3dTVVJDTlhwWU9YWlBPRWcwYm1KeUNuaHJWRVExUm5WeGRHUndUSGRGTW0xd1lUY3lTRWxKYVZjNWEzZE1PRUUwUjNod0szVlNlRE5EUTBkTlRVZENTaXRRWW5oWlFsaEhhamRPT0ZobVpEVUtlWFpaV21KQ2JXeHlSMVpXTW1WQ2FWSTJjVXRyZFZCYWQycHJNV1ZYV1doQlEyeFFkVkIyVTBkTGMxWmlZMEpoTUU5WFRGTnpkMk5VYTA0cllUSnRjd3B6VVRGb1VteG1SWGRwTm5Cblp5OUdXWEZJWW14dlJrSjBZMDgzY1dkVkwwOWtWbXhCVVVSUlVVNTNkamRaYUdaMVVVdERRVkZGUVRVME5qTlRVeXRvQ2s5dVZYTktWVlpoV0RZMFkwcG1aSFV3VWpoT2FHeGhTa3BaWVdOTGF6VjZOMFlyVm1oT1UzQnFiVE5PTlhOeFMzaEJaMjFVU0cxYWFFSXJTbVpqUjBvS1QzbHNSM0I2UWxOR2EyRkdibkZKVVdZek1YaDNSVVF4ZW5wUU5ESkhjWGN6ZFVWWkx6Y3dTRTkwUWtoNWRVaHFSVVp1UlZCcmVtZDVjVXRrYm5Od01Bb3lTbGwzTUdNdk1qZERhak5SVlRCT1lsQlVOVGdyYkRaVVRrbFRTRVJEUnpka1pHb3JkMDR5VG5Bck5HbFhabFpZTUU5RlNqWkRSVmhGWTFwTlJFeHJDa1pFVEVwYWFrZEVSMHB2WTJOUGVIQlBlR0ZSWm5SbGF6ZGxiR1pTY1RaWVUzUjBlR2hwSzJSRlVpczBkemxuTW05RGNDOXhjR0pXWmxGU0sxSnRVVXNLYXpWclMzWlJhRVpIZURGVlZHTnRSMGRhTm1JemNHaDRWaXNyUTB0UGVHOTBTMEZMVFdFNFNVZFZSRFEyWVdoUE4xVlhiMXBOY1U1QllYbHhlaXR3YWdvd2FFNVNaekJvT1haTGVFZDZVVXREUVZGRlFUbEpkMHBUT1d4SUwxSndiRlpGSzA5bllWWm1OelpvTlRKQmVuTm5ZMEl4V1VacWEwSTVWMm8zYVhRckNteHdjVXRHVUZSa00zTjZSVzQxWms1bUswUmtjemxJTWtoalkxcGhXVVJZZVcxbEsxaG5PV3hzYlZkcmNWRTNNbkpYUXpoSFp6TmFWelpzYUZZeVFsb0tWVzQzVTBFdmJtVjZhek5pVFVwSGR5ODVjSG8yY1haS2VrZDNhRk4xWVhOc1dsVjRXVXhRYUVGTFVGRlZRWE4wVWsxM1VsaERNbkl3Vldsd1dtMUNLd3A0WWtORFEyNVlibUpGYzAxa09WcEtjMjlwYmpFMmQyUTNZVlpSYjIwMVJta3hkWGt6WVRjM2FrUllMM1Z6TjFWUVFYVkljV3h0TDJkM00yTXlPVzVYQ2tWNFN5OU9PREI0VjBRdmRrbE9hbTk0Wm1SNk4zQllhVUY2WTJaWlJrTXhkR0ZVVlhCRVJrUllNa2R2Y0VveldtRktiVWxOZDA5WVVWbG9VemdyVXpNS1lqZG1UVEpDTWt4dFUyWnBaVzF2Vm5SS2QyTTFXRlZ2TXk4clNqZDRUR3QxYlZkVU5VVllURFozUzBOQlVVSkZla3BMU1c1RE5EZFJSRlYwYm1JeVRRcFZRamR6Tms5a01FZDBXRm8xUkhjM1pXaE9UVkJ4VFZONVFrOVZjemx5ZEVKd1RESjZOV05NVWpaRFdtVkZaVEJwWlhCQlFYaEVWRVY1UWpZM1JrSXpDbUprZVd4c1YwWjRaamhSWTJGNlEyUnlPRTUzUTJOTmFtUmFORWd6YUVsWU1USndPVlJWUVRWNU0wbFVWVXRSTld0TVpHdFNjVTFST1hjM2NWSXZRVVlLYlhWYVlqaEthbU5zY1hwMFZ6WkhTekJhSzNZMFNITXlhalZwVmt4RFNXcGxURVpNYjJnMGVtWTRkakJQYVRCYVptTmFkVWMzUkVscU5EVnVXSEUyYXdvd1MxWkRjQzkwWTBsM1ozSndPR0pLUzFZeU1XdHZjRUpKTlVwSVdFUTBLM0ZFTkhSamEwSkpkR3htV1ZJMWFVY3pTamR2UzNwRk5WTlhPVE5YY3pKMENtdE1iRXh2TWxSRmJDdDFXRFUxVGtadVZsQXJPVXczYm1FclYySm1XRmhoYVhkT2NEWlRaMHRPTTJkbksyc3lURUZrU2l0c1FsY3dhRk5xYVRaT1lub0tRaTk2UWtGdlNVSkJVVVJTUmpCaUwycHJiSEZHU0Raa1NuVlRLek4zY0ROSVNVMUtaMjkwV25GYVpubHBRelUwYzBka1dYaGxSMWh1V1RCQmRrSnNWUXBZV25GcmNHbFFlaXRsTURGNVoybzBhblp4WjFwaFUyTkZSRmxLYzBod05ISklSM05vZG01T1dtc3JUM0V4WVRCak9DdG9OazlUVjJvME5qaEVXa2tyQ25KUU1FUjFlRFIxZEV4aE1UWkxjRVJYYUZSb1QxQm9TbU5YV0d4MlFXUm1RamRIWlV4MVFrY3lXVVJwV1hJMWN6RkJZbUpZVW1kdWNWaExWM2hTWWxvS1ZtaFlWVUpQYmtGa0t6SnBhbmw1VEhVdlUwVXpWMjlwTjBsWGVqSXJRME5yY3pCVlEySkpXRzlRWjJaYVJuUkhSRGN4VDFWVFVXbzNUSGxKVm5FMmFBcFBVa1ZhT0dKNVpGQTJXR3hWYTNkTU1tSTJMMGRIVFRGaGVtcFNTbkp1YmxCT1dETTBiWE0wWWpCWGRqaEtjMDFWYVZsNlIwNVVjVGxoYkRGQk1WbFFDak55Vm1KWE5HTjRhRTlYUlVnM1pWTlNjV3BIVUVVMVRGQllla1pEYUZJdlFXOUpRa0ZGYnpGV1dVSm5VQzgxYkhkamNsUjJNM0JsZUhodFUybG1lVUVLVkZoYWRIWjFhbGhZVjI1RWR6aDFNVlkxZW1SaWQzWlBWa3BEYWxkVlEwUTJTMlp0WnpGWGEwOTNMMmhyUWxSVWFtTnRiRXhvZDBsUWRqTmlWSGR0TXdwSU5FeGtlQzh3TURBeWMyMVBhREJtUlRSVVMwZG5aMWhGS3pjM1NqQkhOelkyU1d3NGNUUTRUMHBvTUdrNU5WWlZhbGsyV1V3MWVTOUNhM1phTVU1VENrdG9MMUpZTkdWUldtcFVjVTUzUjBkS2VscDVUbXBETkdSclZrdHhaVkJ2V25KRWFreG1ka0pEV1ZOcEswZFRRbFJaZUZneFlXVm9hV3BwV0d4YWFrY0tRa3hzU0dRclRsaFhXV1J6VG1WVmFsRnBlV3RFYUU0Mk9YYzVia3RRU3pCQlpURkNPV1oxVVM5cFdUQndhRGRPVjBKdU16aE9WMVpvT0ZaQ05UQm9hd3B3Y25kM1QzWkdVQ3M0Y0RKME5DdExWV2Q1VFdORVpGVlVUWFIyTWxKMmVsSlRjR0UzZGxWb01sZEtObWxRZDFsNVRYVkRZbXB1TWtGblJUMEtMUzB0TFMxRlRrUWdVbE5CSUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLCiAgICB0b2tlbjogYTgzN2M3NGExNGZhMjZkNGFjMWViMGZlMmNiYWI5MDAzZjE2MzQ1MjhkNWM0ZTY5MDM1YzhlMmNkYjFkNTk3ZjNkZjAxNzU4NGJkNGYxMjRiZWNjMWQ1YWNiY2YxM2QzNWVmNThlNzA0NmU4OWY1ODk0OGY1MDJhNmViNWQ2NzQK\"\n + \ }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '13213' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"8edd93e1-2103-40b4-bd70-6e34e586362d","roleDefinitionId":"eb67887a-31e8-4e4e-bf5b-14ff79351a6f"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe","France Central","Central + US","West US","North Central US","Korea Central","Japan East","East Asia","East + US 2 EUAP"],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"SystemAssignedResourceIdentity, + SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe","France + Central","Central US","West US","North Central US","Korea Central","Japan + East","East Asia","West US 3"],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"Operations","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '2132' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KubernetesConfiguration?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KubernetesConfiguration","namespace":"Microsoft.KubernetesConfiguration","authorizations":[{"applicationId":"c699bf69-fb1d-4eaf-999b-99e6b2ae4d85","roleDefinitionId":"90155430-a360-410f-af5d-89dc284d85c6"},{"applicationId":"03db181c-e9d3-4868-9097-f0b728327182","roleDefinitionId":"DE2ADB97-42D8-49C8-8FCF-DBB53EF936AC"},{"applicationId":"a0f92522-89de-4c5e-9a75-0044ccf66efd","roleDefinitionId":"b3429810-7d5c-420e-8605-cf280f3099f2"},{"applicationId":"bd9b7cd5-dac1-495f-b013-ac871e98fa5f","roleDefinitionId":"0d44c8f0-08b9-44d4-9f59-e51c83f95200"}],"resourceTypes":[{"resourceType":"sourceControlConfigurations","locations":["East + US","West Europe","West Central US","West US 2","South Central US","East US + 2","North Europe","UK South","Southeast Asia","Australia East","France Central","Central + US","North Central US","West US","Korea Central","East Asia","Japan East"],"apiVersions":["2021-03-01","2020-10-01-preview","2020-07-01-preview","2019-11-01-preview"],"defaultApiVersion":"2021-03-01","capabilities":"SupportsExtension"},{"resourceType":"extensions","locations":["East + US","West Europe","West Central US","West US 2","South Central US","East US + 2","North Europe","UK South","Southeast Asia","Australia East","France Central","Central + US","North Central US","West US","Korea Central","East Asia","Japan East","East + US 2 EUAP"],"apiVersions":["2021-05-01-preview","2020-07-01-preview"],"capabilities":"SystemAssignedResourceIdentity, + SupportsExtension"},{"resourceType":"operations","locations":[],"apiVersions":["2021-09-01","2021-06-01-preview","2021-05-01-preview","2021-03-01","2020-10-01-preview","2020-07-01-preview","2019-11-01-preview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1837' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/apis/networking.k8s.io/v1/ + response: + body: + string: '{"kind":"APIResourceList","apiVersion":"v1","groupVersion":"networking.k8s.io/v1","resources":[{"name":"ingressclasses","singularName":"","namespaced":false,"kind":"IngressClass","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"6upRfBq0FOI="},{"name":"ingresses","singularName":"","namespaced":true,"kind":"Ingress","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ing"],"storageVersionHash":"ZOAfGflaKd0="},{"name":"ingresses/status","singularName":"","namespaced":true,"kind":"Ingress","verbs":["get","patch","update"]},{"name":"networkpolicies","singularName":"","namespaced":true,"kind":"NetworkPolicy","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["netpol"],"storageVersionHash":"YpfwF18m1G8="}]} + + ' + headers: + audit-id: + - 3eb34330-733a-45f6-a62f-e6309e532cab + cache-control: + - no-cache, private + content-length: + - '864' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:44 GMT + x-kubernetes-pf-flowschema-uid: + - c79eb98f-d3de-4c68-8267-32fbe5757cb2 + x-kubernetes-pf-prioritylevel-uid: + - cd610d09-5a01-4137-b13a-15cdb9207e44 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/api/v1/nodes + response: + body: + string: '{"kind":"NodeList","apiVersion":"v1","metadata":{"resourceVersion":"869"},"items":[{"metadata":{"name":"aks-nodepool1-37506928-vmss000000","uid":"ea51dec4-fc99-4f20-bcd2-42aa85ab723e","resourceVersion":"845","creationTimestamp":"2021-10-05T16:12:56Z","labels":{"agentpool":"nodepool1","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"Standard_DS2_v2","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"eastus","failure-domain.beta.kubernetes.io/zone":"0","kubernetes.azure.com/agentpool":"nodepool1","kubernetes.azure.com/cluster":"MC_clitest000001_clitest000001-aks_eastus","kubernetes.azure.com/mode":"system","kubernetes.azure.com/node-image-version":"AKSUbuntu-1804gen2containerd-2021.09.28","kubernetes.azure.com/os-sku":"Ubuntu","kubernetes.azure.com/role":"agent","kubernetes.azure.com/storageprofile":"managed","kubernetes.azure.com/storagetier":"Premium_LRS","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"aks-nodepool1-37506928-vmss000000","kubernetes.io/os":"linux","kubernetes.io/role":"agent","node-role.kubernetes.io/agent":"","node.kubernetes.io/instance-type":"Standard_DS2_v2","storageprofile":"managed","storagetier":"Premium_LRS","topology.kubernetes.io/region":"eastus","topology.kubernetes.io/zone":"0"},"annotations":{"node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"},"managedFields":[{"manager":"kubelet","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:12:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:volumes.kubernetes.io/controller-managed-attach-detach":{}},"f:labels":{".":{},"f:agentpool":{},"f:beta.kubernetes.io/arch":{},"f:beta.kubernetes.io/instance-type":{},"f:beta.kubernetes.io/os":{},"f:failure-domain.beta.kubernetes.io/region":{},"f:failure-domain.beta.kubernetes.io/zone":{},"f:kubernetes.azure.com/agentpool":{},"f:kubernetes.azure.com/cluster":{},"f:kubernetes.azure.com/mode":{},"f:kubernetes.azure.com/node-image-version":{},"f:kubernetes.azure.com/os-sku":{},"f:kubernetes.azure.com/role":{},"f:kubernetes.azure.com/storageprofile":{},"f:kubernetes.azure.com/storagetier":{},"f:kubernetes.io/arch":{},"f:kubernetes.io/hostname":{},"f:kubernetes.io/os":{},"f:node.kubernetes.io/instance-type":{},"f:storageprofile":{},"f:storagetier":{},"f:topology.kubernetes.io/region":{},"f:topology.kubernetes.io/zone":{}}},"f:spec":{"f:providerID":{}},"f:status":{"f:addresses":{".":{},"k:{\"type\":\"Hostname\"}":{".":{},"f:address":{},"f:type":{}},"k:{\"type\":\"InternalIP\"}":{".":{},"f:address":{},"f:type":{}}},"f:allocatable":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:capacity":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:conditions":{".":{},"k:{\"type\":\"DiskPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"MemoryPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"PIDPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"Ready\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}},"f:daemonEndpoints":{"f:kubeletEndpoint":{"f:Port":{}}},"f:images":{},"f:nodeInfo":{"f:architecture":{},"f:bootID":{},"f:containerRuntimeVersion":{},"f:kernelVersion":{},"f:kubeProxyVersion":{},"f:kubeletVersion":{},"f:machineID":{},"f:operatingSystem":{},"f:osImage":{},"f:systemUUID":{}}}}},{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:28Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{"f:node.alpha.kubernetes.io/ttl":{}}},"f:spec":{"f:podCIDR":{},"f:podCIDRs":{".":{},"v:\"10.244.0.0/24\"":{}}},"f:status":{"f:conditions":{"k:{\"type\":\"NetworkUnavailable\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}}}}},{"manager":"kubectl-label","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:31Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{"f:kubernetes.io/role":{},"f:node-role.kubernetes.io/agent":{}}}}}]},"spec":{"podCIDR":"10.244.0.0/24","podCIDRs":["10.244.0.0/24"],"providerID":"azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mc_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-37506928-vmss/virtualMachines/0"},"status":{"capacity":{"attachable-volumes-azure-disk":"8","cpu":"2","ephemeral-storage":"129900528Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"7120616Ki","pods":"110"},"allocatable":{"attachable-volumes-azure-disk":"8","cpu":"1900m","ephemeral-storage":"119716326407","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"4675304Ki","pods":"110"},"conditions":[{"type":"NetworkUnavailable","status":"False","lastHeartbeatTime":"2021-10-05T16:13:28Z","lastTransitionTime":"2021-10-05T16:13:28Z","reason":"RouteCreated","message":"RouteController + created a route"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:06Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasSufficientMemory","message":"kubelet + has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:06Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasNoDiskPressure","message":"kubelet + has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:06Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasSufficientPID","message":"kubelet + has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2021-10-05T16:13:06Z","lastTransitionTime":"2021-10-05T16:13:06Z","reason":"KubeletReady","message":"kubelet + is posting ready status. AppArmor enabled"}],"addresses":[{"type":"Hostname","address":"aks-nodepool1-37506928-vmss000000"},{"type":"InternalIP","address":"10.240.0.4"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"a983bb10c5974d45a18b07c503154b77","systemUUID":"f4ada945-84f7-46ca-a709-847576f6e68a","bootID":"38ae69bc-701c-4c55-a70d-2975ecf152a7","kernelVersion":"5.4.0-1059-azure","osImage":"Ubuntu + 18.04.6 LTS","containerRuntimeVersion":"containerd://1.4.9+azure","kubeletVersion":"v1.20.9","kubeProxyVersion":"v1.20.9","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021-1","mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021-1"],"sizeBytes":307432577},{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021"],"sizeBytes":307288309},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0"],"sizeBytes":166352383},{"names":["mcr.azk8s.cn/oss/cilium/cilium:1.10.3.2","mcr.microsoft.com/oss/cilium/cilium:1.10.3.2"],"sizeBytes":154278769},{"names":["mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210906.1","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210906.1"],"sizeBytes":149500693},{"names":["mcr.microsoft.com/oss/kubernetes/kube-proxy@sha256:358a2d321f8d9c0f13afab10357e321f6076ec69b714e6950497980c3390e7d0","mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1"],"sizeBytes":103571592},{"names":["mcr.azk8s.cn/oss/calico/node:v3.8.9.5","mcr.microsoft.com/oss/calico/node:v3.8.9.5"],"sizeBytes":101794833},{"names":["mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830"],"sizeBytes":101469718},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0"],"sizeBytes":101445696},{"names":["mcr.azk8s.cn/oss/cilium/operator:1.10.3","mcr.microsoft.com/oss/cilium/operator:1.10.3"],"sizeBytes":98395697},{"names":["mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210819.1","mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210819.1"],"sizeBytes":96335208},{"names":["mcr.azk8s.cn/aks/hcp/tunnel-openvpn:master.210623.2","mcr.microsoft.com/aks/hcp/tunnel-openvpn:master.210623.2"],"sizeBytes":96125176},{"names":["mcr.azk8s.cn/oss/kubernetes/exechealthz:1.2_v0.0.5","mcr.microsoft.com/oss/kubernetes/exechealthz:1.2_v0.0.5"],"sizeBytes":94348102},{"names":["mcr.microsoft.com/aks/acc/sgx-attestation:2.0","mcr.azk8s.cn/aks/acc/sgx-attestation:2.0"],"sizeBytes":91841669},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.5.0"],"sizeBytes":91583660},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.6.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.6.0"],"sizeBytes":85745730},{"names":["mcr.azk8s.cn/azure-application-gateway/kubernetes-ingress:1.4.0","mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.4.0"],"sizeBytes":79586703},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.7.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.7.0"],"sizeBytes":79348890},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.5.0"],"sizeBytes":79187191},{"names":["mcr.azk8s.cn/containernetworking/azure-npm:v1.4.9","mcr.microsoft.com/containernetworking/azure-npm:v1.4.9"],"sizeBytes":75291405},{"names":["mcr.microsoft.com/oss/nvidia/k8s-device-plugin:v0.9.0","mcr.azk8s.cn/oss/nvidia/k8s-device-plugin:v0.9.0"],"sizeBytes":67291599},{"names":["mcr.azk8s.cn/oss/kubernetes/dashboard:v2.0.1","mcr.microsoft.com/oss/kubernetes/dashboard:v2.0.1"],"sizeBytes":66415836},{"names":["mcr.azk8s.cn/oss/calico/cni:v3.8.9.3","mcr.microsoft.com/oss/calico/cni:v3.8.9.3"],"sizeBytes":63581323},{"names":["mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8"],"sizeBytes":63154716},{"names":["mcr.azk8s.cn/oss/calico/node:v3.20.0","mcr.microsoft.com/oss/calico/node:v3.20.0"],"sizeBytes":60721107},{"names":["mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.4","mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.4"],"sizeBytes":56813818},{"names":["mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8post2","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8post2"],"sizeBytes":56368756},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4","mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4"],"sizeBytes":56238120},{"names":["mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.3","mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.3"],"sizeBytes":54770003},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3","mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3"],"sizeBytes":54191441},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.4.0","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.4.0"],"sizeBytes":52307386},{"names":["mcr.azk8s.cn/oss/kubernetes/azure-cloud-node-manager:v1.1.1","mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.1.1"],"sizeBytes":51559743},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.3.6","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.3.6"],"sizeBytes":50822202},{"names":["mcr.azk8s.cn/oss/kubernetes/kubernetes-dashboard:v1.10.1","mcr.microsoft.com/oss/kubernetes/kubernetes-dashboard:v1.10.1"],"sizeBytes":44907744},{"names":["mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.4","mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.4"],"sizeBytes":44096187},{"names":["mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.3","mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.3"],"sizeBytes":42049482},{"names":["mcr.azk8s.cn/aks/acc/sgx-device-plugin:1.0","mcr.microsoft.com/aks/acc/sgx-device-plugin:1.0"],"sizeBytes":42023095},{"names":["mcr.microsoft.com/containernetworking/azure-vnet-telemetry:v1.0.30","mcr.azk8s.cn/containernetworking/azure-vnet-telemetry:v1.0.30"],"sizeBytes":30784307},{"names":["mcr.azk8s.cn/aks/command/runtime:master.210524.9","mcr.microsoft.com/aks/command/runtime:master.210524.9"],"sizeBytes":30674883},{"names":["mcr.microsoft.com/aks/acc/sgx-webhook:0.9","mcr.azk8s.cn/aks/acc/sgx-webhook:0.9"],"sizeBytes":28358981},{"names":["mcr.azk8s.cn/oss/calico/kube-controllers:v3.20.0","mcr.microsoft.com/oss/calico/kube-controllers:v3.20.0"],"sizeBytes":26117895},{"names":["mcr.azk8s.cn/aks/acc/sgx-webhook:0.6","mcr.microsoft.com/aks/acc/sgx-webhook:0.6"],"sizeBytes":25551671},{"names":["mcr.azk8s.cn/aks/acc/sgx-plugin:0.4","mcr.microsoft.com/aks/acc/sgx-plugin:0.4"],"sizeBytes":25245219},{"names":["mcr.azk8s.cn/oss/kubernetes/metrics-server:v0.4.4","mcr.microsoft.com/oss/kubernetes/metrics-server:v0.4.4"],"sizeBytes":25194689},{"names":["mcr.microsoft.com/oss/kubernetes/ip-masq-agent:v2.5.0.6","mcr.azk8s.cn/oss/kubernetes/ip-masq-agent:v2.5.0.6"],"sizeBytes":25051613},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.4.1","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.4.1"],"sizeBytes":24660260},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.5.2","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.5.2"],"sizeBytes":24288842},{"names":["mcr.azk8s.cn/oss/calico/typha:v3.20.0","mcr.microsoft.com/oss/calico/typha:v3.20.0"],"sizeBytes":24150540},{"names":["mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1","mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1"],"sizeBytes":23818569},{"names":["mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1","mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1"],"sizeBytes":23813937}]}},{"metadata":{"name":"aks-nodepool1-37506928-vmss000001","uid":"c60ff895-47f4-43ba-ab44-1ca4c02e8029","resourceVersion":"846","creationTimestamp":"2021-10-05T16:13:04Z","labels":{"agentpool":"nodepool1","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"Standard_DS2_v2","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"eastus","failure-domain.beta.kubernetes.io/zone":"0","kubernetes.azure.com/agentpool":"nodepool1","kubernetes.azure.com/cluster":"MC_clitest000001_clitest000001-aks_eastus","kubernetes.azure.com/mode":"system","kubernetes.azure.com/node-image-version":"AKSUbuntu-1804gen2containerd-2021.09.28","kubernetes.azure.com/os-sku":"Ubuntu","kubernetes.azure.com/role":"agent","kubernetes.azure.com/storageprofile":"managed","kubernetes.azure.com/storagetier":"Premium_LRS","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"aks-nodepool1-37506928-vmss000001","kubernetes.io/os":"linux","kubernetes.io/role":"agent","node-role.kubernetes.io/agent":"","node.kubernetes.io/instance-type":"Standard_DS2_v2","storageprofile":"managed","storagetier":"Premium_LRS","topology.kubernetes.io/region":"eastus","topology.kubernetes.io/zone":"0"},"annotations":{"node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"},"managedFields":[{"manager":"kubelet","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:volumes.kubernetes.io/controller-managed-attach-detach":{}},"f:labels":{".":{},"f:agentpool":{},"f:beta.kubernetes.io/arch":{},"f:beta.kubernetes.io/instance-type":{},"f:beta.kubernetes.io/os":{},"f:failure-domain.beta.kubernetes.io/region":{},"f:failure-domain.beta.kubernetes.io/zone":{},"f:kubernetes.azure.com/agentpool":{},"f:kubernetes.azure.com/cluster":{},"f:kubernetes.azure.com/mode":{},"f:kubernetes.azure.com/node-image-version":{},"f:kubernetes.azure.com/os-sku":{},"f:kubernetes.azure.com/role":{},"f:kubernetes.azure.com/storageprofile":{},"f:kubernetes.azure.com/storagetier":{},"f:kubernetes.io/arch":{},"f:kubernetes.io/hostname":{},"f:kubernetes.io/os":{},"f:node.kubernetes.io/instance-type":{},"f:storageprofile":{},"f:storagetier":{},"f:topology.kubernetes.io/region":{},"f:topology.kubernetes.io/zone":{}}},"f:spec":{"f:providerID":{}},"f:status":{"f:addresses":{".":{},"k:{\"type\":\"Hostname\"}":{".":{},"f:address":{},"f:type":{}},"k:{\"type\":\"InternalIP\"}":{".":{},"f:address":{},"f:type":{}}},"f:allocatable":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:capacity":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:conditions":{".":{},"k:{\"type\":\"DiskPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"MemoryPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"PIDPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"Ready\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}},"f:daemonEndpoints":{"f:kubeletEndpoint":{"f:Port":{}}},"f:images":{},"f:nodeInfo":{"f:architecture":{},"f:bootID":{},"f:containerRuntimeVersion":{},"f:kernelVersion":{},"f:kubeProxyVersion":{},"f:kubeletVersion":{},"f:machineID":{},"f:operatingSystem":{},"f:osImage":{},"f:systemUUID":{}}}}},{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:06Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{"f:node.alpha.kubernetes.io/ttl":{}}},"f:spec":{"f:podCIDR":{},"f:podCIDRs":{".":{},"v:\"10.244.2.0/24\"":{}}}}},{"manager":"kubectl-label","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:31Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{"f:kubernetes.io/role":{},"f:node-role.kubernetes.io/agent":{}}}}}]},"spec":{"podCIDR":"10.244.2.0/24","podCIDRs":["10.244.2.0/24"],"providerID":"azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mc_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-37506928-vmss/virtualMachines/1"},"status":{"capacity":{"attachable-volumes-azure-disk":"8","cpu":"2","ephemeral-storage":"129900528Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"7120616Ki","pods":"110"},"allocatable":{"attachable-volumes-azure-disk":"8","cpu":"1900m","ephemeral-storage":"119716326407","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"4675304Ki","pods":"110"},"conditions":[{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:14Z","lastTransitionTime":"2021-10-05T16:13:04Z","reason":"KubeletHasSufficientMemory","message":"kubelet + has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:14Z","lastTransitionTime":"2021-10-05T16:13:04Z","reason":"KubeletHasNoDiskPressure","message":"kubelet + has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:14Z","lastTransitionTime":"2021-10-05T16:13:04Z","reason":"KubeletHasSufficientPID","message":"kubelet + has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2021-10-05T16:13:14Z","lastTransitionTime":"2021-10-05T16:13:14Z","reason":"KubeletReady","message":"kubelet + is posting ready status. AppArmor enabled"}],"addresses":[{"type":"Hostname","address":"aks-nodepool1-37506928-vmss000001"},{"type":"InternalIP","address":"10.240.0.5"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"27dfea7e50da4476b31579e330618cfe","systemUUID":"1722c3df-aed5-4d16-8258-15f1bb44bd23","bootID":"e1f4d7e5-17d3-4819-a5af-09f750ec98d4","kernelVersion":"5.4.0-1059-azure","osImage":"Ubuntu + 18.04.6 LTS","containerRuntimeVersion":"containerd://1.4.9+azure","kubeletVersion":"v1.20.9","kubeProxyVersion":"v1.20.9","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021-1","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021-1"],"sizeBytes":307432577},{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021"],"sizeBytes":307288309},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0"],"sizeBytes":166352383},{"names":["mcr.azk8s.cn/oss/cilium/cilium:1.10.3.2","mcr.microsoft.com/oss/cilium/cilium:1.10.3.2"],"sizeBytes":154278769},{"names":["mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210906.1","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210906.1"],"sizeBytes":149500693},{"names":["mcr.microsoft.com/oss/kubernetes/kube-proxy@sha256:358a2d321f8d9c0f13afab10357e321f6076ec69b714e6950497980c3390e7d0","mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1"],"sizeBytes":103571592},{"names":["mcr.microsoft.com/oss/calico/node:v3.8.9.5","mcr.azk8s.cn/oss/calico/node:v3.8.9.5"],"sizeBytes":101794833},{"names":["mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830"],"sizeBytes":101469718},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0"],"sizeBytes":101445696},{"names":["mcr.azk8s.cn/oss/cilium/operator:1.10.3","mcr.microsoft.com/oss/cilium/operator:1.10.3"],"sizeBytes":98395697},{"names":["mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210819.1","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210819.1"],"sizeBytes":96335208},{"names":["mcr.azk8s.cn/aks/hcp/tunnel-openvpn:master.210623.2","mcr.microsoft.com/aks/hcp/tunnel-openvpn:master.210623.2"],"sizeBytes":96125176},{"names":["mcr.microsoft.com/oss/kubernetes/exechealthz:1.2_v0.0.5","mcr.azk8s.cn/oss/kubernetes/exechealthz:1.2_v0.0.5"],"sizeBytes":94348102},{"names":["mcr.microsoft.com/aks/acc/sgx-attestation:2.0","mcr.azk8s.cn/aks/acc/sgx-attestation:2.0"],"sizeBytes":91841669},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.5.0"],"sizeBytes":91583660},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.6.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.6.0"],"sizeBytes":85745730},{"names":["mcr.azk8s.cn/azure-application-gateway/kubernetes-ingress:1.4.0","mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.4.0"],"sizeBytes":79586703},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.7.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.7.0"],"sizeBytes":79348890},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.5.0"],"sizeBytes":79187191},{"names":["mcr.azk8s.cn/containernetworking/azure-npm:v1.4.9","mcr.microsoft.com/containernetworking/azure-npm:v1.4.9"],"sizeBytes":75291405},{"names":["mcr.azk8s.cn/oss/nvidia/k8s-device-plugin:v0.9.0","mcr.microsoft.com/oss/nvidia/k8s-device-plugin:v0.9.0"],"sizeBytes":67291599},{"names":["mcr.azk8s.cn/oss/kubernetes/dashboard:v2.0.1","mcr.microsoft.com/oss/kubernetes/dashboard:v2.0.1"],"sizeBytes":66415836},{"names":["mcr.azk8s.cn/oss/calico/cni:v3.8.9.3","mcr.microsoft.com/oss/calico/cni:v3.8.9.3"],"sizeBytes":63581323},{"names":["mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8"],"sizeBytes":63154716},{"names":["mcr.microsoft.com/oss/calico/node:v3.20.0","mcr.azk8s.cn/oss/calico/node:v3.20.0"],"sizeBytes":60721107},{"names":["mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.4","mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.4"],"sizeBytes":56813818},{"names":["mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8post2","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8post2"],"sizeBytes":56368756},{"names":["mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4","mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4"],"sizeBytes":56238120},{"names":["mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.3","mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.3"],"sizeBytes":54770003},{"names":["mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3","mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3"],"sizeBytes":54191441},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.4.0","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.4.0"],"sizeBytes":52307386},{"names":["mcr.azk8s.cn/oss/kubernetes/azure-cloud-node-manager:v1.1.1","mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.1.1"],"sizeBytes":51559743},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.3.6","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.3.6"],"sizeBytes":50822202},{"names":["mcr.azk8s.cn/oss/kubernetes/kubernetes-dashboard:v1.10.1","mcr.microsoft.com/oss/kubernetes/kubernetes-dashboard:v1.10.1"],"sizeBytes":44907744},{"names":["mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.4","mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.4"],"sizeBytes":44096187},{"names":["mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.3","mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.3"],"sizeBytes":42049482},{"names":["mcr.azk8s.cn/aks/acc/sgx-device-plugin:1.0","mcr.microsoft.com/aks/acc/sgx-device-plugin:1.0"],"sizeBytes":42023095},{"names":["mcr.microsoft.com/containernetworking/azure-vnet-telemetry:v1.0.30","mcr.azk8s.cn/containernetworking/azure-vnet-telemetry:v1.0.30"],"sizeBytes":30784307},{"names":["mcr.azk8s.cn/aks/command/runtime:master.210524.9","mcr.microsoft.com/aks/command/runtime:master.210524.9"],"sizeBytes":30674883},{"names":["mcr.azk8s.cn/aks/acc/sgx-webhook:0.9","mcr.microsoft.com/aks/acc/sgx-webhook:0.9"],"sizeBytes":28358981},{"names":["mcr.azk8s.cn/oss/calico/kube-controllers:v3.20.0","mcr.microsoft.com/oss/calico/kube-controllers:v3.20.0"],"sizeBytes":26117895},{"names":["mcr.azk8s.cn/aks/acc/sgx-webhook:0.6","mcr.microsoft.com/aks/acc/sgx-webhook:0.6"],"sizeBytes":25551671},{"names":["mcr.microsoft.com/aks/acc/sgx-plugin:0.4","mcr.azk8s.cn/aks/acc/sgx-plugin:0.4"],"sizeBytes":25245219},{"names":["mcr.azk8s.cn/oss/kubernetes/metrics-server:v0.4.4","mcr.microsoft.com/oss/kubernetes/metrics-server:v0.4.4"],"sizeBytes":25194689},{"names":["mcr.azk8s.cn/oss/kubernetes/ip-masq-agent:v2.5.0.6","mcr.microsoft.com/oss/kubernetes/ip-masq-agent:v2.5.0.6"],"sizeBytes":25051613},{"names":["mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.4.1","mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.4.1"],"sizeBytes":24660260},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.5.2","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.5.2"],"sizeBytes":24288842},{"names":["mcr.microsoft.com/oss/calico/typha:v3.20.0","mcr.azk8s.cn/oss/calico/typha:v3.20.0"],"sizeBytes":24150540},{"names":["mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1","mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1"],"sizeBytes":23818569},{"names":["mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1","mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1"],"sizeBytes":23813937}]}},{"metadata":{"name":"aks-nodepool1-37506928-vmss000002","uid":"f6d24255-bcba-47d8-a3b9-12b921dcce53","resourceVersion":"847","creationTimestamp":"2021-10-05T16:12:56Z","labels":{"agentpool":"nodepool1","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"Standard_DS2_v2","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"eastus","failure-domain.beta.kubernetes.io/zone":"0","kubernetes.azure.com/agentpool":"nodepool1","kubernetes.azure.com/cluster":"MC_clitest000001_clitest000001-aks_eastus","kubernetes.azure.com/mode":"system","kubernetes.azure.com/node-image-version":"AKSUbuntu-1804gen2containerd-2021.09.28","kubernetes.azure.com/os-sku":"Ubuntu","kubernetes.azure.com/role":"agent","kubernetes.azure.com/storageprofile":"managed","kubernetes.azure.com/storagetier":"Premium_LRS","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"aks-nodepool1-37506928-vmss000002","kubernetes.io/os":"linux","kubernetes.io/role":"agent","node-role.kubernetes.io/agent":"","node.kubernetes.io/instance-type":"Standard_DS2_v2","storageprofile":"managed","storagetier":"Premium_LRS","topology.kubernetes.io/region":"eastus","topology.kubernetes.io/zone":"0"},"annotations":{"node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"},"managedFields":[{"manager":"kubelet","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:12:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:volumes.kubernetes.io/controller-managed-attach-detach":{}},"f:labels":{".":{},"f:agentpool":{},"f:beta.kubernetes.io/arch":{},"f:beta.kubernetes.io/instance-type":{},"f:beta.kubernetes.io/os":{},"f:failure-domain.beta.kubernetes.io/region":{},"f:failure-domain.beta.kubernetes.io/zone":{},"f:kubernetes.azure.com/agentpool":{},"f:kubernetes.azure.com/cluster":{},"f:kubernetes.azure.com/mode":{},"f:kubernetes.azure.com/node-image-version":{},"f:kubernetes.azure.com/os-sku":{},"f:kubernetes.azure.com/role":{},"f:kubernetes.azure.com/storageprofile":{},"f:kubernetes.azure.com/storagetier":{},"f:kubernetes.io/arch":{},"f:kubernetes.io/hostname":{},"f:kubernetes.io/os":{},"f:node.kubernetes.io/instance-type":{},"f:storageprofile":{},"f:storagetier":{},"f:topology.kubernetes.io/region":{},"f:topology.kubernetes.io/zone":{}}},"f:spec":{"f:providerID":{}},"f:status":{"f:addresses":{".":{},"k:{\"type\":\"Hostname\"}":{".":{},"f:address":{},"f:type":{}},"k:{\"type\":\"InternalIP\"}":{".":{},"f:address":{},"f:type":{}}},"f:allocatable":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:capacity":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:conditions":{".":{},"k:{\"type\":\"DiskPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"MemoryPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"PIDPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"Ready\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}},"f:daemonEndpoints":{"f:kubeletEndpoint":{"f:Port":{}}},"f:images":{},"f:nodeInfo":{"f:architecture":{},"f:bootID":{},"f:containerRuntimeVersion":{},"f:kernelVersion":{},"f:kubeProxyVersion":{},"f:kubeletVersion":{},"f:machineID":{},"f:operatingSystem":{},"f:osImage":{},"f:systemUUID":{}}}}},{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:28Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{"f:node.alpha.kubernetes.io/ttl":{}}},"f:spec":{"f:podCIDR":{},"f:podCIDRs":{".":{},"v:\"10.244.1.0/24\"":{}}},"f:status":{"f:conditions":{"k:{\"type\":\"NetworkUnavailable\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}}}}},{"manager":"kubectl-label","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:31Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{"f:kubernetes.io/role":{},"f:node-role.kubernetes.io/agent":{}}}}}]},"spec":{"podCIDR":"10.244.1.0/24","podCIDRs":["10.244.1.0/24"],"providerID":"azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mc_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-37506928-vmss/virtualMachines/2"},"status":{"capacity":{"attachable-volumes-azure-disk":"8","cpu":"2","ephemeral-storage":"129900528Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"7120612Ki","pods":"110"},"allocatable":{"attachable-volumes-azure-disk":"8","cpu":"1900m","ephemeral-storage":"119716326407","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"4675300Ki","pods":"110"},"conditions":[{"type":"NetworkUnavailable","status":"False","lastHeartbeatTime":"2021-10-05T16:13:28Z","lastTransitionTime":"2021-10-05T16:13:28Z","reason":"RouteCreated","message":"RouteController + created a route"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:12:56Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasSufficientMemory","message":"kubelet + has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:12:56Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasNoDiskPressure","message":"kubelet + has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:12:56Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasSufficientPID","message":"kubelet + has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2021-10-05T16:12:56Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletReady","message":"kubelet + is posting ready status. AppArmor enabled"}],"addresses":[{"type":"Hostname","address":"aks-nodepool1-37506928-vmss000002"},{"type":"InternalIP","address":"10.240.0.6"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"1e3db06a9eea438680af5d3ef36bf9e6","systemUUID":"c6092e82-3573-4897-b6ad-6b6da796ecb1","bootID":"03e25d30-a457-458a-ad3c-debee5154539","kernelVersion":"5.4.0-1059-azure","osImage":"Ubuntu + 18.04.6 LTS","containerRuntimeVersion":"containerd://1.4.9+azure","kubeletVersion":"v1.20.9","kubeProxyVersion":"v1.20.9","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021-1","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021-1"],"sizeBytes":307432577},{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021"],"sizeBytes":307288309},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0"],"sizeBytes":166352383},{"names":["mcr.azk8s.cn/oss/cilium/cilium:1.10.3.2","mcr.microsoft.com/oss/cilium/cilium:1.10.3.2"],"sizeBytes":154278769},{"names":["mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210906.1","mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210906.1"],"sizeBytes":149500693},{"names":["mcr.microsoft.com/oss/kubernetes/kube-proxy@sha256:358a2d321f8d9c0f13afab10357e321f6076ec69b714e6950497980c3390e7d0","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1","mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1"],"sizeBytes":103571592},{"names":["mcr.azk8s.cn/oss/calico/node:v3.8.9.5","mcr.microsoft.com/oss/calico/node:v3.8.9.5"],"sizeBytes":101794833},{"names":["mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830"],"sizeBytes":101469718},{"names":["mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0","mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0"],"sizeBytes":101445696},{"names":["mcr.microsoft.com/oss/cilium/operator:1.10.3","mcr.azk8s.cn/oss/cilium/operator:1.10.3"],"sizeBytes":98395697},{"names":["mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210819.1","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210819.1"],"sizeBytes":96335208},{"names":["mcr.azk8s.cn/aks/hcp/tunnel-openvpn:master.210623.2","mcr.microsoft.com/aks/hcp/tunnel-openvpn:master.210623.2"],"sizeBytes":96125176},{"names":["mcr.azk8s.cn/oss/kubernetes/exechealthz:1.2_v0.0.5","mcr.microsoft.com/oss/kubernetes/exechealthz:1.2_v0.0.5"],"sizeBytes":94348102},{"names":["mcr.azk8s.cn/aks/acc/sgx-attestation:2.0","mcr.microsoft.com/aks/acc/sgx-attestation:2.0"],"sizeBytes":91841669},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.5.0"],"sizeBytes":91583660},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.6.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.6.0"],"sizeBytes":85745730},{"names":["mcr.azk8s.cn/azure-application-gateway/kubernetes-ingress:1.4.0","mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.4.0"],"sizeBytes":79586703},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.7.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.7.0"],"sizeBytes":79348890},{"names":["mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.5.0","mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.5.0"],"sizeBytes":79187191},{"names":["mcr.azk8s.cn/containernetworking/azure-npm:v1.4.9","mcr.microsoft.com/containernetworking/azure-npm:v1.4.9"],"sizeBytes":75291405},{"names":["mcr.microsoft.com/oss/nvidia/k8s-device-plugin:v0.9.0","mcr.azk8s.cn/oss/nvidia/k8s-device-plugin:v0.9.0"],"sizeBytes":67291599},{"names":["mcr.microsoft.com/oss/kubernetes/dashboard:v2.0.1","mcr.azk8s.cn/oss/kubernetes/dashboard:v2.0.1"],"sizeBytes":66415836},{"names":["mcr.azk8s.cn/oss/calico/cni:v3.8.9.3","mcr.microsoft.com/oss/calico/cni:v3.8.9.3"],"sizeBytes":63581323},{"names":["mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8"],"sizeBytes":63154716},{"names":["mcr.azk8s.cn/oss/calico/node:v3.20.0","mcr.microsoft.com/oss/calico/node:v3.20.0"],"sizeBytes":60721107},{"names":["mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.4","mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.4"],"sizeBytes":56813818},{"names":["mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8post2","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8post2"],"sizeBytes":56368756},{"names":["mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4","mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4"],"sizeBytes":56238120},{"names":["mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.3","mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.3"],"sizeBytes":54770003},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3","mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3"],"sizeBytes":54191441},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.4.0","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.4.0"],"sizeBytes":52307386},{"names":["mcr.azk8s.cn/oss/kubernetes/azure-cloud-node-manager:v1.1.1","mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.1.1"],"sizeBytes":51559743},{"names":["mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.3.6","mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.3.6"],"sizeBytes":50822202},{"names":["mcr.azk8s.cn/oss/kubernetes/kubernetes-dashboard:v1.10.1","mcr.microsoft.com/oss/kubernetes/kubernetes-dashboard:v1.10.1"],"sizeBytes":44907744},{"names":["mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.4","mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.4"],"sizeBytes":44096187},{"names":["mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.3","mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.3"],"sizeBytes":42049482},{"names":["mcr.azk8s.cn/aks/acc/sgx-device-plugin:1.0","mcr.microsoft.com/aks/acc/sgx-device-plugin:1.0"],"sizeBytes":42023095},{"names":["mcr.azk8s.cn/containernetworking/azure-vnet-telemetry:v1.0.30","mcr.microsoft.com/containernetworking/azure-vnet-telemetry:v1.0.30"],"sizeBytes":30784307},{"names":["mcr.azk8s.cn/aks/command/runtime:master.210524.9","mcr.microsoft.com/aks/command/runtime:master.210524.9"],"sizeBytes":30674883},{"names":["mcr.microsoft.com/aks/acc/sgx-webhook:0.9","mcr.azk8s.cn/aks/acc/sgx-webhook:0.9"],"sizeBytes":28358981},{"names":["mcr.microsoft.com/oss/calico/kube-controllers:v3.20.0","mcr.azk8s.cn/oss/calico/kube-controllers:v3.20.0"],"sizeBytes":26117895},{"names":["mcr.azk8s.cn/aks/acc/sgx-webhook:0.6","mcr.microsoft.com/aks/acc/sgx-webhook:0.6"],"sizeBytes":25551671},{"names":["mcr.azk8s.cn/aks/acc/sgx-plugin:0.4","mcr.microsoft.com/aks/acc/sgx-plugin:0.4"],"sizeBytes":25245219},{"names":["mcr.microsoft.com/oss/kubernetes/metrics-server:v0.4.4","mcr.azk8s.cn/oss/kubernetes/metrics-server:v0.4.4"],"sizeBytes":25194689},{"names":["mcr.azk8s.cn/oss/kubernetes/ip-masq-agent:v2.5.0.6","mcr.microsoft.com/oss/kubernetes/ip-masq-agent:v2.5.0.6"],"sizeBytes":25051613},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.4.1","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.4.1"],"sizeBytes":24660260},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.5.2","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.5.2"],"sizeBytes":24288842},{"names":["mcr.azk8s.cn/oss/calico/typha:v3.20.0","mcr.microsoft.com/oss/calico/typha:v3.20.0"],"sizeBytes":24150540},{"names":["mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1","mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1"],"sizeBytes":23818569},{"names":["mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1","mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1"],"sizeBytes":23813937}]}}]} + + ' + headers: + audit-id: + - 7235fde2-3be4-4a7a-b56c-42a39ae71c7f + cache-control: + - no-cache, private + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:44 GMT + transfer-encoding: + - chunked + x-kubernetes-pf-flowschema-uid: + - c79eb98f-d3de-4c68-8267-32fbe5757cb2 + x-kubernetes-pf-prioritylevel-uid: + - cd610d09-5a01-4137-b13a-15cdb9207e44 + status: + code: 200 + message: OK +- request: + body: '{"spec": {"resourceAttributes": {"verb": "create", "resource": "clusterrolebindings", + "group": "rbac.authorization.k8s.io"}}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: POST + uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/apis/authorization.k8s.io/v1/selfsubjectaccessreviews + response: + body: + string: '{"kind":"SelfSubjectAccessReview","apiVersion":"authorization.k8s.io/v1","metadata":{"creationTimestamp":null,"managedFields":[{"manager":"OpenAPI-Generator","operation":"Update","apiVersion":"authorization.k8s.io/v1","time":"2021-10-05T16:13:45Z","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{"f:resourceAttributes":{".":{},"f:group":{},"f:resource":{},"f:verb":{}}}}}]},"spec":{"resourceAttributes":{"verb":"create","group":"rbac.authorization.k8s.io","resource":"clusterrolebindings"}},"status":{"allowed":true}} + + ' + headers: + audit-id: + - 3f7f7009-5f93-4192-aa53-3efc8be78183 + cache-control: + - no-cache, private + content-length: + - '516' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:45 GMT + x-kubernetes-pf-flowschema-uid: + - c79eb98f-d3de-4c68-8267-32fbe5757cb2 + x-kubernetes-pf-prioritylevel-uid: + - cd610d09-5a01-4137-b13a-15cdb9207e44 + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/version/ + response: + body: + string: "{\n \"major\": \"1\",\n \"minor\": \"20\",\n \"gitVersion\": \"v1.20.9\",\n + \ \"gitCommit\": \"8dc42052754bfacb111a0426830122dd9cc9cfa0\",\n \"gitTreeState\": + \"clean\",\n \"buildDate\": \"2021-08-31T00:01:04Z\",\n \"goVersion\": \"go1.15.14\",\n + \ \"compiler\": \"gc\",\n \"platform\": \"linux/amd64\"\n}" + headers: + audit-id: + - bee3b225-0c90-42c5-b049-0f216467a7f3 + cache-control: + - no-cache, private + content-length: + - '264' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:45 GMT + x-kubernetes-pf-flowschema-uid: + - c79eb98f-d3de-4c68-8267-32fbe5757cb2 + x-kubernetes-pf-prioritylevel-uid: + - cd610d09-5a01-4137-b13a-15cdb9207e44 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"8edd93e1-2103-40b4-bd70-6e34e586362d","roleDefinitionId":"eb67887a-31e8-4e4e-bf5b-14ff79351a6f"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe","France Central","Central + US","West US","North Central US","Korea Central","Japan East","East Asia","East + US 2 EUAP"],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"SystemAssignedResourceIdentity, + SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe","France + Central","Central US","West US","North Central US","Korea Central","Japan + East","East Asia","West US 3"],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"Operations","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '2132' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Kubernetes/connectedClusters/clitest000002-cluster'' + under resource group ''clitest000002'' was not found. For more details please + go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '267' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/api/v1/namespaces + response: + body: + string: '{"kind":"NamespaceList","apiVersion":"v1","metadata":{"resourceVersion":"874"},"items":[{"metadata":{"name":"default","uid":"64cabb12-253f-427c-bd5a-e0350e9a99f5","resourceVersion":"199","creationTimestamp":"2021-10-05T16:11:32Z","managedFields":[{"manager":"kube-apiserver","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:11:32Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-node-lease","uid":"c1aba8f3-d98f-47de-b663-b23a330cb3da","resourceVersion":"60","creationTimestamp":"2021-10-05T16:11:30Z","managedFields":[{"manager":"kube-apiserver","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:11:30Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-public","uid":"3a561b22-f366-4455-a810-7a6717a00bf3","resourceVersion":"46","creationTimestamp":"2021-10-05T16:11:30Z","managedFields":[{"manager":"kube-apiserver","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:11:30Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-system","uid":"0eb31a17-84b7-4d76-abba-10cb0e6a9e6f","resourceVersion":"412","creationTimestamp":"2021-10-05T16:11:30Z","labels":{"addonmanager.kubernetes.io/mode":"Reconcile","control-plane":"true","kubernetes.io/cluster-service":"true"},"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"labels\":{\"addonmanager.kubernetes.io/mode\":\"Reconcile\",\"control-plane\":\"true\",\"kubernetes.io/cluster-service\":\"true\"},\"name\":\"kube-system\"}}\n"},"managedFields":[{"manager":"kube-apiserver","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:11:30Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}},{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:12:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}},"f:labels":{".":{},"f:addonmanager.kubernetes.io/mode":{},"f:control-plane":{},"f:kubernetes.io/cluster-service":{}}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}}]} + + ' + headers: + audit-id: + - 96079205-d843-48b3-8725-e29482bfdd24 + cache-control: + - no-cache, private + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:13:47 GMT + transfer-encoding: + - chunked + x-kubernetes-pf-flowschema-uid: + - c79eb98f-d3de-4c68-8267-32fbe5757cb2 + x-kubernetes-pf-prioritylevel-uid: + - cd610d09-5a01-4137-b13a-15cdb9207e44 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002","name":"clitest000002","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2021-10-05T16:10:00Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '326' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name + User-Agent: + - python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) AZURECLI/2.28.1 + method: POST + uri: https://eastus.dp.kubernetesconfiguration.azure.com/azure-arc-k8sagents/GetLatestHelmPackagePath?api-version=2019-11-01-preview&releaseTrain=stable + response: + body: + string: '{"repositoryPath":"mcr.microsoft.com/azurearck8s/batch1/stable/azure-arc-k8sagents:1.4.0"}' + headers: + api-supported-versions: + - 2019-11-01-Preview + connection: + - close + content-length: + - '90' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:49 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"tags": {}, "location": "eastus", "identity": {"type": "SystemAssigned"}, + "properties": {"agentPublicKeyCertificate": "MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==", + "distribution": "aks", "infrastructure": "azure"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + Content-Length: + - '877' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"systemData":{"createdBy":"silasstrawn@microsoft.com","createdByType":"User","createdAt":"2021-10-05T16:13:53.1368376Z","lastModifiedBy":"silasstrawn@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-10-05T16:13:53.1368376Z"},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Accepted","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","distribution":"aks","infrastructure":"azure"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/ede7bc69-8665-4542-acb9-9a6f231bf1be*64B3B4F4AD76A8667FE2B7B5EFF71071CFBEAEAA151C6A4DB011DA69CDDC4510?api-version=2021-03-01 + cache-control: + - no-cache + content-length: + - '1545' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:54 GMT + etag: + - '"7303ddf5-0000-0100-0000-615c79c20000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ExtendedLocation?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ExtendedLocation","namespace":"Microsoft.ExtendedLocation","authorizations":[{"applicationId":"bc313c14-388c-4e7d-a58e-70017303ee3b","roleDefinitionId":"a775b938-2819-4dd0-8067-01f6e3b06392"},{"applicationId":"319f651f-7ddb-4fc6-9857-7aef9250bd05","roleDefinitionId":"0981f4e0-04a7-4e31-bd2b-b2ac2fc6ba4e"}],"resourceTypes":[{"resourceType":"locations","locations":[],"apiVersions":["2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"},{"resourceType":"customLocations","locations":["East + US","West Europe","North Europe","France Central","Southeast Asia","Australia + East","East US 2","West US 2","UK South","Central US","West Central US","West + US","North Central US","South Central US","Korea Central","Japan East","East + Asia","East US 2 EUAP"],"apiVersions":["2021-08-15","2021-03-15-preview","2020-07-15-privatepreview"],"defaultApiVersion":"2021-08-15","capabilities":"SystemAssignedResourceIdentity, + SupportsTags, SupportsLocation"},{"resourceType":"customLocations/enabledResourceTypes","locations":["East + US","West Europe","North Europe","France Central","Southeast Asia","Australia + East","East US 2","West US 2","UK South","Central US","West Central US","West + US","North Central US","South Central US","Korea Central","Japan East","East + Asia","East US 2 EUAP"],"apiVersions":["2021-08-15","2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"},{"resourceType":"locations/operationsstatus","locations":["East + US","West Europe","North Europe","France Central","Southeast Asia","Australia + East","East US 2","West US 2","UK South","Central US","West Central US","West + US","North Central US","South Central US","Korea Central","Japan East","East + Asia","East US 2 Euap"],"apiVersions":["2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"},{"resourceType":"locations/operationresults","locations":["East + US","West Europe","North Europe","France Central","Southeast Asia","Australia + East","East US 2","West US 2","UK South","Central US","West Central US","West + US","North Central US","South Central US","Korea Central","Japan East","East + Asia","East US 2 Euap"],"apiVersions":["2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2021-08-15","2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '2510' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:13:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) msrest/0.6.21 msrest_azure/0.6.3 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=displayName%20eq%20%27Custom%20Locations%20RP%27&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"51dfe1e8-70c6-4de5-a08e-e18aff23d815","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":[],"appDisplayName":"Custom + Locations RP","appId":"bc313c14-388c-4e7d-a58e-70017303ee3b","applicationTemplateId":null,"appOwnerTenantId":"f8cdef31-a31e-4b4a-93e4-5f571e91255a","appRoleAssignmentRequired":false,"appRoles":[],"displayName":"Custom + Locations RP","errorUrl":null,"homepage":null,"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"keyCredentials":[],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":"Microsoft + Services","replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["bc313c14-388c-4e7d-a58e-70017303ee3b"],"servicePrincipalType":"Application","signInAudience":"AzureADMultipleOrgs","tags":[],"tokenEncryptionKeyId":null}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1246' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Tue, 05 Oct 2021 16:13:55 GMT + duration: + - '1862618' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - 903w76f6J66w6J4DkF51MTjj/hIflp2ZcjrYTlSqFpo= + ocp-aad-session-key: + - 4bIpdn16O-zMJ3ez_k4sCqbSRf0lFgbqSCgPMt-9298N179WykVTp9U0bZ-dSC3cyJRhp4B6khM86Fj9PMXVLYy1gGtMyeqPfnuaCXkPbsRqPw2zcsawb9IXnyeJa_Fh.d2DftDexkm19R_7-rtP2YpUR2PtUzs-Wk8rAQv9JQHM + pragma: + - no-cache + request-id: + - 06e8e66e-b92f-421d-b688-504777a656cc + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '1' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/ede7bc69-8665-4542-acb9-9a6f231bf1be*64B3B4F4AD76A8667FE2B7B5EFF71071CFBEAEAA151C6A4DB011DA69CDDC4510?api-version=2021-03-01 + response: + body: + string: '{"id":"/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/ede7bc69-8665-4542-acb9-9a6f231bf1be*64B3B4F4AD76A8667FE2B7B5EFF71071CFBEAEAA151C6A4DB011DA69CDDC4510","name":"ede7bc69-8665-4542-acb9-9a6f231bf1be*64B3B4F4AD76A8667FE2B7B5EFF71071CFBEAEAA151C6A4DB011DA69CDDC4510","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","status":"Succeeded","startTime":"2021-10-05T16:13:54.0208336Z","endTime":"2021-10-05T16:14:09.1218673Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '600' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:14:24 GMT + etag: + - '"40026a96-0000-0100-0000-615c79d10000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"systemData":{"createdBy":"silasstrawn@microsoft.com","createdByType":"User","createdAt":"2021-10-05T16:13:53.1368376Z","lastModifiedBy":"64b12d6e-6549-484c-8cc6-6281839ba394","lastModifiedByType":"Application","lastModifiedAt":"2021-10-05T16:14:00.5491912Z"},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","distribution":"aks","infrastructure":"azure"}}' + headers: + cache-control: + - no-cache + content-length: + - '1564' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:14:24 GMT + etag: + - '"7303d2f8-0000-0100-0000-615c79d10000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"systemData":{"createdBy":"silasstrawn@microsoft.com","createdByType":"User","createdAt":"2021-10-05T16:13:53.1368376Z","lastModifiedBy":"64b12d6e-6549-484c-8cc6-6281839ba394","lastModifiedByType":"Application","lastModifiedAt":"2021-10-05T16:14:00.5491912Z"},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","distribution":"aks","infrastructure":"azure"}}' + headers: + cache-control: + - no-cache + content-length: + - '1564' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:14:46 GMT + etag: + - '"7303d2f8-0000-0100-0000-615c79d10000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"systemData":{"createdBy":"silasstrawn@microsoft.com","createdByType":"User","createdAt":"2021-10-05T16:13:53.1368376Z","lastModifiedBy":"64b12d6e-6549-484c-8cc6-6281839ba394","lastModifiedByType":"Application","lastModifiedAt":"2021-10-05T16:14:00.5491912Z"},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","distribution":"aks","infrastructure":"azure"}}' + headers: + cache-control: + - no-cache + content-length: + - '1564' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:14:46 GMT + etag: + - '"7303d2f8-0000-0100-0000-615c79d10000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays": + 30, "workspaceCapping": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics workspace create + Connection: + - keep-alive + Content-Length: + - '115' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --workspace-name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.OperationalInsights/workspaces/clitest000002-workspace?api-version=2020-10-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": + \"173c4511-5eaa-40b6-b762-22ffebbbf077\",\r\n \"provisioningState\": \"Creating\",\r\n + \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\": + \"Tue, 05 Oct 2021 16:14:49 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n + \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n + \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n + \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": + \"Tue, 05 Oct 2021 20:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n + \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": + \"Enabled\",\r\n \"createdDate\": \"Tue, 05 Oct 2021 16:14:49 GMT\",\r\n + \ \"modifiedDate\": \"Tue, 05 Oct 2021 16:14:49 GMT\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/microsoft.operationalinsights/workspaces/clitest000002-workspace\",\r\n + \ \"name\": \"clitest000002-workspace\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n + \ \"location\": \"eastus\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1110' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:14:49 GMT + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics workspace create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --workspace-name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.OperationalInsights/workspaces/clitest000002-workspace?api-version=2020-10-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": + \"173c4511-5eaa-40b6-b762-22ffebbbf077\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\": + \"Tue, 05 Oct 2021 16:14:49 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n + \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n + \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n + \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": + \"Tue, 05 Oct 2021 20:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n + \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": + \"Enabled\",\r\n \"createdDate\": \"Tue, 05 Oct 2021 16:14:49 GMT\",\r\n + \ \"modifiedDate\": \"Tue, 05 Oct 2021 16:14:50 GMT\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/microsoft.operationalinsights/workspaces/clitest000002-workspace\",\r\n + \ \"name\": \"clitest000002-workspace\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n + \ \"location\": \"eastus\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1111' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:15:20 GMT + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics workspace show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --workspace-name --query --output + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.OperationalInsights/workspaces/clitest000002-workspace?api-version=2020-10-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": + \"173c4511-5eaa-40b6-b762-22ffebbbf077\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\": + \"Tue, 05 Oct 2021 16:14:49 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n + \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n + \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n + \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": + \"Tue, 05 Oct 2021 20:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n + \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": + \"Enabled\",\r\n \"createdDate\": \"Tue, 05 Oct 2021 16:14:49 GMT\",\r\n + \ \"modifiedDate\": \"Tue, 05 Oct 2021 16:14:50 GMT\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/microsoft.operationalinsights/workspaces/clitest000002-workspace\",\r\n + \ \"name\": \"clitest000002-workspace\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n + \ \"location\": \"eastus\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1111' + content-type: + - application/json + date: + - Tue, 05 Oct 2021 16:15:20 GMT + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics workspace get-shared-keys + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --workspace-name --query --output + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.OperationalInsights/workspaces/clitest000002-workspace/sharedKeys?api-version=2020-08-01 + response: + body: + string: "{\r\n \"primarySharedKey\": \"JbBgImQyAsG7RuDvDrr9ODYyTYWKin7tldhKV2rtDAUPPoIaJ8s/2REtvDLpYhMnlsa422U5UCaS9OO748WITA==\",\r\n + \ \"secondarySharedKey\": \"j2Y5+cSjuPMXXqJOqEUUTCDgtwhAlnlHhKPU2AbSjvFkHeLb6mjLSEkXMzVlVWZYMq0REvpRPO0zy7llKI1kKA==\"\r\n}" + headers: + cache-control: + - no-cache + cachecontrol: + - no-cache + content-length: + - '235' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:15:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ams-apiversion: + - WebAPI1.0 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - k8s-extension create + Connection: + - keep-alive + ParameterSetName: + - --debug --resource-group --name --cluster-type --cluster-name --extension-type + --release-train --auto-upgrade-minor-version --scope --release-namespace --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-protected-settings --configuration-protected-settings + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KubernetesConfiguration?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KubernetesConfiguration","namespace":"Microsoft.KubernetesConfiguration","authorizations":[{"applicationId":"c699bf69-fb1d-4eaf-999b-99e6b2ae4d85","roleDefinitionId":"90155430-a360-410f-af5d-89dc284d85c6"},{"applicationId":"03db181c-e9d3-4868-9097-f0b728327182","roleDefinitionId":"DE2ADB97-42D8-49C8-8FCF-DBB53EF936AC"},{"applicationId":"a0f92522-89de-4c5e-9a75-0044ccf66efd","roleDefinitionId":"b3429810-7d5c-420e-8605-cf280f3099f2"},{"applicationId":"bd9b7cd5-dac1-495f-b013-ac871e98fa5f","roleDefinitionId":"0d44c8f0-08b9-44d4-9f59-e51c83f95200"}],"resourceTypes":[{"resourceType":"sourceControlConfigurations","locations":["East + US","West Europe","West Central US","West US 2","South Central US","East US + 2","North Europe","UK South","Southeast Asia","Australia East","France Central","Central + US","North Central US","West US","Korea Central","East Asia","Japan East"],"apiVersions":["2021-03-01","2020-10-01-preview","2020-07-01-preview","2019-11-01-preview"],"defaultApiVersion":"2021-03-01","capabilities":"SupportsExtension"},{"resourceType":"extensions","locations":["East + US","West Europe","West Central US","West US 2","South Central US","East US + 2","North Europe","UK South","Southeast Asia","Australia East","France Central","Central + US","North Central US","West US","Korea Central","East Asia","Japan East","East + US 2 EUAP"],"apiVersions":["2021-05-01-preview","2020-07-01-preview"],"capabilities":"SystemAssignedResourceIdentity, + SupportsExtension"},{"resourceType":"operations","locations":[],"apiVersions":["2021-09-01","2021-06-01-preview","2021-05-01-preview","2021-03-01","2020-10-01-preview","2020-07-01-preview","2019-11-01-preview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1837' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:15:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - k8s-extension create + Connection: + - keep-alive + ParameterSetName: + - --debug --resource-group --name --cluster-type --cluster-name --extension-type + --release-train --auto-upgrade-minor-version --scope --release-namespace --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-protected-settings --configuration-protected-settings + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connected","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","aadProfile":{"tenantId":"","clientAppId":"","serverAppId":""},"distribution":"aks","infrastructure":"azure","kubernetesVersion":"1.20.9","totalNodeCount":3,"agentVersion":"1.4.0","totalCoreCount":6,"lastConnectivityTime":"2021-10-05T16:14:49.98Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1505' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:15:22 GMT + etag: + - '"6a00d46f-0000-0200-0000-615c7a020000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"extensionType": "microsoft.web.appservice", "autoUpgradeMinorVersion": + true, "releaseTrain": "stable", "scope": {"cluster": {"releaseNamespace": "$namespace"}}, + "configurationSettings": {"Microsoft.CustomLocation.ServiceAccount": "default", + "appsNamespace": "appservice-ns", "clusterName": "kube-env000003", "loadBalancerIp": + "52.224.180.108\n", "keda.enabled": "true", "buildService.storageClassName": + "default", "buildService.storageAccessMode": "ReadWriteOnce", "customConfigMap": + "appservice-ns/kube-environment-config", "envoy.annotations.service.beta.kubernetes.io/azure-load-balancer-resource-group": + "clitest000001", "logProcessor.appLogs.destination": "log-analytics"}, "configurationProtectedSettings": + {"logProcessor.appLogs.logAnalyticsConfig.customerId": "b''MTczYzQ1MTEtNWVhYS00MGI2LWI3NjItMjJmZmViYmJmMDc3Cg==''", + "logProcessor.appLogs.logAnalyticsConfig.sharedKey": "b''SmJCZ0ltUXlBc0c3UnVEdkRycjlPRFl5VFlXS2luN3RsZGhLVjJydERBVVBQb0lhSjhzLzJSRXR2RExwWWhNbmxzYTQyMlU1VUNhUzlPTzc0OFdJVEE9PQo=''"}}, + "identity": {"type": "SystemAssigned"}, "location": "eastus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - k8s-extension create + Connection: + - keep-alive + Content-Length: + - '1108' + Content-Type: + - application/json + ParameterSetName: + - --debug --resource-group --name --cluster-type --cluster-name --extension-type + --release-train --auto-upgrade-minor-version --scope --release-namespace --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-settings --configuration-settings --configuration-settings + --configuration-protected-settings --configuration-protected-settings + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-kubernetesconfiguration/1.0.0b1 Python/3.8.6 + (macOS-10.15.7-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster/providers/Microsoft.KubernetesConfiguration/extensions/appservice-ext?api-version=2020-07-01-preview + response: + body: + string: '{"errors":{"properties.Scope":["Namespace name is invalid. Valid namespace + must be maximum 63 characters, consist of lower case alphanumeric characters + or ''-'' and must start and end with an alphanumeric character."]},"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One + or more validation errors occurred.","status":400,"traceId":"00-669467346371d843a962aa7a8dc8b0e4-9cb187c56d5e3e4d-01"}' + headers: + cache-control: + - no-cache + content-length: + - '408' + content-type: + - application/problem+json; charset=utf-8 + date: + - Tue, 05 Oct 2021 16:15:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py b/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py index 876b8e50d9f..e385fca485c 100644 --- a/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py +++ b/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py @@ -5,14 +5,99 @@ import os import unittest +import base64 from azure_devtools.scenario_tests import AllowLargeResponse -from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, RoleBasedServicePrincipalPreparer) - +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, RoleBasedServicePrincipalPreparer, live_only) TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) - # TODO class AppserviceKubernetesScenarioTest(ScenarioTest): - pass + @live_only() + @AllowLargeResponse() + @ResourceGroupPreparer(random_name_length=24, name_prefix='clitest', location="eastus", parameter_name="aks_rg") + @ResourceGroupPreparer(random_name_length=24, name_prefix='clitest', location="eastus", parameter_name="arc_rg") + def test_basic(self, aks_rg, arc_rg): + print("starting test") + # create aks + aks_name = "{}-aks".format(aks_rg) + + self._create_connected_cluster(aks_name, aks_rg, arc_rg) + + # TODO change this to wait + poll + self.assertEqual(self.cmd("connectedk8s show --resource-group {} --name {}".format(arc_rg, self.cluster_name)).get_output_in_json().get("provisioningState"), "Succeeded") + + self._create_log_analytics(arc_rg) + self._install_appservice_extension(arc_rg, aks_rg) + self._create_custom_location() + self._create_kube_env() + + def _create_connected_cluster(self, aks_name, aks_rg, arc_rg): + aks_create_result = self.cmd('aks create --resource-group {} --name {} --enable-aad --generate-ssh-keys'.format(aks_rg, aks_name)).get_output_in_json() + + self.infra_rg = self.cmd('aks show --resource-group {} --name {} --output tsv --query nodeResourceGroup'.format(aks_rg, aks_name)).output + + self.cmd("network public-ip create --resource-group {} --name MyPublicIP --sku STANDARD".format(self.infra_rg)) + self.static_ip = self.cmd("network public-ip show --resource-group {} --name MyPublicIP --output tsv --query ipAddress".format(self.infra_rg)).output + + + print(self.cmd("aks get-credentials --resource-group {} --name {} --admin".format(aks_rg, aks_name)).output) + # kubectl get ns + + self.cluster_name="{}-cluster".format(arc_rg) # Name of the connected cluster resource + + connectedk8s_result = self.cmd("connectedk8s connect --resource-group {} --name {}".format(arc_rg, self.cluster_name)).get_output_in_json() + + return self.cmd("connectedk8s show --resource-group {} --name {}".format(arc_rg, self.cluster_name)).get_output_in_json() + # TODO may need to poll to wait for this to finish ^ + + def _create_log_analytics(self, arc_rg): + workspace_name="{}-workspace".format(arc_rg) + self.cmd("monitor log-analytics workspace create --resource-group {} --workspace-name {}".format(arc_rg, workspace_name)) + log_analytics_workspace_id = self.cmd("az monitor log-analytics workspace show --resource-group {} --workspace-name {} --query customerId --output tsv".format(arc_rg, workspace_name)).output + self.log_analytics_workspace_id_enc = base64.b64encode(bytes(log_analytics_workspace_id, "ascii")) + log_analytics_key = self.cmd("monitor log-analytics workspace get-shared-keys --resource-group {} --workspace-name {} --query primarySharedKey --output tsv".format(arc_rg, workspace_name)).output + self.log_analytics_key_enc = base64.b64encode(bytes(log_analytics_key, "ascii")) + + + def _install_appservice_extension(self, arc_rg, aks_rg): + extension_name = "appservice-ext" # Name of the App Service extension + namespace = "appservice-ns" # Namespace in your cluster to install the extension and provision resources + kube_environment_name = self.create_random_name("kube-env", 24) # Name of the App Service Kubernetes environment resource + self.cmd("k8s-extension create --debug \ + --resource-group {} \ + --name {} \ + --cluster-type connectedClusters \ + --cluster-name {} \ + --extension-type 'Microsoft.Web.Appservice' \ + --release-train stable \ + --auto-upgrade-minor-version true \ + --scope cluster \ + --release-namespace $namespace \ + --configuration-settings \"Microsoft.CustomLocation.ServiceAccount=default\" \ + --configuration-settings \"appsNamespace={}\" \ + --configuration-settings \"clusterName={}\" \ + --configuration-settings \"loadBalancerIp={}\" \ + --configuration-settings \"keda.enabled=true\" \ + --configuration-settings \"buildService.storageClassName=default\" \ + --configuration-settings \"buildService.storageAccessMode=ReadWriteOnce\" \ + --configuration-settings \"customConfigMap={}/kube-environment-config\" \ + --configuration-settings \"envoy.annotations.service.beta.kubernetes.io/azure-load-balancer-resource-group={}\" \ + --configuration-settings \"logProcessor.appLogs.destination=log-analytics\" \ + --configuration-protected-settings \"logProcessor.appLogs.logAnalyticsConfig.customerId={}\" \ + --configuration-protected-settings \"logProcessor.appLogs.logAnalyticsConfig.sharedKey={}\"".format(arc_rg, extension_name, self.cluster_name, namespace, kube_environment_name, self.static_ip, namespace, aks_rg, self.log_analytics_workspace_id_enc, self.log_analytics_key_enc)) + self.extension_id = self.cmd("k8s-extension show \ + --cluster-type connectedClusters \ + --cluster-name {} \ + --resource-group {} \ + --name {} \ + --query id \ + --output tsv".format(self.cluster_name, arc_rg, extension_name)).output + self.cmd("resource wait --ids {} --custom \"properties.installState!='Pending'\" --api-version \"2020-07-01-preview\"".format(self.extension_id)) + + def _create_custom_location(self): + pass + + def _create_kube_env(self): + pass \ No newline at end of file From d614ed882b7ac2f77a57af2955b96c3fc9ff58e5 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Mon, 25 Oct 2021 00:06:13 -0700 Subject: [PATCH 116/125] update codeowners and fix 'az appservice kube list' bug --- .github/CODEOWNERS | 2 +- src/appservice-kube/azext_appservice_kube/custom.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cf1787f2b08..5a85f0ad086 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -134,7 +134,7 @@ /src/kusto/ @ilayr @orhasban @astauben -/src/appservice-kube/ @ebencarek @calcha +/src/appservice-kube/ @ebencarek @calcha @StrawnSC /src/custom-providers/ @jsntcy diff --git a/src/appservice-kube/azext_appservice_kube/custom.py b/src/appservice-kube/azext_appservice_kube/custom.py index 61cd745ba5b..41d9d165441 100644 --- a/src/appservice-kube/azext_appservice_kube/custom.py +++ b/src/appservice-kube/azext_appservice_kube/custom.py @@ -154,7 +154,7 @@ def list_by_subscription(cls, cmd, formatter=lambda x: x): formatted = formatter(kube) kube_list.append(formatted) - while j["nextLink"] is not None: + while j.get("nextLink") is not None: request_url = j["nextLink"] r = send_raw_request(cmd.cli_ctx, "GET", request_url) j = r.json() @@ -184,7 +184,7 @@ def list_by_resource_group(cls, cmd, resource_group_name, formatter=lambda x: x) formatted = formatter(kube) kube_list.append(formatted) - while j["nextLink"] is not None: + while j.get("nextLink") is not None: request_url = j["nextLink"] r = send_raw_request(cmd.cli_ctx, "GET", request_url) j = r.json() From aa1a81b95f4917f68bb5fa7a09ca1f2d26b0d2ab Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Mon, 25 Oct 2021 00:40:43 -0700 Subject: [PATCH 117/125] remove unfinished tests --- .../tests/latest/recordings/test_basic.yaml | 2176 ----------------- .../latest/test_appservice_kube_scenario.py | 88 +- 2 files changed, 1 insertion(+), 2263 deletions(-) delete mode 100644 src/appservice-kube/azext_appservice_kube/tests/latest/recordings/test_basic.yaml diff --git a/src/appservice-kube/azext_appservice_kube/tests/latest/recordings/test_basic.yaml b/src/appservice-kube/azext_appservice_kube/tests/latest/recordings/test_basic.yaml deleted file mode 100644 index ddb7418e8f1..00000000000 --- a/src/appservice-kube/azext_appservice_kube/tests/latest/recordings/test_basic.yaml +++ /dev/null @@ -1,2176 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2021-10-05T16:09:58Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '326' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:10:01 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "clitestpfb-clitestpfbvgslo2-2edc29", - "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", - "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, - "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": - -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": false, "name": "nodepool1"}], - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqCuCisw1lE4I45CENzAJA4N6gJjOGCatOnXfcQ79E0A+J8DwHcUe0BOFGss0wyemWm2Ablh+FBlZajfGEkb/JyzKaBoGLwa5hLhBt5i39QAJezn7jzKTY5VDqu+V2E9SCBPiFPmXf4aLViwkZJzc0cw92nl0R134vTIxTZDFnMBfHsiluE7zV43sKDdjMBqX2mGSxPyHCpP3H2aIdSBHnzjPVCkNbaeiYLue2P0Wc4mhrc/5fLapeLG8JhvDH7cXu+QEpxepSVRO3CQMUEoSu3R1HG7MKPzvo9qaVdqO0ZzdRm+GYqtlX4tgA0WQsEVEtRoKxY33lDZ3CTAFbhWSz - strawnsc@gmail.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "networkProfile": - {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", - "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": - "loadBalancer", "loadBalancerSku": "standard"}, "aadProfile": {"managed": true, - "enableAzureRBAC": false}, "disableLocalAccounts": false}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - Content-Length: - - '1346' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks?api-version=2021-07-01 - response: - body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks\",\n - \ \"location\": \"eastus\",\n \"name\": \"clitest000001-aks\",\n \"type\": - \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": - \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.20.9\",\n \"dnsPrefix\": \"clitestpfb-clitestpfbvgslo2-2edc29\",\n \"fqdn\": - \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": - \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.portal.hcp.eastus.azmk8s.io\",\n - \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": - 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": - \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n - \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\",\n - \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": - \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n - \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n - \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-1804gen2containerd-2021.09.28\",\n \"enableFIPS\": false\n - \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n - \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQCqCuCisw1lE4I45CENzAJA4N6gJjOGCatOnXfcQ79E0A+J8DwHcUe0BOFGss0wyemWm2Ablh+FBlZajfGEkb/JyzKaBoGLwa5hLhBt5i39QAJezn7jzKTY5VDqu+V2E9SCBPiFPmXf4aLViwkZJzc0cw92nl0R134vTIxTZDFnMBfHsiluE7zV43sKDdjMBqX2mGSxPyHCpP3H2aIdSBHnzjPVCkNbaeiYLue2P0Wc4mhrc/5fLapeLG8JhvDH7cXu+QEpxepSVRO3CQMUEoSu3R1HG7MKPzvo9qaVdqO0ZzdRm+GYqtlX4tgA0WQsEVEtRoKxY33lDZ3CTAFbhWSz - strawnsc@gmail.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": - {\n \"clientId\": \"msi\"\n },\n \"nodeResourceGroup\": \"MC_clitest000001_clitest000001-aks_eastus\",\n - \ \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": - \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": - {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": - \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": - \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": - \"loadBalancer\"\n },\n \"aadProfile\": {\n \"managed\": true,\n \"adminGroupObjectIDs\": - null,\n \"enableAzureRBAC\": false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n - \ },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\": false\n },\n - \ \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\": \"09299a05-e3da-405f-aff7-df3b96472cba\",\n - \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": - {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 - cache-control: - - no-cache - content-length: - - '2861' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:10:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 - response: - body: - string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:10:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 - response: - body: - string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:11:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 - response: - body: - string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:11:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 - response: - body: - string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:12:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 - response: - body: - string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:12:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 - response: - body: - string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/4f700946-18f5-412b-a141-489c293248a6?api-version=2017-08-31 - response: - body: - string: "{\n \"name\": \"4609704f-f518-2b41-a141-489c293248a6\",\n \"status\": - \"Succeeded\",\n \"startTime\": \"2021-10-05T16:10:05.4466666Z\",\n \"endTime\": - \"2021-10-05T16:13:31.2285666Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '170' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-aad --generate-ssh-keys - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks?api-version=2021-07-01 - response: - body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks\",\n - \ \"location\": \"eastus\",\n \"name\": \"clitest000001-aks\",\n \"type\": - \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": - \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.20.9\",\n \"dnsPrefix\": \"clitestpfb-clitestpfbvgslo2-2edc29\",\n \"fqdn\": - \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": - \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.portal.hcp.eastus.azmk8s.io\",\n - \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": - 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": - \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n - \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n - \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": - \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n - \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n - \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-1804gen2containerd-2021.09.28\",\n \"enableFIPS\": false\n - \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n - \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQCqCuCisw1lE4I45CENzAJA4N6gJjOGCatOnXfcQ79E0A+J8DwHcUe0BOFGss0wyemWm2Ablh+FBlZajfGEkb/JyzKaBoGLwa5hLhBt5i39QAJezn7jzKTY5VDqu+V2E9SCBPiFPmXf4aLViwkZJzc0cw92nl0R134vTIxTZDFnMBfHsiluE7zV43sKDdjMBqX2mGSxPyHCpP3H2aIdSBHnzjPVCkNbaeiYLue2P0Wc4mhrc/5fLapeLG8JhvDH7cXu+QEpxepSVRO3CQMUEoSu3R1HG7MKPzvo9qaVdqO0ZzdRm+GYqtlX4tgA0WQsEVEtRoKxY33lDZ3CTAFbhWSz - strawnsc@gmail.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": - {\n \"clientId\": \"msi\"\n },\n \"nodeResourceGroup\": \"MC_clitest000001_clitest000001-aks_eastus\",\n - \ \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": - \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": - {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": - [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/05fac316-c50d-4820-bc3c-cce50eb906a6\"\n - \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": - \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": - \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": - {\n \"managed\": true,\n \"adminGroupObjectIDs\": null,\n \"enableAzureRBAC\": - false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n - \ \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": - {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/clitest000001-aks-agentpool\",\n - \ \"clientId\": \"78eae02c-f5e9-4c68-a182-a00cf73b201d\",\n \"objectId\": - \"f4bb979f-c8e7-4145-a4ea-1f60075b7040\"\n }\n },\n \"disableLocalAccounts\": - false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\": - \"09299a05-e3da-405f-aff7-df3b96472cba\",\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n - \ },\n \"sku\": {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n - }" - headers: - cache-control: - - no-cache - content-length: - - '3572' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks show - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --output --query - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks?api-version=2021-07-01 - response: - body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks\",\n - \ \"location\": \"eastus\",\n \"name\": \"clitest000001-aks\",\n \"type\": - \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": - \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.20.9\",\n \"dnsPrefix\": \"clitestpfb-clitestpfbvgslo2-2edc29\",\n \"fqdn\": - \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": - \"clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.portal.hcp.eastus.azmk8s.io\",\n - \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": - 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": - \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n - \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n - \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": - \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n - \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n - \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-1804gen2containerd-2021.09.28\",\n \"enableFIPS\": false\n - \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n - \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQCqCuCisw1lE4I45CENzAJA4N6gJjOGCatOnXfcQ79E0A+J8DwHcUe0BOFGss0wyemWm2Ablh+FBlZajfGEkb/JyzKaBoGLwa5hLhBt5i39QAJezn7jzKTY5VDqu+V2E9SCBPiFPmXf4aLViwkZJzc0cw92nl0R134vTIxTZDFnMBfHsiluE7zV43sKDdjMBqX2mGSxPyHCpP3H2aIdSBHnzjPVCkNbaeiYLue2P0Wc4mhrc/5fLapeLG8JhvDH7cXu+QEpxepSVRO3CQMUEoSu3R1HG7MKPzvo9qaVdqO0ZzdRm+GYqtlX4tgA0WQsEVEtRoKxY33lDZ3CTAFbhWSz - strawnsc@gmail.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": - {\n \"clientId\": \"msi\"\n },\n \"nodeResourceGroup\": \"MC_clitest000001_clitest000001-aks_eastus\",\n - \ \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": - \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": - {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": - [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/05fac316-c50d-4820-bc3c-cce50eb906a6\"\n - \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": - \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": - \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": - {\n \"managed\": true,\n \"adminGroupObjectIDs\": null,\n \"enableAzureRBAC\": - false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n - \ \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": - {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/clitest000001-aks-agentpool\",\n - \ \"clientId\": \"78eae02c-f5e9-4c68-a182-a00cf73b201d\",\n \"objectId\": - \"f4bb979f-c8e7-4145-a4ea-1f60075b7040\"\n }\n },\n \"disableLocalAccounts\": - false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\": - \"09299a05-e3da-405f-aff7-df3b96472cba\",\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n - \ },\n \"sku\": {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n - }" - headers: - cache-control: - - no-cache - content-length: - - '3572' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "sku": {"name": "Standard"}, "properties": {"publicIPAllocationMethod": - "Static", "publicIPAddressVersion": "IPv4", "idleTimeoutInMinutes": 4}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network public-ip create - Connection: - - keep-alive - Content-Length: - - '166' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --name --sku - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"MyPublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP\",\r\n - \ \"etag\": \"W/\\\"223f6e79-674a-4013-84a5-0664241d6d66\\\"\",\r\n \"location\": - \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"0a879c78-dc82-4495-b2f7-6d0077b573c9\",\r\n \"publicIPAddressVersion\": - \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": - 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n - \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/44b51196-cc7b-47e0-9cc9-3857c3101172?api-version=2021-02-01 - cache-control: - - no-cache - content-length: - - '683' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 22c842a0-9dd4-4a88-b5bd-1853a558a772 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network public-ip create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --sku - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/44b51196-cc7b-47e0-9cc9-3857c3101172?api-version=2021-02-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f1c21393-361b-48a5-88f6-d2a4222f4ed4 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network public-ip create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --sku - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"MyPublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP\",\r\n - \ \"etag\": \"W/\\\"ff2bce44-8662-4edc-9c8c-71e149f4b776\\\"\",\r\n \"location\": - \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"0a879c78-dc82-4495-b2f7-6d0077b573c9\",\r\n \"ipAddress\": - \"52.224.180.108\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": - \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n - \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": - {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '720' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:40 GMT - etag: - - W/"ff2bce44-8662-4edc-9c8c-71e149f4b776" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 27be7f46-fa8f-48c8-b8b4-277d65740a01 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network public-ip show - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --output --query - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"MyPublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Network/publicIPAddresses/MyPublicIP\",\r\n - \ \"etag\": \"W/\\\"ff2bce44-8662-4edc-9c8c-71e149f4b776\\\"\",\r\n \"location\": - \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"0a879c78-dc82-4495-b2f7-6d0077b573c9\",\r\n \"ipAddress\": - \"52.224.180.108\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": - \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n - \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": - {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '720' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:40 GMT - etag: - - W/"ff2bce44-8662-4edc-9c8c-71e149f4b776" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 5761f654-b634-4ebe-abd0-672116da93da - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks get-credentials - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - --resource-group --name --admin - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/clitest000001-aks/listClusterAdminCredential?api-version=2021-07-01 - response: - body: - string: "{\n \"kubeconfigs\": [\n {\n \"name\": \"clusterAdmin\",\n \"value\": - \"YXBpVmVyc2lvbjogdjEKY2x1c3RlcnM6Ci0gY2x1c3RlcjoKICAgIGNlcnRpZmljYXRlLWF1dGhvcml0eS1kYXRhOiBMUzB0TFMxQ1JVZEpUaUJEUlZKVVNVWkpRMEZVUlMwdExTMHRDazFKU1VVMlJFTkRRWFJEWjBGM1NVSkJaMGxSVGtORmVVNUNTVkp4UjJOUFlVOURTU3R6WlV0bGVrRk9RbWRyY1docmFVYzVkekJDUVZGelJrRkVRVTRLVFZGemQwTlJXVVJXVVZGRVJYZEthbGxVUVdkR2R6QjVUVlJGZDAxRVZYaE9ha0YzVFhwYVlVZEJPSGxOUkZWNFRWUkJkMDVVUlRKTlZFRjZUbXh2ZHdwRVZFVk1UVUZyUjBFeFZVVkJlRTFEV1RKRmQyZG5TV2xOUVRCSFExTnhSMU5KWWpORVVVVkNRVkZWUVVFMFNVTkVkMEYzWjJkSlMwRnZTVU5CVVVSV0NuSmxWMWh2WjJKclNXNUxVVlZPWnpCbVNHcHhUVE0yZDJOYVVURnJZMUE0ZFVvM09XOUNiVzFCU0ZWTFIybFBObkpZVVdGVVZqaGFWV3hKVjNKUlZuWUtNM1ptYzBkTFQwUmhTRU0wUnpkcFozTlBUVGhRVFVVMlJFeG5Na3czYlhGNGFEVjNVbmRhWkRKMGRtdHZOR29yWWl0T1VIbEpRMGxxZEZWRU1XZFBMd3BHVjI5SFUyOUpaamhyUkZZeVRIbEZjRll3VGxKM1dWSmlaRVptVlhKS1ZIRnRRamRQV1ZCTVUyVkdUR3hzYkVwVGVqRnhWbXREUkdaVU0yNDBkV3B6Q2pKaksxTjJTbTFsVGxWUlRXWjNhRzFtY1VSWUswdDFTM1JxVlZWbWNFMTZTRW94VUZkWU5ESndNMHRGUkZaRmMwZHpOMFZQV0Vkck0wcHdSV2xQTjNrS1pIaE5ZamxMTVVWVk5HeDJhbXRhT1ZCSVZrMVdiekpCU1VkUU9HODJVRzlhZDNSSlFtVndOR3h3ZDFNNVJ6ZHdlWGhrY1ZRdlVteFdUMHRwV1c5WU5BcG5abFkxTm1oT2VsVlZVVWhqUm1sdFFtSlpibUZqWVVRMGVtNW1WMVZ3Tms4dmMxcE9aM1pGYzJ0d01WRXdaV2RyYkV4RlVtNXBSRWh1VDBZMlJuY3hDbkYyY0hoalRUVlpOVUpKVUVWaE5YZHVkRGRDYkZGYUx6QldRakEyUTAxaVYxSlNaMmhaUml0dmJqWnBha0k1YTFGRk5IbEpNemxVZEhGRWNWVkJWRXNLWTBoWU5XWmpNelo1T1dsa2VFMXpZVFUyU0VaWWRXRkVkbmh4SzJGM2QwOUZUR28xZUZkdWVrRkplRTlEUVdJMVZ6TjFSR3BhTkU5WGIwVnZiRzlLWWdwWU1qQk1aU3RJY0ZKRk1rUmxTR04yTmtSclVsTnFiakpCTmxSVlZUa3hWRFkxYURGbWNVTlZWblJQYjBaV1FrbHdSVU55V1U1Vk5rVlJkbXM1ZFdKWENtTlNMMFZGTDBGNFpVSTNlalU0VGxGNFVFdFdNM0ZQZUdKeFJIZHJNalF6SzJOV1FUTXpZa28xUnpsUVN6UlJPVUZpVjBoNVpXMDNPV1pPWTNRd1JUY0tkWFpWYWpaeVIxRkhibXM1TVZCeldXaEVhVGN6VGtwUFpFeDBNSGQyTjFaTU5rUlpabmg2ZWs5UlNVUkJVVUZDYnpCSmQxRkVRVTlDWjA1V1NGRTRRZ3BCWmpoRlFrRk5RMEZ4VVhkRWQxbEVWbEl3VkVGUlNDOUNRVlYzUVhkRlFpOTZRV1JDWjA1V1NGRTBSVVpuVVZWRVNtbHBWR05MY25KVGEyMVFla3BUQ21aWFFtaDVaa2hYV2k5TmQwUlJXVXBMYjFwSmFIWmpUa0ZSUlV4Q1VVRkVaMmRKUWtGSGQwdExibFV5V1RKNFFrVnJURU5rT1ZBMWREY3hiMloyY1ZrS1NGSjFka1pOVmtsVGFTOXRVamgxZFZaYVlWSkNhbW95YkhSM1JXVTJZM0F5YXpaSmVrVkxjWFZGWnpoS1ZFTTJMeXRRVW1zMllqWTVlUzlWYVdWV1NBcGpWVE4wZUZkbFpscFlkek15UlhaclVHTTVUMm8xU3paSlZrTkxXRmhVY1dOR2RXa3ZkekJYZUZWRFduY3dhWGxoUlZwcGRGVXdSemN3VjNOeFQyeGtDalZKVVVkeFFXdDJPRmRqVFdaTGNrVnFTR0pGVTI1bFpsVXpTR3RFWVRkRFZUbExiRzlCUjBscWFubHFjSEJCYmtRM2NFdHNWa3RGWlRaTGJrbG1hRGtLWWtzNGJWaFFlRUYzVEdzMFJGazNTRFZDWVZKcmNFbGhZM2MyYW1jMlpHTndTa1ZMU0RGSWJraG5ia04yTlZsMmFsRk9SWGxoVDFkWFozRnVWVmwxTmdwWVVHaEJTMGx4Y1dRMVdXaGhlVEY1ZVU1a1NuTnhjR05UVW5rM1dVSnBUbUZ5TWpGNVJIZDBZa0Y0Um5sUllVSnhOa2wzUlRsYWNrbGtWRGxtYzNOa0NrTjFjRnBoUlZab05HVldWV1I0UTJaalZqZGpjazR4ZUdNd2FraE1PRXBFVVZOUVdqTlZRbU5xVDFkQkt6TjJTemhoU1hSVWJrbFZkVUY2YkdGMGJEWUtXVVlyUzFsVWFHVnRUemRRYURCMGRsUXJZMjh2TmpOcU5qSkVaRGhxWkhneFlsSTJMMHQ2ZUZCWmRHRk9hMUl2T0ZKcWFWVjFTMGRyYlRaRVduaHpMd3BMWXpGb05IWkhkbFoyVUVWQmR5dG9ZM3BoZEVWSmIxZFlkVXBqUVRaV2IzcGlRV2xaYzFONllWSm1URVZLT0VzMWJrTkVjMjlqZUZoSGRscHhSVFZPQ2paVVVrRndaMjg0YjNsR2VqRllTRkpPUlhObGJ6VjVlRGRqY0hOcldpOTBPSGN3Y2pWcU1ESk5PVVJYS3pkd1ltSjJVekJyZFUxdU0yRk9NMkY1U0NzS1FrOWFkMEpuYTBoMlltWlllRlJUUm1OMWIyZHZTQzlaTDFCUE0waEpUMmRKVWxKUFpIQlhXRlZZU1RSQ0wzSlJRMWsyYlRoQ2RDczRjWGg2VjJaR2RBcHFjVTU0VEVNeWVraHdja0ZrVm01VkNpMHRMUzB0UlU1RUlFTkZVbFJKUmtsRFFWUkZMUzB0TFMwSwogICAgc2VydmVyOiBodHRwczovL2NsaXRlc3RwZmItY2xpdGVzdHBmYnZnc2xvMi0yZWRjMjktMjFkOTFhNzguaGNwLmVhc3R1cy5hem1rOHMuaW86NDQzCiAgbmFtZTogY2xpdGVzdHBmYnZnc2xvMmhndXhjZjRsLWFrcwpjb250ZXh0czoKLSBjb250ZXh0OgogICAgY2x1c3RlcjogY2xpdGVzdHBmYnZnc2xvMmhndXhjZjRsLWFrcwogICAgdXNlcjogY2x1c3RlckFkbWluX2NsaXRlc3RwZmJ2Z3NsbzJoZ3V4Y2Y0bF9jbGl0ZXN0cGZidmdzbG8yaGd1eGNmNGwtYWtzCiAgbmFtZTogY2xpdGVzdHBmYnZnc2xvMmhndXhjZjRsLWFrcwpjdXJyZW50LWNvbnRleHQ6IGNsaXRlc3RwZmJ2Z3NsbzJoZ3V4Y2Y0bC1ha3MKa2luZDogQ29uZmlnCnByZWZlcmVuY2VzOiB7fQp1c2VyczoKLSBuYW1lOiBjbHVzdGVyQWRtaW5fY2xpdGVzdHBmYnZnc2xvMmhndXhjZjRsX2NsaXRlc3RwZmJ2Z3NsbzJoZ3V4Y2Y0bC1ha3MKICB1c2VyOgogICAgY2xpZW50LWNlcnRpZmljYXRlLWRhdGE6IExTMHRMUzFDUlVkSlRpQkRSVkpVU1VaSlEwRlVSUzB0TFMwdENrMUpTVVpJYWtORFFYZGhaMEYzU1VKQlowbFNRVTB2ZVM4M1dtRXZkSEI1VXpoNlJqWXdibEkwY2pSM1JGRlpTa3R2V2tsb2RtTk9RVkZGVEVKUlFYY0tSRlJGVEUxQmEwZEJNVlZGUVhoTlExa3lSWGRJYUdOT1RXcEZlRTFFUVRGTlZGbDNUVVJOTWxkb1kwNU5hazE0VFVSQk1VMVVXWGhOUkUweVYycEJkd3BOVW1OM1JsRlpSRlpSVVV0RmR6VjZaVmhPTUZwWE1EWmlWMFo2WkVkV2VXTjZSVlpOUWsxSFFURlZSVUY0VFUxaVYwWjZaRWRXZVZreWVIQmFWelV3Q2sxSlNVTkpha0ZPUW1kcmNXaHJhVWM1ZHpCQ1FWRkZSa0ZCVDBOQlp6aEJUVWxKUTBOblMwTkJaMFZCTTFSTGVFcHdNREpGSzAxUVdqQjNPQ3RrV2xVS05ucHJPVEl4T1ZCRFFTdDNNREV5WkRSTlpqTmhaVEJFY0dKQ1VUTlNjMkpTTmpSemNuZDJjRVEzVlRocFZVcEhWVmdyVXpWNU5FSkpZelpEYTB4Mk1RcHBVVElyWkd0Q1kybDZibTVrWlZSM05VbGxNaTkzV0ZkTE9EaFdjMjFUY1Rnd2EzQk1kV2xoUW1zMVRqVmFPWGh6VG5ab2VrUktUMmQ0ZFdoWVNuWnlDa2N4ZUd4T1JsaFhRVVZ2TTFwMmVXdDJPV1I0TVZSSVVtMDBkMXBvVkdjMmVuSllSUzlDT0VGa1p6UndZMll2TkdoTWIxRnFSMmxhUVZkV00wSjJaMjhLWmsxcmRrMUZObnB6VGxGV1RtOVFUMlJMV0dkeldHeGFjMHBsU0dOMFZteEZSRGhZYmtSQlpFczNZV1J4ZWtwWVVVZHJkMXBSUjBrM2JFdEZhR3BTU2dvclExaG9WbU13UmpSdldERnBlR2wyVkVsQ2RtOUdOR051V0hvM2MzaGpRVEE0VkhWclVVaFNTVTAxUW1sQ1FXVnJRV0Y1VFVkMVp6WjJRMVZhVnpCbUNuUnpWMGRMZEhCa1ptNWtSRTUxUVZkSFMzaG5iR0Z3ZUhaaFpFcHpSM1p2UkdoMk4zb3ZlRVJoU0V0eVJHUm9LMlJ1VGpGa05HUnJiV0pCYTB0WFpXUUtNbmxVVmpoRU1HRlVORGdyUlM5c1lXRm9SRlpPWWpsdVdqbHdZU3RGV0hkNFdVVnBNWFZzVEdSaFIwdFFORlJrVmprNFFuWlljMHBrWVZKck1XdHpjZ296V2k5YVVrVlFhelJMVEd4TVZVMU5iR3BLTUUxRVpFNU5aMHhDYjFaNFNtODBUMVJZT1hoa2JEVlVTSEJ4ZW5GYVNqVkZaRTVyZUcwMVVqSTJWak5XQ2xVNFJtWTBhbGNyVTJSYVlWaFVjekFyVjBkUE4wWmxWRWd6TUhFME1HTnpVVE41ZW10S1NVWmtkV2swYzBzNVZYVlNPVWsyZDNwUGEzUjVTbVp4VVZBS0x6WnRTMUF3YzBzdlprZDFPR2xHU2pOaVozTlJiSHBoUzBoUlVtTjBWRklyWkhodlQyUkJZa3hHUXlzMGFFMHdabVZyUWpneFRsbGlVelZVZFdKc1N3cFhUazlKTmxSVFdGVlRkVmw0TjI5VFVGaGxTMnBUT0VOQmQwVkJRV0ZPVjAxR1VYZEVaMWxFVmxJd1VFRlJTQzlDUVZGRVFXZFhaMDFDVFVkQk1WVmtDa3BSVVUxTlFXOUhRME56UjBGUlZVWkNkMDFEVFVGM1IwRXhWV1JGZDBWQ0wzZFJRMDFCUVhkSWQxbEVWbEl3YWtKQ1ozZEdiMEZWUkVwcGFWUmpTM0lLY2xOcmJWQjZTbE5tVjBKb2VXWklWMW92VFhkRVVWbEtTMjlhU1doMlkwNUJVVVZNUWxGQlJHZG5TVUpCUVN0TlNYQkNaemxrU2pWVFIwazFWbTFrYndwbmFDdHVSSFozUWsxbkswWTJSRmhDUjFOak5VaFNRVEpZWkRWaVVHTllTSGQxUlRKMFRsZEdlbUU0UWxOU2FXSmFaMGRZWVZGNmNrWm9OMDFzY2tOMUNqWkRNelp6VkV0TWNFZHRkbmRzZUhCTlMwbGphazRyU1ZsWGFFdDBURkpQVm5KTWJFRnVNVGhXV1ZVNFNVbGFTRkJoZW04M1NtRlBaVzFWZEZabGNVUUtUbVpPUlRWV2J6VkxUa0ZPYmpKeU16QkxkRE5QVUVjMmNXWXpMMU5UUVcxNlNXNXJOWGczVkVzeFYzQkJOMDFGVWpCRGFVWTJMMk51ZFZodWNtTndhZ296T0dKS1FtczNUbkkyYURZd1NuUlZUVEZFUVdaSWJTdHJUVEZUYms5R05WaGlTM0pxTTNoR0wybE5TV0ZoVVV4VVpUQlZhV1lyYmsxSGVtNUZhRzl1Q2xwYU0wOHhkVTVpVGtWcmRuSmhPRUZqVWsxS1MxRmhjemRWY1hSUWRuaEdUek52UTJNMGQzVmpTVEoxV21Fck1VNXFRamRFYm01SVNqQlZVVlZFUnpjS2IzTXdZMVpVU0hkaGJWZ3ZTbVF6Y1hBNVdqTTVja1J6Y1V4Q1VFdzVTbk5PV2sxWFoxaEJibFJvT0U5bVQzTmFkRXR2U0ZCeGNubEdaMEYxVkV4R2F3cE9XV05wUjFORU1EZzVlWGxCVGtKWGFVUnBiM1ZCVlhwaU1VMURlbkZ5ZEVOelNGUTNZek52ZDBsNFFUVmFjV3BWZVU0MVZHSlpTbGxVZG5WWU5tcGlDa0YxUlN0cGVYSXdPSGxSYVhsS1MzRlVhVGQxV25aVFNDOVRka0pQYkhCeFJXaGtibTFYV0RGeFZIcEROMWwwTDFoSWRFcHZhVFE0TW5Fd1ZUSkhRelFLVTFaRlJHcHVaalpSYnpoNWFTODFOWEZ0VkhaNVVWQkJialJqUTJkNk9XcFlVRTgwWlc1R1l6SjFTa2hWVWxGUmIzaHpkbmtyUTJZNVYzQlhkVEZRTkFwRFRuTm5abGs1YkdSRE9VMTZaWFl4WTNob1pYRlZialpQZEdkR1MxbDZkMFU1TkN0a1lsQTBla2hqWm5OU1dFOXFVWFJYV1ZrclFWWmFSbVIxYkdabENsUkVTRWg1YldwNWNERklWR2c1TkVZeVRGUlZZUzlWUmdvdExTMHRMVVZPUkNCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2c9PQogICAgY2xpZW50LWtleS1kYXRhOiBMUzB0TFMxQ1JVZEpUaUJTVTBFZ1VGSkpWa0ZVUlNCTFJWa3RMUzB0TFFwTlNVbEtTMEZKUWtGQlMwTkJaMFZCTTFSTGVFcHdNREpGSzAxUVdqQjNPQ3RrV2xVMmVtczVNakU1VUVOQkszY3dNVEprTkUxbU0yRmxNRVJ3WWtKUkNqTlNjMkpTTmpSemNuZDJjRVEzVlRocFZVcEhWVmdyVXpWNU5FSkpZelpEYTB4Mk1XbFJNaXRrYTBKamFYcHVibVJsVkhjMVNXVXlMM2RZVjBzNE9GWUtjMjFUY1Rnd2EzQk1kV2xoUW1zMVRqVmFPWGh6VG5ab2VrUktUMmQ0ZFdoWVNuWnlSekY0YkU1R1dGZEJSVzh6V25aNWEzWTVaSGd4VkVoU2JUUjNXZ3BvVkdjMmVuSllSUzlDT0VGa1p6UndZMll2TkdoTWIxRnFSMmxhUVZkV00wSjJaMjltVFd0MlRVVTJlbk5PVVZaT2IxQlBaRXRZWjNOWWJGcHpTbVZJQ21OMFZteEZSRGhZYmtSQlpFczNZV1J4ZWtwWVVVZHJkMXBSUjBrM2JFdEZhR3BTU2l0RFdHaFdZekJHTkc5WU1XbDRhWFpVU1VKMmIwWTBZMjVZZWpjS2MzaGpRVEE0VkhWclVVaFNTVTAxUW1sQ1FXVnJRV0Y1VFVkMVp6WjJRMVZhVnpCbWRITlhSMHQwY0dSbWJtUkVUblZCVjBkTGVHZHNZWEI0ZG1Ga1NncHpSM1p2UkdoMk4zb3ZlRVJoU0V0eVJHUm9LMlJ1VGpGa05HUnJiV0pCYTB0WFpXUXllVlJXT0VRd1lWUTBPQ3RGTDJ4aFlXaEVWazVpT1c1YU9YQmhDaXRGV0hkNFdVVnBNWFZzVEdSaFIwdFFORlJrVmprNFFuWlljMHBrWVZKck1XdHpjak5hTDFwU1JWQnJORXRNYkV4VlRVMXNha293VFVSa1RrMW5URUlLYjFaNFNtODBUMVJZT1hoa2JEVlVTSEJ4ZW5GYVNqVkZaRTVyZUcwMVVqSTJWak5XVlRoR1pqUnFWeXRUWkZwaFdGUnpNQ3RYUjA4M1JtVlVTRE13Y1FvME1HTnpVVE41ZW10S1NVWmtkV2swYzBzNVZYVlNPVWsyZDNwUGEzUjVTbVp4VVZBdk5tMUxVREJ6U3k5bVIzVTRhVVpLTTJKbmMxRnNlbUZMU0ZGU0NtTjBWRklyWkhodlQyUkJZa3hHUXlzMGFFMHdabVZyUWpneFRsbGlVelZVZFdKc1MxZE9UMGsyVkZOWVZWTjFXWGczYjFOUVdHVkxhbE00UTBGM1JVRUtRVkZMUTBGblFXOWxiazVUY0hGb1ZIZFdVamRUWTJSTGVsQTRhbEZKYkdsVlRFZHpkblp3VkRRMmFsWnFjVXB1U0hac2R6UTNRVmxzYWtwTGVuTlFZd3ByUzJodmRVaHFTV2RZYkU5NGNreERXRmhtVm10UE0zaDNTVTk0VUdaUGFIWnBkSGhUZG5Cb1dqZEVlR3RUYUdGNVRqSnNha3hNYVhZeWRFNU9Ra1V5Q2xKV2FWTlhUbWRIWTJ0UmFUUnJiMU42VVRONlJHbGFZMUpUWjJ0RVMyUXdhVlpUZEVoMVpTdHFMMDE1VEVOSWJuRnpUVFV6VFhnMmVGbDRNV05YZDBnS01qQkRRbGRvZDFwbldXTm1LM1JETW1OU2JUSXlURTlOWTJaTmRYbHlORFEzT1RSUlQwODVZekUwWmpkaWNrOU5jSEpHVlVWS1lUTXlMMk4yYm5WM1lRcEtLeTlsY0ZBNU4yRmhNM1l5Y0VGQ2JTdE9UVUZaZGtFMU1tRXhORE5ETVNzNWRtTXhWR3BYTmtsRFJERnRhMWhDYzBocWVrSkNabVZLUlhSTU4yVmpDbW8yUjA5cFJrRlVjbmxrTkc5a1JWQTNWa2swVkVOb1RESXdiRmhIVUZGUlRWaHVSME5wT0Rnd1IwcEtkR0pZUXk5aGJtTmxWbWhGYmxWWFVIWmFLMWNLZEd3d0szRlhaMGxyY1VaMFZEVm9kemg0YXpOU1NVNWFUQzh5U1VaeWVrUkpOek01ZWpkMVpIcGxZM2c0VDB0WFlVaFpWWGhHWTFKdFluSXlNR1U1WVFwd2FreHdibUZPYmpoaFJDdENRMGhKUjJKS01ucGtlRlJrTUdScFMzUkhXV3R2Y0hGc1lVRnZTbEZGYUhGclkyc3dTVVJDTlhwWU9YWlBPRWcwYm1KeUNuaHJWRVExUm5WeGRHUndUSGRGTW0xd1lUY3lTRWxKYVZjNWEzZE1PRUUwUjNod0szVlNlRE5EUTBkTlRVZENTaXRRWW5oWlFsaEhhamRPT0ZobVpEVUtlWFpaV21KQ2JXeHlSMVpXTW1WQ2FWSTJjVXRyZFZCYWQycHJNV1ZYV1doQlEyeFFkVkIyVTBkTGMxWmlZMEpoTUU5WFRGTnpkMk5VYTA0cllUSnRjd3B6VVRGb1VteG1SWGRwTm5Cblp5OUdXWEZJWW14dlJrSjBZMDgzY1dkVkwwOWtWbXhCVVVSUlVVNTNkamRaYUdaMVVVdERRVkZGUVRVME5qTlRVeXRvQ2s5dVZYTktWVlpoV0RZMFkwcG1aSFV3VWpoT2FHeGhTa3BaWVdOTGF6VjZOMFlyVm1oT1UzQnFiVE5PTlhOeFMzaEJaMjFVU0cxYWFFSXJTbVpqUjBvS1QzbHNSM0I2UWxOR2EyRkdibkZKVVdZek1YaDNSVVF4ZW5wUU5ESkhjWGN6ZFVWWkx6Y3dTRTkwUWtoNWRVaHFSVVp1UlZCcmVtZDVjVXRrYm5Od01Bb3lTbGwzTUdNdk1qZERhak5SVlRCT1lsQlVOVGdyYkRaVVRrbFRTRVJEUnpka1pHb3JkMDR5VG5Bck5HbFhabFpZTUU5RlNqWkRSVmhGWTFwTlJFeHJDa1pFVEVwYWFrZEVSMHB2WTJOUGVIQlBlR0ZSWm5SbGF6ZGxiR1pTY1RaWVUzUjBlR2hwSzJSRlVpczBkemxuTW05RGNDOXhjR0pXWmxGU0sxSnRVVXNLYXpWclMzWlJhRVpIZURGVlZHTnRSMGRhTm1JemNHaDRWaXNyUTB0UGVHOTBTMEZMVFdFNFNVZFZSRFEyWVdoUE4xVlhiMXBOY1U1QllYbHhlaXR3YWdvd2FFNVNaekJvT1haTGVFZDZVVXREUVZGRlFUbEpkMHBUT1d4SUwxSndiRlpGSzA5bllWWm1OelpvTlRKQmVuTm5ZMEl4V1VacWEwSTVWMm8zYVhRckNteHdjVXRHVUZSa00zTjZSVzQxWms1bUswUmtjemxJTWtoalkxcGhXVVJZZVcxbEsxaG5PV3hzYlZkcmNWRTNNbkpYUXpoSFp6TmFWelpzYUZZeVFsb0tWVzQzVTBFdmJtVjZhek5pVFVwSGR5ODVjSG8yY1haS2VrZDNhRk4xWVhOc1dsVjRXVXhRYUVGTFVGRlZRWE4wVWsxM1VsaERNbkl3Vldsd1dtMUNLd3A0WWtORFEyNVlibUpGYzAxa09WcEtjMjlwYmpFMmQyUTNZVlpSYjIwMVJta3hkWGt6WVRjM2FrUllMM1Z6TjFWUVFYVkljV3h0TDJkM00yTXlPVzVYQ2tWNFN5OU9PREI0VjBRdmRrbE9hbTk0Wm1SNk4zQllhVUY2WTJaWlJrTXhkR0ZVVlhCRVJrUllNa2R2Y0VveldtRktiVWxOZDA5WVVWbG9VemdyVXpNS1lqZG1UVEpDTWt4dFUyWnBaVzF2Vm5SS2QyTTFXRlZ2TXk4clNqZDRUR3QxYlZkVU5VVllURFozUzBOQlVVSkZla3BMU1c1RE5EZFJSRlYwYm1JeVRRcFZRamR6Tms5a01FZDBXRm8xUkhjM1pXaE9UVkJ4VFZONVFrOVZjemx5ZEVKd1RESjZOV05NVWpaRFdtVkZaVEJwWlhCQlFYaEVWRVY1UWpZM1JrSXpDbUprZVd4c1YwWjRaamhSWTJGNlEyUnlPRTUzUTJOTmFtUmFORWd6YUVsWU1USndPVlJWUVRWNU0wbFVWVXRSTld0TVpHdFNjVTFST1hjM2NWSXZRVVlLYlhWYVlqaEthbU5zY1hwMFZ6WkhTekJhSzNZMFNITXlhalZwVmt4RFNXcGxURVpNYjJnMGVtWTRkakJQYVRCYVptTmFkVWMzUkVscU5EVnVXSEUyYXdvd1MxWkRjQzkwWTBsM1ozSndPR0pLUzFZeU1XdHZjRUpKTlVwSVdFUTBLM0ZFTkhSamEwSkpkR3htV1ZJMWFVY3pTamR2UzNwRk5WTlhPVE5YY3pKMENtdE1iRXh2TWxSRmJDdDFXRFUxVGtadVZsQXJPVXczYm1FclYySm1XRmhoYVhkT2NEWlRaMHRPTTJkbksyc3lURUZrU2l0c1FsY3dhRk5xYVRaT1lub0tRaTk2UWtGdlNVSkJVVVJTUmpCaUwycHJiSEZHU0Raa1NuVlRLek4zY0ROSVNVMUtaMjkwV25GYVpubHBRelUwYzBka1dYaGxSMWh1V1RCQmRrSnNWUXBZV25GcmNHbFFlaXRsTURGNVoybzBhblp4WjFwaFUyTkZSRmxLYzBod05ISklSM05vZG01T1dtc3JUM0V4WVRCak9DdG9OazlUVjJvME5qaEVXa2tyQ25KUU1FUjFlRFIxZEV4aE1UWkxjRVJYYUZSb1QxQm9TbU5YV0d4MlFXUm1RamRIWlV4MVFrY3lXVVJwV1hJMWN6RkJZbUpZVW1kdWNWaExWM2hTWWxvS1ZtaFlWVUpQYmtGa0t6SnBhbmw1VEhVdlUwVXpWMjlwTjBsWGVqSXJRME5yY3pCVlEySkpXRzlRWjJaYVJuUkhSRGN4VDFWVFVXbzNUSGxKVm5FMmFBcFBVa1ZhT0dKNVpGQTJXR3hWYTNkTU1tSTJMMGRIVFRGaGVtcFNTbkp1YmxCT1dETTBiWE0wWWpCWGRqaEtjMDFWYVZsNlIwNVVjVGxoYkRGQk1WbFFDak55Vm1KWE5HTjRhRTlYUlVnM1pWTlNjV3BIVUVVMVRGQllla1pEYUZJdlFXOUpRa0ZGYnpGV1dVSm5VQzgxYkhkamNsUjJNM0JsZUhodFUybG1lVUVLVkZoYWRIWjFhbGhZVjI1RWR6aDFNVlkxZW1SaWQzWlBWa3BEYWxkVlEwUTJTMlp0WnpGWGEwOTNMMmhyUWxSVWFtTnRiRXhvZDBsUWRqTmlWSGR0TXdwSU5FeGtlQzh3TURBeWMyMVBhREJtUlRSVVMwZG5aMWhGS3pjM1NqQkhOelkyU1d3NGNUUTRUMHBvTUdrNU5WWlZhbGsyV1V3MWVTOUNhM1phTVU1VENrdG9MMUpZTkdWUldtcFVjVTUzUjBkS2VscDVUbXBETkdSclZrdHhaVkJ2V25KRWFreG1ka0pEV1ZOcEswZFRRbFJaZUZneFlXVm9hV3BwV0d4YWFrY0tRa3hzU0dRclRsaFhXV1J6VG1WVmFsRnBlV3RFYUU0Mk9YYzVia3RRU3pCQlpURkNPV1oxVVM5cFdUQndhRGRPVjBKdU16aE9WMVpvT0ZaQ05UQm9hd3B3Y25kM1QzWkdVQ3M0Y0RKME5DdExWV2Q1VFdORVpGVlVUWFIyTWxKMmVsSlRjR0UzZGxWb01sZEtObWxRZDFsNVRYVkRZbXB1TWtGblJUMEtMUzB0TFMxRlRrUWdVbE5CSUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLCiAgICB0b2tlbjogYTgzN2M3NGExNGZhMjZkNGFjMWViMGZlMmNiYWI5MDAzZjE2MzQ1MjhkNWM0ZTY5MDM1YzhlMmNkYjFkNTk3ZjNkZjAxNzU4NGJkNGYxMjRiZWNjMWQ1YWNiY2YxM2QzNWVmNThlNzA0NmU4OWY1ODk0OGY1MDJhNmViNWQ2NzQK\"\n - \ }\n ]\n }" - headers: - cache-control: - - no-cache - content-length: - - '13213' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"8edd93e1-2103-40b4-bd70-6e34e586362d","roleDefinitionId":"eb67887a-31e8-4e4e-bf5b-14ff79351a6f"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West - Europe","East US","West Central US","South Central US","Southeast Asia","UK - South","East US 2","West US 2","Australia East","North Europe","France Central","Central - US","West US","North Central US","Korea Central","Japan East","East Asia","East - US 2 EUAP"],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"SystemAssignedResourceIdentity, - SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East - US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast - Asia","UK South","East US 2","West US 2","Australia East","North Europe","France - Central","Central US","West US","North Central US","Korea Central","Japan - East","East Asia","West US 3"],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"Operations","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' - headers: - cache-control: - - no-cache - content-length: - - '2132' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:42 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KubernetesConfiguration?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KubernetesConfiguration","namespace":"Microsoft.KubernetesConfiguration","authorizations":[{"applicationId":"c699bf69-fb1d-4eaf-999b-99e6b2ae4d85","roleDefinitionId":"90155430-a360-410f-af5d-89dc284d85c6"},{"applicationId":"03db181c-e9d3-4868-9097-f0b728327182","roleDefinitionId":"DE2ADB97-42D8-49C8-8FCF-DBB53EF936AC"},{"applicationId":"a0f92522-89de-4c5e-9a75-0044ccf66efd","roleDefinitionId":"b3429810-7d5c-420e-8605-cf280f3099f2"},{"applicationId":"bd9b7cd5-dac1-495f-b013-ac871e98fa5f","roleDefinitionId":"0d44c8f0-08b9-44d4-9f59-e51c83f95200"}],"resourceTypes":[{"resourceType":"sourceControlConfigurations","locations":["East - US","West Europe","West Central US","West US 2","South Central US","East US - 2","North Europe","UK South","Southeast Asia","Australia East","France Central","Central - US","North Central US","West US","Korea Central","East Asia","Japan East"],"apiVersions":["2021-03-01","2020-10-01-preview","2020-07-01-preview","2019-11-01-preview"],"defaultApiVersion":"2021-03-01","capabilities":"SupportsExtension"},{"resourceType":"extensions","locations":["East - US","West Europe","West Central US","West US 2","South Central US","East US - 2","North Europe","UK South","Southeast Asia","Australia East","France Central","Central - US","North Central US","West US","Korea Central","East Asia","Japan East","East - US 2 EUAP"],"apiVersions":["2021-05-01-preview","2020-07-01-preview"],"capabilities":"SystemAssignedResourceIdentity, - SupportsExtension"},{"resourceType":"operations","locations":[],"apiVersions":["2021-09-01","2021-06-01-preview","2021-05-01-preview","2021-03-01","2020-10-01-preview","2020-07-01-preview","2019-11-01-preview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' - headers: - cache-control: - - no-cache - content-length: - - '1837' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:42 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAPI-Generator/11.0.0/python - method: GET - uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/apis/networking.k8s.io/v1/ - response: - body: - string: '{"kind":"APIResourceList","apiVersion":"v1","groupVersion":"networking.k8s.io/v1","resources":[{"name":"ingressclasses","singularName":"","namespaced":false,"kind":"IngressClass","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"6upRfBq0FOI="},{"name":"ingresses","singularName":"","namespaced":true,"kind":"Ingress","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ing"],"storageVersionHash":"ZOAfGflaKd0="},{"name":"ingresses/status","singularName":"","namespaced":true,"kind":"Ingress","verbs":["get","patch","update"]},{"name":"networkpolicies","singularName":"","namespaced":true,"kind":"NetworkPolicy","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["netpol"],"storageVersionHash":"YpfwF18m1G8="}]} - - ' - headers: - audit-id: - - 3eb34330-733a-45f6-a62f-e6309e532cab - cache-control: - - no-cache, private - content-length: - - '864' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:44 GMT - x-kubernetes-pf-flowschema-uid: - - c79eb98f-d3de-4c68-8267-32fbe5757cb2 - x-kubernetes-pf-prioritylevel-uid: - - cd610d09-5a01-4137-b13a-15cdb9207e44 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAPI-Generator/11.0.0/python - method: GET - uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/api/v1/nodes - response: - body: - string: '{"kind":"NodeList","apiVersion":"v1","metadata":{"resourceVersion":"869"},"items":[{"metadata":{"name":"aks-nodepool1-37506928-vmss000000","uid":"ea51dec4-fc99-4f20-bcd2-42aa85ab723e","resourceVersion":"845","creationTimestamp":"2021-10-05T16:12:56Z","labels":{"agentpool":"nodepool1","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"Standard_DS2_v2","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"eastus","failure-domain.beta.kubernetes.io/zone":"0","kubernetes.azure.com/agentpool":"nodepool1","kubernetes.azure.com/cluster":"MC_clitest000001_clitest000001-aks_eastus","kubernetes.azure.com/mode":"system","kubernetes.azure.com/node-image-version":"AKSUbuntu-1804gen2containerd-2021.09.28","kubernetes.azure.com/os-sku":"Ubuntu","kubernetes.azure.com/role":"agent","kubernetes.azure.com/storageprofile":"managed","kubernetes.azure.com/storagetier":"Premium_LRS","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"aks-nodepool1-37506928-vmss000000","kubernetes.io/os":"linux","kubernetes.io/role":"agent","node-role.kubernetes.io/agent":"","node.kubernetes.io/instance-type":"Standard_DS2_v2","storageprofile":"managed","storagetier":"Premium_LRS","topology.kubernetes.io/region":"eastus","topology.kubernetes.io/zone":"0"},"annotations":{"node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"},"managedFields":[{"manager":"kubelet","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:12:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:volumes.kubernetes.io/controller-managed-attach-detach":{}},"f:labels":{".":{},"f:agentpool":{},"f:beta.kubernetes.io/arch":{},"f:beta.kubernetes.io/instance-type":{},"f:beta.kubernetes.io/os":{},"f:failure-domain.beta.kubernetes.io/region":{},"f:failure-domain.beta.kubernetes.io/zone":{},"f:kubernetes.azure.com/agentpool":{},"f:kubernetes.azure.com/cluster":{},"f:kubernetes.azure.com/mode":{},"f:kubernetes.azure.com/node-image-version":{},"f:kubernetes.azure.com/os-sku":{},"f:kubernetes.azure.com/role":{},"f:kubernetes.azure.com/storageprofile":{},"f:kubernetes.azure.com/storagetier":{},"f:kubernetes.io/arch":{},"f:kubernetes.io/hostname":{},"f:kubernetes.io/os":{},"f:node.kubernetes.io/instance-type":{},"f:storageprofile":{},"f:storagetier":{},"f:topology.kubernetes.io/region":{},"f:topology.kubernetes.io/zone":{}}},"f:spec":{"f:providerID":{}},"f:status":{"f:addresses":{".":{},"k:{\"type\":\"Hostname\"}":{".":{},"f:address":{},"f:type":{}},"k:{\"type\":\"InternalIP\"}":{".":{},"f:address":{},"f:type":{}}},"f:allocatable":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:capacity":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:conditions":{".":{},"k:{\"type\":\"DiskPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"MemoryPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"PIDPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"Ready\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}},"f:daemonEndpoints":{"f:kubeletEndpoint":{"f:Port":{}}},"f:images":{},"f:nodeInfo":{"f:architecture":{},"f:bootID":{},"f:containerRuntimeVersion":{},"f:kernelVersion":{},"f:kubeProxyVersion":{},"f:kubeletVersion":{},"f:machineID":{},"f:operatingSystem":{},"f:osImage":{},"f:systemUUID":{}}}}},{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:28Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{"f:node.alpha.kubernetes.io/ttl":{}}},"f:spec":{"f:podCIDR":{},"f:podCIDRs":{".":{},"v:\"10.244.0.0/24\"":{}}},"f:status":{"f:conditions":{"k:{\"type\":\"NetworkUnavailable\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}}}}},{"manager":"kubectl-label","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:31Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{"f:kubernetes.io/role":{},"f:node-role.kubernetes.io/agent":{}}}}}]},"spec":{"podCIDR":"10.244.0.0/24","podCIDRs":["10.244.0.0/24"],"providerID":"azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mc_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-37506928-vmss/virtualMachines/0"},"status":{"capacity":{"attachable-volumes-azure-disk":"8","cpu":"2","ephemeral-storage":"129900528Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"7120616Ki","pods":"110"},"allocatable":{"attachable-volumes-azure-disk":"8","cpu":"1900m","ephemeral-storage":"119716326407","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"4675304Ki","pods":"110"},"conditions":[{"type":"NetworkUnavailable","status":"False","lastHeartbeatTime":"2021-10-05T16:13:28Z","lastTransitionTime":"2021-10-05T16:13:28Z","reason":"RouteCreated","message":"RouteController - created a route"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:06Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasSufficientMemory","message":"kubelet - has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:06Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasNoDiskPressure","message":"kubelet - has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:06Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasSufficientPID","message":"kubelet - has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2021-10-05T16:13:06Z","lastTransitionTime":"2021-10-05T16:13:06Z","reason":"KubeletReady","message":"kubelet - is posting ready status. AppArmor enabled"}],"addresses":[{"type":"Hostname","address":"aks-nodepool1-37506928-vmss000000"},{"type":"InternalIP","address":"10.240.0.4"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"a983bb10c5974d45a18b07c503154b77","systemUUID":"f4ada945-84f7-46ca-a709-847576f6e68a","bootID":"38ae69bc-701c-4c55-a70d-2975ecf152a7","kernelVersion":"5.4.0-1059-azure","osImage":"Ubuntu - 18.04.6 LTS","containerRuntimeVersion":"containerd://1.4.9+azure","kubeletVersion":"v1.20.9","kubeProxyVersion":"v1.20.9","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021-1","mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021-1"],"sizeBytes":307432577},{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021"],"sizeBytes":307288309},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0"],"sizeBytes":166352383},{"names":["mcr.azk8s.cn/oss/cilium/cilium:1.10.3.2","mcr.microsoft.com/oss/cilium/cilium:1.10.3.2"],"sizeBytes":154278769},{"names":["mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210906.1","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210906.1"],"sizeBytes":149500693},{"names":["mcr.microsoft.com/oss/kubernetes/kube-proxy@sha256:358a2d321f8d9c0f13afab10357e321f6076ec69b714e6950497980c3390e7d0","mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1"],"sizeBytes":103571592},{"names":["mcr.azk8s.cn/oss/calico/node:v3.8.9.5","mcr.microsoft.com/oss/calico/node:v3.8.9.5"],"sizeBytes":101794833},{"names":["mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830"],"sizeBytes":101469718},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0"],"sizeBytes":101445696},{"names":["mcr.azk8s.cn/oss/cilium/operator:1.10.3","mcr.microsoft.com/oss/cilium/operator:1.10.3"],"sizeBytes":98395697},{"names":["mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210819.1","mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210819.1"],"sizeBytes":96335208},{"names":["mcr.azk8s.cn/aks/hcp/tunnel-openvpn:master.210623.2","mcr.microsoft.com/aks/hcp/tunnel-openvpn:master.210623.2"],"sizeBytes":96125176},{"names":["mcr.azk8s.cn/oss/kubernetes/exechealthz:1.2_v0.0.5","mcr.microsoft.com/oss/kubernetes/exechealthz:1.2_v0.0.5"],"sizeBytes":94348102},{"names":["mcr.microsoft.com/aks/acc/sgx-attestation:2.0","mcr.azk8s.cn/aks/acc/sgx-attestation:2.0"],"sizeBytes":91841669},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.5.0"],"sizeBytes":91583660},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.6.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.6.0"],"sizeBytes":85745730},{"names":["mcr.azk8s.cn/azure-application-gateway/kubernetes-ingress:1.4.0","mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.4.0"],"sizeBytes":79586703},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.7.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.7.0"],"sizeBytes":79348890},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.5.0"],"sizeBytes":79187191},{"names":["mcr.azk8s.cn/containernetworking/azure-npm:v1.4.9","mcr.microsoft.com/containernetworking/azure-npm:v1.4.9"],"sizeBytes":75291405},{"names":["mcr.microsoft.com/oss/nvidia/k8s-device-plugin:v0.9.0","mcr.azk8s.cn/oss/nvidia/k8s-device-plugin:v0.9.0"],"sizeBytes":67291599},{"names":["mcr.azk8s.cn/oss/kubernetes/dashboard:v2.0.1","mcr.microsoft.com/oss/kubernetes/dashboard:v2.0.1"],"sizeBytes":66415836},{"names":["mcr.azk8s.cn/oss/calico/cni:v3.8.9.3","mcr.microsoft.com/oss/calico/cni:v3.8.9.3"],"sizeBytes":63581323},{"names":["mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8"],"sizeBytes":63154716},{"names":["mcr.azk8s.cn/oss/calico/node:v3.20.0","mcr.microsoft.com/oss/calico/node:v3.20.0"],"sizeBytes":60721107},{"names":["mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.4","mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.4"],"sizeBytes":56813818},{"names":["mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8post2","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8post2"],"sizeBytes":56368756},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4","mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4"],"sizeBytes":56238120},{"names":["mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.3","mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.3"],"sizeBytes":54770003},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3","mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3"],"sizeBytes":54191441},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.4.0","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.4.0"],"sizeBytes":52307386},{"names":["mcr.azk8s.cn/oss/kubernetes/azure-cloud-node-manager:v1.1.1","mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.1.1"],"sizeBytes":51559743},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.3.6","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.3.6"],"sizeBytes":50822202},{"names":["mcr.azk8s.cn/oss/kubernetes/kubernetes-dashboard:v1.10.1","mcr.microsoft.com/oss/kubernetes/kubernetes-dashboard:v1.10.1"],"sizeBytes":44907744},{"names":["mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.4","mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.4"],"sizeBytes":44096187},{"names":["mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.3","mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.3"],"sizeBytes":42049482},{"names":["mcr.azk8s.cn/aks/acc/sgx-device-plugin:1.0","mcr.microsoft.com/aks/acc/sgx-device-plugin:1.0"],"sizeBytes":42023095},{"names":["mcr.microsoft.com/containernetworking/azure-vnet-telemetry:v1.0.30","mcr.azk8s.cn/containernetworking/azure-vnet-telemetry:v1.0.30"],"sizeBytes":30784307},{"names":["mcr.azk8s.cn/aks/command/runtime:master.210524.9","mcr.microsoft.com/aks/command/runtime:master.210524.9"],"sizeBytes":30674883},{"names":["mcr.microsoft.com/aks/acc/sgx-webhook:0.9","mcr.azk8s.cn/aks/acc/sgx-webhook:0.9"],"sizeBytes":28358981},{"names":["mcr.azk8s.cn/oss/calico/kube-controllers:v3.20.0","mcr.microsoft.com/oss/calico/kube-controllers:v3.20.0"],"sizeBytes":26117895},{"names":["mcr.azk8s.cn/aks/acc/sgx-webhook:0.6","mcr.microsoft.com/aks/acc/sgx-webhook:0.6"],"sizeBytes":25551671},{"names":["mcr.azk8s.cn/aks/acc/sgx-plugin:0.4","mcr.microsoft.com/aks/acc/sgx-plugin:0.4"],"sizeBytes":25245219},{"names":["mcr.azk8s.cn/oss/kubernetes/metrics-server:v0.4.4","mcr.microsoft.com/oss/kubernetes/metrics-server:v0.4.4"],"sizeBytes":25194689},{"names":["mcr.microsoft.com/oss/kubernetes/ip-masq-agent:v2.5.0.6","mcr.azk8s.cn/oss/kubernetes/ip-masq-agent:v2.5.0.6"],"sizeBytes":25051613},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.4.1","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.4.1"],"sizeBytes":24660260},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.5.2","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.5.2"],"sizeBytes":24288842},{"names":["mcr.azk8s.cn/oss/calico/typha:v3.20.0","mcr.microsoft.com/oss/calico/typha:v3.20.0"],"sizeBytes":24150540},{"names":["mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1","mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1"],"sizeBytes":23818569},{"names":["mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1","mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1"],"sizeBytes":23813937}]}},{"metadata":{"name":"aks-nodepool1-37506928-vmss000001","uid":"c60ff895-47f4-43ba-ab44-1ca4c02e8029","resourceVersion":"846","creationTimestamp":"2021-10-05T16:13:04Z","labels":{"agentpool":"nodepool1","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"Standard_DS2_v2","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"eastus","failure-domain.beta.kubernetes.io/zone":"0","kubernetes.azure.com/agentpool":"nodepool1","kubernetes.azure.com/cluster":"MC_clitest000001_clitest000001-aks_eastus","kubernetes.azure.com/mode":"system","kubernetes.azure.com/node-image-version":"AKSUbuntu-1804gen2containerd-2021.09.28","kubernetes.azure.com/os-sku":"Ubuntu","kubernetes.azure.com/role":"agent","kubernetes.azure.com/storageprofile":"managed","kubernetes.azure.com/storagetier":"Premium_LRS","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"aks-nodepool1-37506928-vmss000001","kubernetes.io/os":"linux","kubernetes.io/role":"agent","node-role.kubernetes.io/agent":"","node.kubernetes.io/instance-type":"Standard_DS2_v2","storageprofile":"managed","storagetier":"Premium_LRS","topology.kubernetes.io/region":"eastus","topology.kubernetes.io/zone":"0"},"annotations":{"node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"},"managedFields":[{"manager":"kubelet","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:volumes.kubernetes.io/controller-managed-attach-detach":{}},"f:labels":{".":{},"f:agentpool":{},"f:beta.kubernetes.io/arch":{},"f:beta.kubernetes.io/instance-type":{},"f:beta.kubernetes.io/os":{},"f:failure-domain.beta.kubernetes.io/region":{},"f:failure-domain.beta.kubernetes.io/zone":{},"f:kubernetes.azure.com/agentpool":{},"f:kubernetes.azure.com/cluster":{},"f:kubernetes.azure.com/mode":{},"f:kubernetes.azure.com/node-image-version":{},"f:kubernetes.azure.com/os-sku":{},"f:kubernetes.azure.com/role":{},"f:kubernetes.azure.com/storageprofile":{},"f:kubernetes.azure.com/storagetier":{},"f:kubernetes.io/arch":{},"f:kubernetes.io/hostname":{},"f:kubernetes.io/os":{},"f:node.kubernetes.io/instance-type":{},"f:storageprofile":{},"f:storagetier":{},"f:topology.kubernetes.io/region":{},"f:topology.kubernetes.io/zone":{}}},"f:spec":{"f:providerID":{}},"f:status":{"f:addresses":{".":{},"k:{\"type\":\"Hostname\"}":{".":{},"f:address":{},"f:type":{}},"k:{\"type\":\"InternalIP\"}":{".":{},"f:address":{},"f:type":{}}},"f:allocatable":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:capacity":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:conditions":{".":{},"k:{\"type\":\"DiskPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"MemoryPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"PIDPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"Ready\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}},"f:daemonEndpoints":{"f:kubeletEndpoint":{"f:Port":{}}},"f:images":{},"f:nodeInfo":{"f:architecture":{},"f:bootID":{},"f:containerRuntimeVersion":{},"f:kernelVersion":{},"f:kubeProxyVersion":{},"f:kubeletVersion":{},"f:machineID":{},"f:operatingSystem":{},"f:osImage":{},"f:systemUUID":{}}}}},{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:06Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{"f:node.alpha.kubernetes.io/ttl":{}}},"f:spec":{"f:podCIDR":{},"f:podCIDRs":{".":{},"v:\"10.244.2.0/24\"":{}}}}},{"manager":"kubectl-label","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:31Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{"f:kubernetes.io/role":{},"f:node-role.kubernetes.io/agent":{}}}}}]},"spec":{"podCIDR":"10.244.2.0/24","podCIDRs":["10.244.2.0/24"],"providerID":"azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mc_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-37506928-vmss/virtualMachines/1"},"status":{"capacity":{"attachable-volumes-azure-disk":"8","cpu":"2","ephemeral-storage":"129900528Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"7120616Ki","pods":"110"},"allocatable":{"attachable-volumes-azure-disk":"8","cpu":"1900m","ephemeral-storage":"119716326407","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"4675304Ki","pods":"110"},"conditions":[{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:14Z","lastTransitionTime":"2021-10-05T16:13:04Z","reason":"KubeletHasSufficientMemory","message":"kubelet - has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:14Z","lastTransitionTime":"2021-10-05T16:13:04Z","reason":"KubeletHasNoDiskPressure","message":"kubelet - has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:13:14Z","lastTransitionTime":"2021-10-05T16:13:04Z","reason":"KubeletHasSufficientPID","message":"kubelet - has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2021-10-05T16:13:14Z","lastTransitionTime":"2021-10-05T16:13:14Z","reason":"KubeletReady","message":"kubelet - is posting ready status. AppArmor enabled"}],"addresses":[{"type":"Hostname","address":"aks-nodepool1-37506928-vmss000001"},{"type":"InternalIP","address":"10.240.0.5"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"27dfea7e50da4476b31579e330618cfe","systemUUID":"1722c3df-aed5-4d16-8258-15f1bb44bd23","bootID":"e1f4d7e5-17d3-4819-a5af-09f750ec98d4","kernelVersion":"5.4.0-1059-azure","osImage":"Ubuntu - 18.04.6 LTS","containerRuntimeVersion":"containerd://1.4.9+azure","kubeletVersion":"v1.20.9","kubeProxyVersion":"v1.20.9","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021-1","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021-1"],"sizeBytes":307432577},{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021"],"sizeBytes":307288309},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0"],"sizeBytes":166352383},{"names":["mcr.azk8s.cn/oss/cilium/cilium:1.10.3.2","mcr.microsoft.com/oss/cilium/cilium:1.10.3.2"],"sizeBytes":154278769},{"names":["mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210906.1","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210906.1"],"sizeBytes":149500693},{"names":["mcr.microsoft.com/oss/kubernetes/kube-proxy@sha256:358a2d321f8d9c0f13afab10357e321f6076ec69b714e6950497980c3390e7d0","mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1"],"sizeBytes":103571592},{"names":["mcr.microsoft.com/oss/calico/node:v3.8.9.5","mcr.azk8s.cn/oss/calico/node:v3.8.9.5"],"sizeBytes":101794833},{"names":["mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830"],"sizeBytes":101469718},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0"],"sizeBytes":101445696},{"names":["mcr.azk8s.cn/oss/cilium/operator:1.10.3","mcr.microsoft.com/oss/cilium/operator:1.10.3"],"sizeBytes":98395697},{"names":["mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210819.1","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210819.1"],"sizeBytes":96335208},{"names":["mcr.azk8s.cn/aks/hcp/tunnel-openvpn:master.210623.2","mcr.microsoft.com/aks/hcp/tunnel-openvpn:master.210623.2"],"sizeBytes":96125176},{"names":["mcr.microsoft.com/oss/kubernetes/exechealthz:1.2_v0.0.5","mcr.azk8s.cn/oss/kubernetes/exechealthz:1.2_v0.0.5"],"sizeBytes":94348102},{"names":["mcr.microsoft.com/aks/acc/sgx-attestation:2.0","mcr.azk8s.cn/aks/acc/sgx-attestation:2.0"],"sizeBytes":91841669},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.5.0"],"sizeBytes":91583660},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.6.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.6.0"],"sizeBytes":85745730},{"names":["mcr.azk8s.cn/azure-application-gateway/kubernetes-ingress:1.4.0","mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.4.0"],"sizeBytes":79586703},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.7.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.7.0"],"sizeBytes":79348890},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.5.0"],"sizeBytes":79187191},{"names":["mcr.azk8s.cn/containernetworking/azure-npm:v1.4.9","mcr.microsoft.com/containernetworking/azure-npm:v1.4.9"],"sizeBytes":75291405},{"names":["mcr.azk8s.cn/oss/nvidia/k8s-device-plugin:v0.9.0","mcr.microsoft.com/oss/nvidia/k8s-device-plugin:v0.9.0"],"sizeBytes":67291599},{"names":["mcr.azk8s.cn/oss/kubernetes/dashboard:v2.0.1","mcr.microsoft.com/oss/kubernetes/dashboard:v2.0.1"],"sizeBytes":66415836},{"names":["mcr.azk8s.cn/oss/calico/cni:v3.8.9.3","mcr.microsoft.com/oss/calico/cni:v3.8.9.3"],"sizeBytes":63581323},{"names":["mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8"],"sizeBytes":63154716},{"names":["mcr.microsoft.com/oss/calico/node:v3.20.0","mcr.azk8s.cn/oss/calico/node:v3.20.0"],"sizeBytes":60721107},{"names":["mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.4","mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.4"],"sizeBytes":56813818},{"names":["mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8post2","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8post2"],"sizeBytes":56368756},{"names":["mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4","mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4"],"sizeBytes":56238120},{"names":["mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.3","mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.3"],"sizeBytes":54770003},{"names":["mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3","mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3"],"sizeBytes":54191441},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.4.0","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.4.0"],"sizeBytes":52307386},{"names":["mcr.azk8s.cn/oss/kubernetes/azure-cloud-node-manager:v1.1.1","mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.1.1"],"sizeBytes":51559743},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.3.6","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.3.6"],"sizeBytes":50822202},{"names":["mcr.azk8s.cn/oss/kubernetes/kubernetes-dashboard:v1.10.1","mcr.microsoft.com/oss/kubernetes/kubernetes-dashboard:v1.10.1"],"sizeBytes":44907744},{"names":["mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.4","mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.4"],"sizeBytes":44096187},{"names":["mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.3","mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.3"],"sizeBytes":42049482},{"names":["mcr.azk8s.cn/aks/acc/sgx-device-plugin:1.0","mcr.microsoft.com/aks/acc/sgx-device-plugin:1.0"],"sizeBytes":42023095},{"names":["mcr.microsoft.com/containernetworking/azure-vnet-telemetry:v1.0.30","mcr.azk8s.cn/containernetworking/azure-vnet-telemetry:v1.0.30"],"sizeBytes":30784307},{"names":["mcr.azk8s.cn/aks/command/runtime:master.210524.9","mcr.microsoft.com/aks/command/runtime:master.210524.9"],"sizeBytes":30674883},{"names":["mcr.azk8s.cn/aks/acc/sgx-webhook:0.9","mcr.microsoft.com/aks/acc/sgx-webhook:0.9"],"sizeBytes":28358981},{"names":["mcr.azk8s.cn/oss/calico/kube-controllers:v3.20.0","mcr.microsoft.com/oss/calico/kube-controllers:v3.20.0"],"sizeBytes":26117895},{"names":["mcr.azk8s.cn/aks/acc/sgx-webhook:0.6","mcr.microsoft.com/aks/acc/sgx-webhook:0.6"],"sizeBytes":25551671},{"names":["mcr.microsoft.com/aks/acc/sgx-plugin:0.4","mcr.azk8s.cn/aks/acc/sgx-plugin:0.4"],"sizeBytes":25245219},{"names":["mcr.azk8s.cn/oss/kubernetes/metrics-server:v0.4.4","mcr.microsoft.com/oss/kubernetes/metrics-server:v0.4.4"],"sizeBytes":25194689},{"names":["mcr.azk8s.cn/oss/kubernetes/ip-masq-agent:v2.5.0.6","mcr.microsoft.com/oss/kubernetes/ip-masq-agent:v2.5.0.6"],"sizeBytes":25051613},{"names":["mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.4.1","mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.4.1"],"sizeBytes":24660260},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.5.2","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.5.2"],"sizeBytes":24288842},{"names":["mcr.microsoft.com/oss/calico/typha:v3.20.0","mcr.azk8s.cn/oss/calico/typha:v3.20.0"],"sizeBytes":24150540},{"names":["mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1","mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1"],"sizeBytes":23818569},{"names":["mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1","mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1"],"sizeBytes":23813937}]}},{"metadata":{"name":"aks-nodepool1-37506928-vmss000002","uid":"f6d24255-bcba-47d8-a3b9-12b921dcce53","resourceVersion":"847","creationTimestamp":"2021-10-05T16:12:56Z","labels":{"agentpool":"nodepool1","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"Standard_DS2_v2","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"eastus","failure-domain.beta.kubernetes.io/zone":"0","kubernetes.azure.com/agentpool":"nodepool1","kubernetes.azure.com/cluster":"MC_clitest000001_clitest000001-aks_eastus","kubernetes.azure.com/mode":"system","kubernetes.azure.com/node-image-version":"AKSUbuntu-1804gen2containerd-2021.09.28","kubernetes.azure.com/os-sku":"Ubuntu","kubernetes.azure.com/role":"agent","kubernetes.azure.com/storageprofile":"managed","kubernetes.azure.com/storagetier":"Premium_LRS","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"aks-nodepool1-37506928-vmss000002","kubernetes.io/os":"linux","kubernetes.io/role":"agent","node-role.kubernetes.io/agent":"","node.kubernetes.io/instance-type":"Standard_DS2_v2","storageprofile":"managed","storagetier":"Premium_LRS","topology.kubernetes.io/region":"eastus","topology.kubernetes.io/zone":"0"},"annotations":{"node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"},"managedFields":[{"manager":"kubelet","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:12:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:volumes.kubernetes.io/controller-managed-attach-detach":{}},"f:labels":{".":{},"f:agentpool":{},"f:beta.kubernetes.io/arch":{},"f:beta.kubernetes.io/instance-type":{},"f:beta.kubernetes.io/os":{},"f:failure-domain.beta.kubernetes.io/region":{},"f:failure-domain.beta.kubernetes.io/zone":{},"f:kubernetes.azure.com/agentpool":{},"f:kubernetes.azure.com/cluster":{},"f:kubernetes.azure.com/mode":{},"f:kubernetes.azure.com/node-image-version":{},"f:kubernetes.azure.com/os-sku":{},"f:kubernetes.azure.com/role":{},"f:kubernetes.azure.com/storageprofile":{},"f:kubernetes.azure.com/storagetier":{},"f:kubernetes.io/arch":{},"f:kubernetes.io/hostname":{},"f:kubernetes.io/os":{},"f:node.kubernetes.io/instance-type":{},"f:storageprofile":{},"f:storagetier":{},"f:topology.kubernetes.io/region":{},"f:topology.kubernetes.io/zone":{}}},"f:spec":{"f:providerID":{}},"f:status":{"f:addresses":{".":{},"k:{\"type\":\"Hostname\"}":{".":{},"f:address":{},"f:type":{}},"k:{\"type\":\"InternalIP\"}":{".":{},"f:address":{},"f:type":{}}},"f:allocatable":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:capacity":{".":{},"f:attachable-volumes-azure-disk":{},"f:cpu":{},"f:ephemeral-storage":{},"f:hugepages-1Gi":{},"f:hugepages-2Mi":{},"f:memory":{},"f:pods":{}},"f:conditions":{".":{},"k:{\"type\":\"DiskPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"MemoryPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"PIDPressure\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}},"k:{\"type\":\"Ready\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}},"f:daemonEndpoints":{"f:kubeletEndpoint":{"f:Port":{}}},"f:images":{},"f:nodeInfo":{"f:architecture":{},"f:bootID":{},"f:containerRuntimeVersion":{},"f:kernelVersion":{},"f:kubeProxyVersion":{},"f:kubeletVersion":{},"f:machineID":{},"f:operatingSystem":{},"f:osImage":{},"f:systemUUID":{}}}}},{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:28Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{"f:node.alpha.kubernetes.io/ttl":{}}},"f:spec":{"f:podCIDR":{},"f:podCIDRs":{".":{},"v:\"10.244.1.0/24\"":{}}},"f:status":{"f:conditions":{"k:{\"type\":\"NetworkUnavailable\"}":{".":{},"f:lastHeartbeatTime":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}}}}},{"manager":"kubectl-label","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:13:31Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{"f:kubernetes.io/role":{},"f:node-role.kubernetes.io/agent":{}}}}}]},"spec":{"podCIDR":"10.244.1.0/24","podCIDRs":["10.244.1.0/24"],"providerID":"azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mc_clitest000001_clitest000001-aks_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-37506928-vmss/virtualMachines/2"},"status":{"capacity":{"attachable-volumes-azure-disk":"8","cpu":"2","ephemeral-storage":"129900528Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"7120612Ki","pods":"110"},"allocatable":{"attachable-volumes-azure-disk":"8","cpu":"1900m","ephemeral-storage":"119716326407","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"4675300Ki","pods":"110"},"conditions":[{"type":"NetworkUnavailable","status":"False","lastHeartbeatTime":"2021-10-05T16:13:28Z","lastTransitionTime":"2021-10-05T16:13:28Z","reason":"RouteCreated","message":"RouteController - created a route"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:12:56Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasSufficientMemory","message":"kubelet - has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:12:56Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasNoDiskPressure","message":"kubelet - has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2021-10-05T16:12:56Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletHasSufficientPID","message":"kubelet - has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2021-10-05T16:12:56Z","lastTransitionTime":"2021-10-05T16:12:56Z","reason":"KubeletReady","message":"kubelet - is posting ready status. AppArmor enabled"}],"addresses":[{"type":"Hostname","address":"aks-nodepool1-37506928-vmss000002"},{"type":"InternalIP","address":"10.240.0.6"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"1e3db06a9eea438680af5d3ef36bf9e6","systemUUID":"c6092e82-3573-4897-b6ad-6b6da796ecb1","bootID":"03e25d30-a457-458a-ad3c-debee5154539","kernelVersion":"5.4.0-1059-azure","osImage":"Ubuntu - 18.04.6 LTS","containerRuntimeVersion":"containerd://1.4.9+azure","kubeletVersion":"v1.20.9","kubeProxyVersion":"v1.20.9","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021-1","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021-1"],"sizeBytes":307432577},{"names":["mcr.azk8s.cn/azuremonitor/containerinsights/ciprod:ciprod08052021","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021"],"sizeBytes":307288309},{"names":["mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0"],"sizeBytes":166352383},{"names":["mcr.azk8s.cn/oss/cilium/cilium:1.10.3.2","mcr.microsoft.com/oss/cilium/cilium:1.10.3.2"],"sizeBytes":154278769},{"names":["mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210906.1","mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210906.1"],"sizeBytes":149500693},{"names":["mcr.microsoft.com/oss/kubernetes/kube-proxy@sha256:358a2d321f8d9c0f13afab10357e321f6076ec69b714e6950497980c3390e7d0","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1","mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830.1"],"sizeBytes":103571592},{"names":["mcr.azk8s.cn/oss/calico/node:v3.8.9.5","mcr.microsoft.com/oss/calico/node:v3.8.9.5"],"sizeBytes":101794833},{"names":["mcr.azk8s.cn/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830","mcr.microsoft.com/oss/kubernetes/kube-proxy:v1.20.9-hotfix.20210830"],"sizeBytes":101469718},{"names":["mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0","mcr.azk8s.cn/oss/kubernetes/ingress/nginx-ingress-controller:0.47.0"],"sizeBytes":101445696},{"names":["mcr.microsoft.com/oss/cilium/operator:1.10.3","mcr.azk8s.cn/oss/cilium/operator:1.10.3"],"sizeBytes":98395697},{"names":["mcr.azk8s.cn/aks/hcp/hcp-tunnel-front:master.210819.1","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:master.210819.1"],"sizeBytes":96335208},{"names":["mcr.azk8s.cn/aks/hcp/tunnel-openvpn:master.210623.2","mcr.microsoft.com/aks/hcp/tunnel-openvpn:master.210623.2"],"sizeBytes":96125176},{"names":["mcr.azk8s.cn/oss/kubernetes/exechealthz:1.2_v0.0.5","mcr.microsoft.com/oss/kubernetes/exechealthz:1.2_v0.0.5"],"sizeBytes":94348102},{"names":["mcr.azk8s.cn/aks/acc/sgx-attestation:2.0","mcr.microsoft.com/aks/acc/sgx-attestation:2.0"],"sizeBytes":91841669},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.5.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.5.0"],"sizeBytes":91583660},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azurefile-csi:v1.6.0","mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.6.0"],"sizeBytes":85745730},{"names":["mcr.azk8s.cn/azure-application-gateway/kubernetes-ingress:1.4.0","mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.4.0"],"sizeBytes":79586703},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.7.0","mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.7.0"],"sizeBytes":79348890},{"names":["mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.5.0","mcr.azk8s.cn/oss/kubernetes-csi/azuredisk-csi:v1.5.0"],"sizeBytes":79187191},{"names":["mcr.azk8s.cn/containernetworking/azure-npm:v1.4.9","mcr.microsoft.com/containernetworking/azure-npm:v1.4.9"],"sizeBytes":75291405},{"names":["mcr.microsoft.com/oss/nvidia/k8s-device-plugin:v0.9.0","mcr.azk8s.cn/oss/nvidia/k8s-device-plugin:v0.9.0"],"sizeBytes":67291599},{"names":["mcr.microsoft.com/oss/kubernetes/dashboard:v2.0.1","mcr.azk8s.cn/oss/kubernetes/dashboard:v2.0.1"],"sizeBytes":66415836},{"names":["mcr.azk8s.cn/oss/calico/cni:v3.8.9.3","mcr.microsoft.com/oss/calico/cni:v3.8.9.3"],"sizeBytes":63581323},{"names":["mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8"],"sizeBytes":63154716},{"names":["mcr.azk8s.cn/oss/calico/node:v3.20.0","mcr.microsoft.com/oss/calico/node:v3.20.0"],"sizeBytes":60721107},{"names":["mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.4","mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.4"],"sizeBytes":56813818},{"names":["mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.azk8s.cn/containernetworking/networkmonitor:v1.1.8post2","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8_hotfix","mcr.microsoft.com/containernetworking/networkmonitor:v1.1.8post2"],"sizeBytes":56368756},{"names":["mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4","mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.4"],"sizeBytes":56238120},{"names":["mcr.microsoft.com/oss/azure/aad-pod-identity/nmi:v1.7.5.3","mcr.azk8s.cn/oss/azure/aad-pod-identity/nmi:v1.7.5.3"],"sizeBytes":54770003},{"names":["mcr.azk8s.cn/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3","mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver:v0.0.21.3"],"sizeBytes":54191441},{"names":["mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.4.0","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.4.0"],"sizeBytes":52307386},{"names":["mcr.azk8s.cn/oss/kubernetes/azure-cloud-node-manager:v1.1.1","mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.1.1"],"sizeBytes":51559743},{"names":["mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.3.6","mcr.azk8s.cn/oss/virtual-kubelet/virtual-kubelet:1.3.6"],"sizeBytes":50822202},{"names":["mcr.azk8s.cn/oss/kubernetes/kubernetes-dashboard:v1.10.1","mcr.microsoft.com/oss/kubernetes/kubernetes-dashboard:v1.10.1"],"sizeBytes":44907744},{"names":["mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.4","mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.4"],"sizeBytes":44096187},{"names":["mcr.azk8s.cn/oss/azure/secrets-store/provider-azure:0.0.14.3","mcr.microsoft.com/oss/azure/secrets-store/provider-azure:0.0.14.3"],"sizeBytes":42049482},{"names":["mcr.azk8s.cn/aks/acc/sgx-device-plugin:1.0","mcr.microsoft.com/aks/acc/sgx-device-plugin:1.0"],"sizeBytes":42023095},{"names":["mcr.azk8s.cn/containernetworking/azure-vnet-telemetry:v1.0.30","mcr.microsoft.com/containernetworking/azure-vnet-telemetry:v1.0.30"],"sizeBytes":30784307},{"names":["mcr.azk8s.cn/aks/command/runtime:master.210524.9","mcr.microsoft.com/aks/command/runtime:master.210524.9"],"sizeBytes":30674883},{"names":["mcr.microsoft.com/aks/acc/sgx-webhook:0.9","mcr.azk8s.cn/aks/acc/sgx-webhook:0.9"],"sizeBytes":28358981},{"names":["mcr.microsoft.com/oss/calico/kube-controllers:v3.20.0","mcr.azk8s.cn/oss/calico/kube-controllers:v3.20.0"],"sizeBytes":26117895},{"names":["mcr.azk8s.cn/aks/acc/sgx-webhook:0.6","mcr.microsoft.com/aks/acc/sgx-webhook:0.6"],"sizeBytes":25551671},{"names":["mcr.azk8s.cn/aks/acc/sgx-plugin:0.4","mcr.microsoft.com/aks/acc/sgx-plugin:0.4"],"sizeBytes":25245219},{"names":["mcr.microsoft.com/oss/kubernetes/metrics-server:v0.4.4","mcr.azk8s.cn/oss/kubernetes/metrics-server:v0.4.4"],"sizeBytes":25194689},{"names":["mcr.azk8s.cn/oss/kubernetes/ip-masq-agent:v2.5.0.6","mcr.microsoft.com/oss/kubernetes/ip-masq-agent:v2.5.0.6"],"sizeBytes":25051613},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.4.1","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.4.1"],"sizeBytes":24660260},{"names":["mcr.azk8s.cn/oss/open-policy-agent/gatekeeper:v3.5.2","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.5.2"],"sizeBytes":24288842},{"names":["mcr.azk8s.cn/oss/calico/typha:v3.20.0","mcr.microsoft.com/oss/calico/typha:v3.20.0"],"sizeBytes":24150540},{"names":["mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1","mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210909.1"],"sizeBytes":23818569},{"names":["mcr.azk8s.cn/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1","mcr.microsoft.com/azure-policy/policy-kubernetes-addon-prod:prod_20210719.1"],"sizeBytes":23813937}]}}]} - - ' - headers: - audit-id: - - 7235fde2-3be4-4a7a-b56c-42a39ae71c7f - cache-control: - - no-cache, private - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:44 GMT - transfer-encoding: - - chunked - x-kubernetes-pf-flowschema-uid: - - c79eb98f-d3de-4c68-8267-32fbe5757cb2 - x-kubernetes-pf-prioritylevel-uid: - - cd610d09-5a01-4137-b13a-15cdb9207e44 - status: - code: 200 - message: OK -- request: - body: '{"spec": {"resourceAttributes": {"verb": "create", "resource": "clusterrolebindings", - "group": "rbac.authorization.k8s.io"}}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAPI-Generator/11.0.0/python - method: POST - uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/apis/authorization.k8s.io/v1/selfsubjectaccessreviews - response: - body: - string: '{"kind":"SelfSubjectAccessReview","apiVersion":"authorization.k8s.io/v1","metadata":{"creationTimestamp":null,"managedFields":[{"manager":"OpenAPI-Generator","operation":"Update","apiVersion":"authorization.k8s.io/v1","time":"2021-10-05T16:13:45Z","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{"f:resourceAttributes":{".":{},"f:group":{},"f:resource":{},"f:verb":{}}}}}]},"spec":{"resourceAttributes":{"verb":"create","group":"rbac.authorization.k8s.io","resource":"clusterrolebindings"}},"status":{"allowed":true}} - - ' - headers: - audit-id: - - 3f7f7009-5f93-4192-aa53-3efc8be78183 - cache-control: - - no-cache, private - content-length: - - '516' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:45 GMT - x-kubernetes-pf-flowschema-uid: - - c79eb98f-d3de-4c68-8267-32fbe5757cb2 - x-kubernetes-pf-prioritylevel-uid: - - cd610d09-5a01-4137-b13a-15cdb9207e44 - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAPI-Generator/11.0.0/python - method: GET - uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/version/ - response: - body: - string: "{\n \"major\": \"1\",\n \"minor\": \"20\",\n \"gitVersion\": \"v1.20.9\",\n - \ \"gitCommit\": \"8dc42052754bfacb111a0426830122dd9cc9cfa0\",\n \"gitTreeState\": - \"clean\",\n \"buildDate\": \"2021-08-31T00:01:04Z\",\n \"goVersion\": \"go1.15.14\",\n - \ \"compiler\": \"gc\",\n \"platform\": \"linux/amd64\"\n}" - headers: - audit-id: - - bee3b225-0c90-42c5-b049-0f216467a7f3 - cache-control: - - no-cache, private - content-length: - - '264' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:45 GMT - x-kubernetes-pf-flowschema-uid: - - c79eb98f-d3de-4c68-8267-32fbe5757cb2 - x-kubernetes-pf-prioritylevel-uid: - - cd610d09-5a01-4137-b13a-15cdb9207e44 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"8edd93e1-2103-40b4-bd70-6e34e586362d","roleDefinitionId":"eb67887a-31e8-4e4e-bf5b-14ff79351a6f"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West - Europe","East US","West Central US","South Central US","Southeast Asia","UK - South","East US 2","West US 2","Australia East","North Europe","France Central","Central - US","West US","North Central US","Korea Central","Japan East","East Asia","East - US 2 EUAP"],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"SystemAssignedResourceIdentity, - SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East - US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast - Asia","UK South","East US 2","West US 2","Australia East","North Europe","France - Central","Central US","West US","North Central US","Korea Central","Japan - East","East Asia","West US 3"],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"None"},{"resourceType":"Operations","locations":[],"apiVersions":["2021-10-01","2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' - headers: - cache-control: - - no-cache - content-length: - - '2132' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:45 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Kubernetes/connectedClusters/clitest000002-cluster'' - under resource group ''clitest000002'' was not found. For more details please - go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - cache-control: - - no-cache - content-length: - - '267' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:46 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAPI-Generator/11.0.0/python - method: GET - uri: https://clitestpfb-clitestpfbvgslo2-2edc29-21d91a78.hcp.eastus.azmk8s.io/api/v1/namespaces - response: - body: - string: '{"kind":"NamespaceList","apiVersion":"v1","metadata":{"resourceVersion":"874"},"items":[{"metadata":{"name":"default","uid":"64cabb12-253f-427c-bd5a-e0350e9a99f5","resourceVersion":"199","creationTimestamp":"2021-10-05T16:11:32Z","managedFields":[{"manager":"kube-apiserver","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:11:32Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-node-lease","uid":"c1aba8f3-d98f-47de-b663-b23a330cb3da","resourceVersion":"60","creationTimestamp":"2021-10-05T16:11:30Z","managedFields":[{"manager":"kube-apiserver","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:11:30Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-public","uid":"3a561b22-f366-4455-a810-7a6717a00bf3","resourceVersion":"46","creationTimestamp":"2021-10-05T16:11:30Z","managedFields":[{"manager":"kube-apiserver","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:11:30Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-system","uid":"0eb31a17-84b7-4d76-abba-10cb0e6a9e6f","resourceVersion":"412","creationTimestamp":"2021-10-05T16:11:30Z","labels":{"addonmanager.kubernetes.io/mode":"Reconcile","control-plane":"true","kubernetes.io/cluster-service":"true"},"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"labels\":{\"addonmanager.kubernetes.io/mode\":\"Reconcile\",\"control-plane\":\"true\",\"kubernetes.io/cluster-service\":\"true\"},\"name\":\"kube-system\"}}\n"},"managedFields":[{"manager":"kube-apiserver","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:11:30Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}},{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion":"v1","time":"2021-10-05T16:12:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}},"f:labels":{".":{},"f:addonmanager.kubernetes.io/mode":{},"f:control-plane":{},"f:kubernetes.io/cluster-service":{}}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}}]} - - ' - headers: - audit-id: - - 96079205-d843-48b3-8725-e29482bfdd24 - cache-control: - - no-cache, private - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:13:47 GMT - transfer-encoding: - - chunked - x-kubernetes-pf-flowschema-uid: - - c79eb98f-d3de-4c68-8267-32fbe5757cb2 - x-kubernetes-pf-prioritylevel-uid: - - cd610d09-5a01-4137-b13a-15cdb9207e44 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002","name":"clitest000002","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2021-10-05T16:10:00Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '326' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:47 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - --resource-group --name - User-Agent: - - python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) AZURECLI/2.28.1 - method: POST - uri: https://eastus.dp.kubernetesconfiguration.azure.com/azure-arc-k8sagents/GetLatestHelmPackagePath?api-version=2019-11-01-preview&releaseTrain=stable - response: - body: - string: '{"repositoryPath":"mcr.microsoft.com/azurearck8s/batch1/stable/azure-arc-k8sagents:1.4.0"}' - headers: - api-supported-versions: - - 2019-11-01-Preview - connection: - - close - content-length: - - '90' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:49 GMT - strict-transport-security: - - max-age=15724800; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"tags": {}, "location": "eastus", "identity": {"type": "SystemAssigned"}, - "properties": {"agentPublicKeyCertificate": "MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==", - "distribution": "aks", "infrastructure": "azure"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - Content-Length: - - '877' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"systemData":{"createdBy":"silasstrawn@microsoft.com","createdByType":"User","createdAt":"2021-10-05T16:13:53.1368376Z","lastModifiedBy":"silasstrawn@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-10-05T16:13:53.1368376Z"},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Accepted","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","distribution":"aks","infrastructure":"azure"}}' - headers: - azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/ede7bc69-8665-4542-acb9-9a6f231bf1be*64B3B4F4AD76A8667FE2B7B5EFF71071CFBEAEAA151C6A4DB011DA69CDDC4510?api-version=2021-03-01 - cache-control: - - no-cache - content-length: - - '1545' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:54 GMT - etag: - - '"7303ddf5-0000-0100-0000-615c79c20000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ExtendedLocation?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ExtendedLocation","namespace":"Microsoft.ExtendedLocation","authorizations":[{"applicationId":"bc313c14-388c-4e7d-a58e-70017303ee3b","roleDefinitionId":"a775b938-2819-4dd0-8067-01f6e3b06392"},{"applicationId":"319f651f-7ddb-4fc6-9857-7aef9250bd05","roleDefinitionId":"0981f4e0-04a7-4e31-bd2b-b2ac2fc6ba4e"}],"resourceTypes":[{"resourceType":"locations","locations":[],"apiVersions":["2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"},{"resourceType":"customLocations","locations":["East - US","West Europe","North Europe","France Central","Southeast Asia","Australia - East","East US 2","West US 2","UK South","Central US","West Central US","West - US","North Central US","South Central US","Korea Central","Japan East","East - Asia","East US 2 EUAP"],"apiVersions":["2021-08-15","2021-03-15-preview","2020-07-15-privatepreview"],"defaultApiVersion":"2021-08-15","capabilities":"SystemAssignedResourceIdentity, - SupportsTags, SupportsLocation"},{"resourceType":"customLocations/enabledResourceTypes","locations":["East - US","West Europe","North Europe","France Central","Southeast Asia","Australia - East","East US 2","West US 2","UK South","Central US","West Central US","West - US","North Central US","South Central US","Korea Central","Japan East","East - Asia","East US 2 EUAP"],"apiVersions":["2021-08-15","2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"},{"resourceType":"locations/operationsstatus","locations":["East - US","West Europe","North Europe","France Central","Southeast Asia","Australia - East","East US 2","West US 2","UK South","Central US","West Central US","West - US","North Central US","South Central US","Korea Central","Japan East","East - Asia","East US 2 Euap"],"apiVersions":["2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"},{"resourceType":"locations/operationresults","locations":["East - US","West Europe","North Europe","France Central","Southeast Asia","Australia - East","East US 2","West US 2","UK South","Central US","West Central US","West - US","North Central US","South Central US","Korea Central","Japan East","East - Asia","East US 2 Euap"],"apiVersions":["2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2021-08-15","2021-03-15-preview","2020-07-15-privatepreview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' - headers: - cache-control: - - no-cache - content-length: - - '2510' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:13:54 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) msrest/0.6.21 msrest_azure/0.6.3 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.28.1 - accept-language: - - en-US - method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=displayName%20eq%20%27Custom%20Locations%20RP%27&api-version=1.6 - response: - body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"51dfe1e8-70c6-4de5-a08e-e18aff23d815","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":[],"appDisplayName":"Custom - Locations RP","appId":"bc313c14-388c-4e7d-a58e-70017303ee3b","applicationTemplateId":null,"appOwnerTenantId":"f8cdef31-a31e-4b4a-93e4-5f571e91255a","appRoleAssignmentRequired":false,"appRoles":[],"displayName":"Custom - Locations RP","errorUrl":null,"homepage":null,"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"keyCredentials":[],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":"Microsoft - Services","replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["bc313c14-388c-4e7d-a58e-70017303ee3b"],"servicePrincipalType":"Application","signInAudience":"AzureADMultipleOrgs","tags":[],"tokenEncryptionKeyId":null}]}' - headers: - access-control-allow-origin: - - '*' - cache-control: - - no-cache - content-length: - - '1246' - content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; - date: - - Tue, 05 Oct 2021 16:13:55 GMT - duration: - - '1862618' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - 903w76f6J66w6J4DkF51MTjj/hIflp2ZcjrYTlSqFpo= - ocp-aad-session-key: - - 4bIpdn16O-zMJ3ez_k4sCqbSRf0lFgbqSCgPMt-9298N179WykVTp9U0bZ-dSC3cyJRhp4B6khM86Fj9PMXVLYy1gGtMyeqPfnuaCXkPbsRqPw2zcsawb9IXnyeJa_Fh.d2DftDexkm19R_7-rtP2YpUR2PtUzs-Wk8rAQv9JQHM - pragma: - - no-cache - request-id: - - 06e8e66e-b92f-421d-b688-504777a656cc - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' - x-ms-resource-unit: - - '1' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/ede7bc69-8665-4542-acb9-9a6f231bf1be*64B3B4F4AD76A8667FE2B7B5EFF71071CFBEAEAA151C6A4DB011DA69CDDC4510?api-version=2021-03-01 - response: - body: - string: '{"id":"/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/ede7bc69-8665-4542-acb9-9a6f231bf1be*64B3B4F4AD76A8667FE2B7B5EFF71071CFBEAEAA151C6A4DB011DA69CDDC4510","name":"ede7bc69-8665-4542-acb9-9a6f231bf1be*64B3B4F4AD76A8667FE2B7B5EFF71071CFBEAEAA151C6A4DB011DA69CDDC4510","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","status":"Succeeded","startTime":"2021-10-05T16:13:54.0208336Z","endTime":"2021-10-05T16:14:09.1218673Z","properties":null}' - headers: - cache-control: - - no-cache - content-length: - - '600' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:14:24 GMT - etag: - - '"40026a96-0000-0100-0000-615c79d10000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s connect - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"systemData":{"createdBy":"silasstrawn@microsoft.com","createdByType":"User","createdAt":"2021-10-05T16:13:53.1368376Z","lastModifiedBy":"64b12d6e-6549-484c-8cc6-6281839ba394","lastModifiedByType":"Application","lastModifiedAt":"2021-10-05T16:14:00.5491912Z"},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","distribution":"aks","infrastructure":"azure"}}' - headers: - cache-control: - - no-cache - content-length: - - '1564' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:14:24 GMT - etag: - - '"7303d2f8-0000-0100-0000-615c79d10000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s show - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"systemData":{"createdBy":"silasstrawn@microsoft.com","createdByType":"User","createdAt":"2021-10-05T16:13:53.1368376Z","lastModifiedBy":"64b12d6e-6549-484c-8cc6-6281839ba394","lastModifiedByType":"Application","lastModifiedAt":"2021-10-05T16:14:00.5491912Z"},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","distribution":"aks","infrastructure":"azure"}}' - headers: - cache-control: - - no-cache - content-length: - - '1564' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:14:46 GMT - etag: - - '"7303d2f8-0000-0100-0000-615c79d10000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedk8s show - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-hybridkubernetes/1.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2021-03-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"systemData":{"createdBy":"silasstrawn@microsoft.com","createdByType":"User","createdAt":"2021-10-05T16:13:53.1368376Z","lastModifiedBy":"64b12d6e-6549-484c-8cc6-6281839ba394","lastModifiedByType":"Application","lastModifiedAt":"2021-10-05T16:14:00.5491912Z"},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","distribution":"aks","infrastructure":"azure"}}' - headers: - cache-control: - - no-cache - content-length: - - '1564' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:14:46 GMT - etag: - - '"7303d2f8-0000-0100-0000-615c79d10000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays": - 30, "workspaceCapping": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - monitor log-analytics workspace create - Connection: - - keep-alive - Content-Length: - - '115' - Content-Type: - - application/json - ParameterSetName: - - --resource-group --workspace-name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.OperationalInsights/workspaces/clitest000002-workspace?api-version=2020-10-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"173c4511-5eaa-40b6-b762-22ffebbbf077\",\r\n \"provisioningState\": \"Creating\",\r\n - \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\": - \"Tue, 05 Oct 2021 16:14:49 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": - \"Tue, 05 Oct 2021 20:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Tue, 05 Oct 2021 16:14:49 GMT\",\r\n - \ \"modifiedDate\": \"Tue, 05 Oct 2021 16:14:49 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/microsoft.operationalinsights/workspaces/clitest000002-workspace\",\r\n - \ \"name\": \"clitest000002-workspace\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"eastus\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1110' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:14:49 GMT - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - - ASP.NET - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - monitor log-analytics workspace create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --workspace-name - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.OperationalInsights/workspaces/clitest000002-workspace?api-version=2020-10-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"173c4511-5eaa-40b6-b762-22ffebbbf077\",\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\": - \"Tue, 05 Oct 2021 16:14:49 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": - \"Tue, 05 Oct 2021 20:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Tue, 05 Oct 2021 16:14:49 GMT\",\r\n - \ \"modifiedDate\": \"Tue, 05 Oct 2021 16:14:50 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/microsoft.operationalinsights/workspaces/clitest000002-workspace\",\r\n - \ \"name\": \"clitest000002-workspace\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"eastus\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1111' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:15:20 GMT - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - monitor log-analytics workspace show - Connection: - - keep-alive - ParameterSetName: - - --resource-group --workspace-name --query --output - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.OperationalInsights/workspaces/clitest000002-workspace?api-version=2020-10-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"173c4511-5eaa-40b6-b762-22ffebbbf077\",\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\": - \"Tue, 05 Oct 2021 16:14:49 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": - \"Tue, 05 Oct 2021 20:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Tue, 05 Oct 2021 16:14:49 GMT\",\r\n - \ \"modifiedDate\": \"Tue, 05 Oct 2021 16:14:50 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/microsoft.operationalinsights/workspaces/clitest000002-workspace\",\r\n - \ \"name\": \"clitest000002-workspace\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"eastus\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1111' - content-type: - - application/json - date: - - Tue, 05 Oct 2021 16:15:20 GMT - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - monitor log-analytics workspace get-shared-keys - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - --resource-group --workspace-name --query --output - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-loganalytics/11.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000002/providers/Microsoft.OperationalInsights/workspaces/clitest000002-workspace/sharedKeys?api-version=2020-08-01 - response: - body: - string: "{\r\n \"primarySharedKey\": \"JbBgImQyAsG7RuDvDrr9ODYyTYWKin7tldhKV2rtDAUPPoIaJ8s/2REtvDLpYhMnlsa422U5UCaS9OO748WITA==\",\r\n - \ \"secondarySharedKey\": \"j2Y5+cSjuPMXXqJOqEUUTCDgtwhAlnlHhKPU2AbSjvFkHeLb6mjLSEkXMzVlVWZYMq0REvpRPO0zy7llKI1kKA==\"\r\n}" - headers: - cache-control: - - no-cache - cachecontrol: - - no-cache - content-length: - - '235' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-ams-apiversion: - - WebAPI1.0 - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - k8s-extension create - Connection: - - keep-alive - ParameterSetName: - - --debug --resource-group --name --cluster-type --cluster-name --extension-type - --release-train --auto-upgrade-minor-version --scope --release-namespace --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-protected-settings --configuration-protected-settings - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KubernetesConfiguration?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KubernetesConfiguration","namespace":"Microsoft.KubernetesConfiguration","authorizations":[{"applicationId":"c699bf69-fb1d-4eaf-999b-99e6b2ae4d85","roleDefinitionId":"90155430-a360-410f-af5d-89dc284d85c6"},{"applicationId":"03db181c-e9d3-4868-9097-f0b728327182","roleDefinitionId":"DE2ADB97-42D8-49C8-8FCF-DBB53EF936AC"},{"applicationId":"a0f92522-89de-4c5e-9a75-0044ccf66efd","roleDefinitionId":"b3429810-7d5c-420e-8605-cf280f3099f2"},{"applicationId":"bd9b7cd5-dac1-495f-b013-ac871e98fa5f","roleDefinitionId":"0d44c8f0-08b9-44d4-9f59-e51c83f95200"}],"resourceTypes":[{"resourceType":"sourceControlConfigurations","locations":["East - US","West Europe","West Central US","West US 2","South Central US","East US - 2","North Europe","UK South","Southeast Asia","Australia East","France Central","Central - US","North Central US","West US","Korea Central","East Asia","Japan East"],"apiVersions":["2021-03-01","2020-10-01-preview","2020-07-01-preview","2019-11-01-preview"],"defaultApiVersion":"2021-03-01","capabilities":"SupportsExtension"},{"resourceType":"extensions","locations":["East - US","West Europe","West Central US","West US 2","South Central US","East US - 2","North Europe","UK South","Southeast Asia","Australia East","France Central","Central - US","North Central US","West US","Korea Central","East Asia","Japan East","East - US 2 EUAP"],"apiVersions":["2021-05-01-preview","2020-07-01-preview"],"capabilities":"SystemAssignedResourceIdentity, - SupportsExtension"},{"resourceType":"operations","locations":[],"apiVersions":["2021-09-01","2021-06-01-preview","2021-05-01-preview","2021-03-01","2020-10-01-preview","2020-07-01-preview","2019-11-01-preview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' - headers: - cache-control: - - no-cache - content-length: - - '1837' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - k8s-extension create - Connection: - - keep-alive - ParameterSetName: - - --debug --resource-group --name --cluster-type --cluster-name --extension-type - --release-train --auto-upgrade-minor-version --scope --release-namespace --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-protected-settings --configuration-protected-settings - User-Agent: - - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.6 (macOS-10.15.7-x86_64-i386-64bit) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster?api-version=2020-01-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster","name":"clitest000002-cluster","type":"microsoft.kubernetes/connectedclusters","location":"eastus","tags":{},"identity":{"principalId":"2b72fb96-ef38-45fb-ad42-2a300e9c42ba","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connected","agentPublicKeyCertificate":"MIICCgKCAgEAn/f5Pom968V5SpNp7aCL1IGpUeCVBupURPTj7cej2lekkVVj0t9M71aGwWEBF7NsNwBA8Pa51AUe50nUkn7igT0lBKS1NH7X5/jKuB9Douw17tp5N/hcKXwehLtoNwHyoDwghGg+lXA04dG49Emo2Z7wi+mvTnu/4kZU+ZPbDiPlbvMvsgO2cTKOgRHie+nb9UiLYRRtT8P3cMMml/ogkORxa7tXbIf+7q2K+MiNo6DWdscoywFnERlfYjav4lH8oolS1H4LT+MXfe8H/kEA6Zm5tPZogRiYgUehXW0IDWZVqpuKCYZDtPWtqCGSL59k3mSDWHdmAh1P1nxVBMBJ3pK4WUBE8vDtznBiL5LZZNWy+DnimI6Ml9LdM5GzN66m2OpW/LuuBgQEHEhCpcm+3vVHPg4XBkqXq0YHRWiPQgfbVLQD/czDXpab2/IWC0uq9LZHH4ooB3TKwe9g5Uj2Y+P++U4FNnC3QZcYCCZwhHCkF4E7tTDN1wX3unthf/1R2jP7zO7jDECnzVn4s1k3SpSgKZjKaI/6sJPOuyXBCrNorv5melCkO8am6MSCVl5i1mhu0wUs8njdr9KA5ZLvS4P06YdvqZUtSBWIJdurrj4Eox3qdSsGIn2uAu4EamLQ3zPndGTR0zq4gFp2GOrUDOz4DTPQlgcKWk/Viz1Q9C8CAwEAAQ==","aadProfile":{"tenantId":"","clientAppId":"","serverAppId":""},"distribution":"aks","infrastructure":"azure","kubernetesVersion":"1.20.9","totalNodeCount":3,"agentVersion":"1.4.0","totalCoreCount":6,"lastConnectivityTime":"2021-10-05T16:14:49.98Z"}}' - headers: - cache-control: - - no-cache - content-length: - - '1505' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:15:22 GMT - etag: - - '"6a00d46f-0000-0200-0000-615c7a020000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - status: - code: 200 - message: OK -- request: - body: '{"properties": {"extensionType": "microsoft.web.appservice", "autoUpgradeMinorVersion": - true, "releaseTrain": "stable", "scope": {"cluster": {"releaseNamespace": "$namespace"}}, - "configurationSettings": {"Microsoft.CustomLocation.ServiceAccount": "default", - "appsNamespace": "appservice-ns", "clusterName": "kube-env000003", "loadBalancerIp": - "52.224.180.108\n", "keda.enabled": "true", "buildService.storageClassName": - "default", "buildService.storageAccessMode": "ReadWriteOnce", "customConfigMap": - "appservice-ns/kube-environment-config", "envoy.annotations.service.beta.kubernetes.io/azure-load-balancer-resource-group": - "clitest000001", "logProcessor.appLogs.destination": "log-analytics"}, "configurationProtectedSettings": - {"logProcessor.appLogs.logAnalyticsConfig.customerId": "b''MTczYzQ1MTEtNWVhYS00MGI2LWI3NjItMjJmZmViYmJmMDc3Cg==''", - "logProcessor.appLogs.logAnalyticsConfig.sharedKey": "b''SmJCZ0ltUXlBc0c3UnVEdkRycjlPRFl5VFlXS2luN3RsZGhLVjJydERBVVBQb0lhSjhzLzJSRXR2RExwWWhNbmxzYTQyMlU1VUNhUzlPTzc0OFdJVEE9PQo=''"}}, - "identity": {"type": "SystemAssigned"}, "location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - k8s-extension create - Connection: - - keep-alive - Content-Length: - - '1108' - Content-Type: - - application/json - ParameterSetName: - - --debug --resource-group --name --cluster-type --cluster-name --extension-type - --release-train --auto-upgrade-minor-version --scope --release-namespace --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-settings --configuration-settings --configuration-settings - --configuration-protected-settings --configuration-protected-settings - User-Agent: - - AZURECLI/2.28.1 azsdk-python-mgmt-kubernetesconfiguration/1.0.0b1 Python/3.8.6 - (macOS-10.15.7-x86_64-i386-64bit) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000002/providers/Microsoft.Kubernetes/connectedClusters/clitest000002-cluster/providers/Microsoft.KubernetesConfiguration/extensions/appservice-ext?api-version=2020-07-01-preview - response: - body: - string: '{"errors":{"properties.Scope":["Namespace name is invalid. Valid namespace - must be maximum 63 characters, consist of lower case alphanumeric characters - or ''-'' and must start and end with an alphanumeric character."]},"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One - or more validation errors occurred.","status":400,"traceId":"00-669467346371d843a962aa7a8dc8b0e4-9cb187c56d5e3e4d-01"}' - headers: - cache-control: - - no-cache - content-length: - - '408' - content-type: - - application/problem+json; charset=utf-8 - date: - - Tue, 05 Oct 2021 16:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 400 - message: Bad Request -version: 1 diff --git a/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py b/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py index e385fca485c..98fd540dfd0 100644 --- a/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py +++ b/src/appservice-kube/azext_appservice_kube/tests/latest/test_appservice_kube_scenario.py @@ -14,90 +14,4 @@ # TODO class AppserviceKubernetesScenarioTest(ScenarioTest): - @live_only() - @AllowLargeResponse() - @ResourceGroupPreparer(random_name_length=24, name_prefix='clitest', location="eastus", parameter_name="aks_rg") - @ResourceGroupPreparer(random_name_length=24, name_prefix='clitest', location="eastus", parameter_name="arc_rg") - def test_basic(self, aks_rg, arc_rg): - print("starting test") - # create aks - aks_name = "{}-aks".format(aks_rg) - - self._create_connected_cluster(aks_name, aks_rg, arc_rg) - - # TODO change this to wait + poll - self.assertEqual(self.cmd("connectedk8s show --resource-group {} --name {}".format(arc_rg, self.cluster_name)).get_output_in_json().get("provisioningState"), "Succeeded") - - self._create_log_analytics(arc_rg) - self._install_appservice_extension(arc_rg, aks_rg) - self._create_custom_location() - self._create_kube_env() - - def _create_connected_cluster(self, aks_name, aks_rg, arc_rg): - aks_create_result = self.cmd('aks create --resource-group {} --name {} --enable-aad --generate-ssh-keys'.format(aks_rg, aks_name)).get_output_in_json() - - self.infra_rg = self.cmd('aks show --resource-group {} --name {} --output tsv --query nodeResourceGroup'.format(aks_rg, aks_name)).output - - self.cmd("network public-ip create --resource-group {} --name MyPublicIP --sku STANDARD".format(self.infra_rg)) - self.static_ip = self.cmd("network public-ip show --resource-group {} --name MyPublicIP --output tsv --query ipAddress".format(self.infra_rg)).output - - - print(self.cmd("aks get-credentials --resource-group {} --name {} --admin".format(aks_rg, aks_name)).output) - # kubectl get ns - - self.cluster_name="{}-cluster".format(arc_rg) # Name of the connected cluster resource - - connectedk8s_result = self.cmd("connectedk8s connect --resource-group {} --name {}".format(arc_rg, self.cluster_name)).get_output_in_json() - - return self.cmd("connectedk8s show --resource-group {} --name {}".format(arc_rg, self.cluster_name)).get_output_in_json() - # TODO may need to poll to wait for this to finish ^ - - def _create_log_analytics(self, arc_rg): - workspace_name="{}-workspace".format(arc_rg) - self.cmd("monitor log-analytics workspace create --resource-group {} --workspace-name {}".format(arc_rg, workspace_name)) - log_analytics_workspace_id = self.cmd("az monitor log-analytics workspace show --resource-group {} --workspace-name {} --query customerId --output tsv".format(arc_rg, workspace_name)).output - self.log_analytics_workspace_id_enc = base64.b64encode(bytes(log_analytics_workspace_id, "ascii")) - log_analytics_key = self.cmd("monitor log-analytics workspace get-shared-keys --resource-group {} --workspace-name {} --query primarySharedKey --output tsv".format(arc_rg, workspace_name)).output - self.log_analytics_key_enc = base64.b64encode(bytes(log_analytics_key, "ascii")) - - - def _install_appservice_extension(self, arc_rg, aks_rg): - extension_name = "appservice-ext" # Name of the App Service extension - namespace = "appservice-ns" # Namespace in your cluster to install the extension and provision resources - kube_environment_name = self.create_random_name("kube-env", 24) # Name of the App Service Kubernetes environment resource - self.cmd("k8s-extension create --debug \ - --resource-group {} \ - --name {} \ - --cluster-type connectedClusters \ - --cluster-name {} \ - --extension-type 'Microsoft.Web.Appservice' \ - --release-train stable \ - --auto-upgrade-minor-version true \ - --scope cluster \ - --release-namespace $namespace \ - --configuration-settings \"Microsoft.CustomLocation.ServiceAccount=default\" \ - --configuration-settings \"appsNamespace={}\" \ - --configuration-settings \"clusterName={}\" \ - --configuration-settings \"loadBalancerIp={}\" \ - --configuration-settings \"keda.enabled=true\" \ - --configuration-settings \"buildService.storageClassName=default\" \ - --configuration-settings \"buildService.storageAccessMode=ReadWriteOnce\" \ - --configuration-settings \"customConfigMap={}/kube-environment-config\" \ - --configuration-settings \"envoy.annotations.service.beta.kubernetes.io/azure-load-balancer-resource-group={}\" \ - --configuration-settings \"logProcessor.appLogs.destination=log-analytics\" \ - --configuration-protected-settings \"logProcessor.appLogs.logAnalyticsConfig.customerId={}\" \ - --configuration-protected-settings \"logProcessor.appLogs.logAnalyticsConfig.sharedKey={}\"".format(arc_rg, extension_name, self.cluster_name, namespace, kube_environment_name, self.static_ip, namespace, aks_rg, self.log_analytics_workspace_id_enc, self.log_analytics_key_enc)) - self.extension_id = self.cmd("k8s-extension show \ - --cluster-type connectedClusters \ - --cluster-name {} \ - --resource-group {} \ - --name {} \ - --query id \ - --output tsv".format(self.cluster_name, arc_rg, extension_name)).output - self.cmd("resource wait --ids {} --custom \"properties.installState!='Pending'\" --api-version \"2020-07-01-preview\"".format(self.extension_id)) - - def _create_custom_location(self): - pass - - def _create_kube_env(self): - pass \ No newline at end of file + pass \ No newline at end of file From da8fc360cc7b521b695ff9c0084ee49b23f793e5 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 26 Oct 2021 09:53:06 -0700 Subject: [PATCH 118/125] remove unnecessary branching --- src/appservice-kube/azext_appservice_kube/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/__init__.py b/src/appservice-kube/azext_appservice_kube/__init__.py index e8cc91b6528..a8a284c89f4 100644 --- a/src/appservice-kube/azext_appservice_kube/__init__.py +++ b/src/appservice-kube/azext_appservice_kube/__init__.py @@ -25,11 +25,7 @@ def load_command_table(self, args): return self.command_table def load_arguments(self, command): - from sys import version_info - if version_info[0] < 3: - super().load_arguments(command) - else: - super().load_arguments(command) + super().load_arguments(command) from azext_appservice_kube._params import load_arguments load_arguments(self, command) From 386c31ed18d7b3803b17cbe0cd715aae56694da7 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 26 Oct 2021 09:57:58 -0700 Subject: [PATCH 119/125] remove unnecessary options lists --- src/appservice-kube/azext_appservice_kube/_params.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_params.py b/src/appservice-kube/azext_appservice_kube/_params.py index 86e1c68f4b5..072c46d9dea 100644 --- a/src/appservice-kube/azext_appservice_kube/_params.py +++ b/src/appservice-kube/azext_appservice_kube/_params.py @@ -53,7 +53,7 @@ def load_arguments(self, _): with self.argument_context('webapp create') as c: c.argument('name', options_list=['--name', '-n'], help='name of the new web app', validator=validate_site_create) - c.argument('custom_location', options_list=['--custom-location'], help="Name or ID of the custom location") + c.argument('custom_location', help="Name or ID of the custom location") c.argument('startup_file', help="Linux only. The web's startup file") c.argument('docker_registry_server_user', options_list=['--docker-registry-server-user', '-s'], help='the container registry server username') c.argument('docker_registry_server_password', options_list=['--docker-registry-server-password', '-w'], help='The container registry server password. Required for private registries.') @@ -93,7 +93,7 @@ def load_arguments(self, _): completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), help="name or resource id of the function app service plan. Use 'appservice plan create' to get one") c.argument('new_app_name', options_list=['--name', '-n'], help='name of the new function app') - c.argument('custom_location', options_list=['--custom-location'], help="Name or ID of the custom location") + c.argument('custom_location', help="Name or ID of the custom location") c.argument('storage_account', options_list=['--storage-account', '-s'], help='Provide a string value of a Storage Account in the provided Resource Group. Or Resource ID of a Storage Account in a different Resource Group') c.argument('consumption_plan_location', options_list=['--consumption-plan-location', '-c'], @@ -113,8 +113,8 @@ def load_arguments(self, _): with self.argument_context(scope + ' create') as c: c.argument('assign_identities', nargs='*', options_list=['--assign-identity'], help='accept system or user assigned identities separated by spaces. Use \'[system]\' to refer system assigned identity, or a resource id to refer user assigned identity. Check out help for more examples') - c.argument('scope', options_list=['--scope'], help="Scope that the system assigned identity can access") - c.argument('role', options_list=['--role'], help="Role name or id the system assigned identity will have") + c.argument('scope', help="Scope that the system assigned identity can access") + c.argument('role', help="Role name or id the system assigned identity will have") c.argument('deployment_container_image_name', options_list=['--deployment-container-image-name', '-i'], help='Linux only. Container image name from Docker Hub, e.g. publisher/image-name:tag') c.argument('deployment_local_git', action='store_true', options_list=['--deployment-local-git', '-l'], help='enable local git') From aecde8a73d18813b2a5990455e1451de55372c92 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 26 Oct 2021 10:03:30 -0700 Subject: [PATCH 120/125] use specific CLI error types --- .../azext_appservice_kube/_utils.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index 96545376146..b0bff4ecc8b 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -3,8 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from knack.util import CLIError - +from azure.cli.core.azclierror import ValidationError, InvalidArgumentValueError, ArgumentUsageError from ._client_factory import web_client_factory, cf_resource_groups @@ -25,19 +24,19 @@ def _validate_asp_sku(app_service_environment, custom_location, sku): # Isolated SKU is supported only for ASE if sku.upper() not in ['F1', 'FREE', 'D1', 'SHARED', 'B1', 'B2', 'B3', 'S1', 'S2', 'S3', 'P1V2', 'P1V3', 'P2V2', 'P3V2', 'PC2', 'PC3', 'PC4', 'I1', 'I2', 'I3', 'K1']: - raise CLIError('Invalid sku entered: {}'.format(sku)) + raise InvalidArgumentValueError('Invalid sku entered: {}'.format(sku)) if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: if not app_service_environment: - raise CLIError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " + raise ValidationError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") elif app_service_environment: - raise CLIError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " + raise ValidationError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") elif custom_location: # Custom Location only supports K1 if sku.upper() != 'K1': - raise CLIError("Only pricing tier 'K1' is allowed for this type of app service plan.") + raise ValidationError("Only pricing tier 'K1' is allowed for this type of app service plan.") def get_sku_name(tier): # pylint: disable=too-many-return-statements @@ -66,7 +65,7 @@ def get_sku_name(tier): # pylint: disable=too-many-return-statements return 'IsolatedV2' if tier in ['K1']: return 'Kubernetes' - raise CLIError("Invalid sku(pricing tier), please refer to command help for valid values") + raise InvalidArgumentValueError("Invalid sku(pricing tier), please refer to command help for valid values") def validate_subnet_id(cli_ctx, subnet, vnet_name, resource_group_name): @@ -86,7 +85,7 @@ def validate_subnet_id(cli_ctx, subnet, vnet_name, resource_group_name): name=vnet_name, child_type_1='subnets', child_name_1=subnet) - raise CLIError('Usage error: --subnet ID | --subnet NAME --vnet-name NAME') + raise ArgumentUsageError('Usage error: --subnet ID | --subnet NAME --vnet-name NAME') def validate_aks_id(cli_ctx, aks, resource_group_name): @@ -104,7 +103,7 @@ def validate_aks_id(cli_ctx, aks, resource_group_name): namespace='Microsoft.ContainerService', type='managedClusters', name=aks) - raise CLIError('Usage error: --aks') + raise ArgumentUsageError('Usage error: --aks') def _generic_site_operation(cli_ctx, resource_group_name, name, operation_name, slot=None, From aa79f3c1c3de474ff9e237613c6fd857fc47d5fb Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 26 Oct 2021 10:07:21 -0700 Subject: [PATCH 121/125] use more specific error type --- src/appservice-kube/azext_appservice_kube/_client_factory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_client_factory.py b/src/appservice-kube/azext_appservice_kube/_client_factory.py index 68b3c60a951..3f73cd71620 100644 --- a/src/appservice-kube/azext_appservice_kube/_client_factory.py +++ b/src/appservice-kube/azext_appservice_kube/_client_factory.py @@ -12,7 +12,7 @@ def ex_handler_factory(creating_plan=False, no_throw=False): def _polish_bad_errors(ex): import json - from knack.util import CLIError + from azure.cli.core.azclierror import ValidationError try: detail = json.loads(ex.response.text)['Message'] if creating_plan: @@ -24,7 +24,7 @@ def _polish_bad_errors(ex): detail = ("Plan with Linux worker can only be created in a group " + "which has never contained a Windows worker, and vice versa. " + "Please use a new resource group. Original error:" + detail) - ex = CLIError(detail) + ex = ValidationError(detail) except Exception: # pylint: disable=broad-except pass if no_throw: From 6b4ab5e7baf4c29e8452b9de7fa8e753fe5f30a8 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 26 Oct 2021 10:10:59 -0700 Subject: [PATCH 122/125] fix more error types --- .../azext_appservice_kube/_create_util.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py index f66f4e8bacf..f731c4c2d92 100644 --- a/src/appservice-kube/azext_appservice_kube/_create_util.py +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -5,7 +5,7 @@ import os import zipfile -from knack.util import CLIError +from azure.cli.core.azclierror import ValidationError, ArgumentUsageError from knack.log import get_logger from azure.mgmt.web.models import SkuDescription @@ -29,7 +29,7 @@ def get_runtime_version_details(file_path, lang_name, is_kube=False): version_detected = parse_dotnet_version(file_path) version_to_create = detect_dotnet_version_tocreate(version_detected) if is_kube: - raise CLIError("Dotnet runtime is not supported for Kube Environments") + raise ValidationError("Dotnet runtime is not supported for Kube Environments") elif lang_name.lower() == NODE_RUNTIME_NAME: if file_path == '': version_detected = "-" @@ -134,8 +134,8 @@ def get_lang_from_content(src_path, html=False): runtime_details_dict['file_loc'] = static_html_file runtime_details_dict['default_sku'] = 'F1' else: - raise CLIError("The html flag was passed, but could not find HTML files, " - "see 'https://go.microsoft.com/fwlink/?linkid=2109470' for more information") + raise ArgumentUsageError("The html flag was passed, but could not find HTML files, " + "see 'https://go.microsoft.com/fwlink/?linkid=2109470' for more information") elif os.path.isfile(package_python_file): runtime_details_dict['language'] = PYTHON_RUNTIME_NAME runtime_details_dict['file_loc'] = package_python_file @@ -150,8 +150,8 @@ def get_lang_from_content(src_path, html=False): runtime_details_dict['file_loc'] = package_netcore_file runtime_details_dict['default_sku'] = 'F1' else: # TODO: Update the doc when the detection logic gets updated - raise CLIError("Could not auto-detect the runtime stack of your app, " - "see 'https://go.microsoft.com/fwlink/?linkid=2109470' for more information") + raise ValidationError("Could not auto-detect the runtime stack of your app, " + "see 'https://go.microsoft.com/fwlink/?linkid=2109470' for more information") return runtime_details_dict @@ -327,8 +327,8 @@ def get_rg_to_use(cmd, user, loc, os_name, rg_name=None): if rg_name is not None and _check_resource_group_exists(cmd, rg_name): if _check_resource_group_supports_os(cmd, rg_name, os_name.lower() == 'linux'): return rg_name - raise CLIError("The ResourceGroup '{}' cannot be used with the os '{}'. Use a different RG".format(rg_name, - os_name)) + raise ArgumentUsageError("The ResourceGroup '{}' cannot be used with the os '{}'. " + "Use a different RG".format(rg_name, os_name)) if rg_name is None: rg_name = default_rg return rg_name From 66f1f8b8dc428fbd96ccab562f067c23e50cf3cc Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 26 Oct 2021 10:15:49 -0700 Subject: [PATCH 123/125] use HttpResponseError --- src/appservice-kube/azext_appservice_kube/_completers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_completers.py b/src/appservice-kube/azext_appservice_kube/_completers.py index 5f34510b1bb..b8676309fea 100644 --- a/src/appservice-kube/azext_appservice_kube/_completers.py +++ b/src/appservice-kube/azext_appservice_kube/_completers.py @@ -36,7 +36,7 @@ def _get_location(cli_ctx, namespace): Return an Azure location by using an explicit `--location` argument, then by `--resource-group`, and finally by the subscription if neither argument was provided. """ - from msrestazure.azure_exceptions import CloudError + from azure.core.exceptions import HttpResponseError from azure.cli.core.commands.parameters import get_one_of_subscription_locations location = None @@ -45,7 +45,7 @@ def _get_location(cli_ctx, namespace): elif getattr(namespace, 'resource_group_name', None): try: location = _get_location_from_resource_group(cli_ctx, namespace.resource_group_name) - except CloudError as err: + except HttpResponseError as err: from argcomplete import warn warn('Warning: {}'.format(err.message)) if not location: From 0dc7a9d00a19096979d66085e83d7ddb2c4aea1d Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 26 Oct 2021 10:18:52 -0700 Subject: [PATCH 124/125] fix style --- src/appservice-kube/azext_appservice_kube/_create_util.py | 3 ++- src/appservice-kube/azext_appservice_kube/_utils.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/appservice-kube/azext_appservice_kube/_create_util.py b/src/appservice-kube/azext_appservice_kube/_create_util.py index f731c4c2d92..740512fd9fa 100644 --- a/src/appservice-kube/azext_appservice_kube/_create_util.py +++ b/src/appservice-kube/azext_appservice_kube/_create_util.py @@ -5,9 +5,10 @@ import os import zipfile -from azure.cli.core.azclierror import ValidationError, ArgumentUsageError from knack.log import get_logger + from azure.mgmt.web.models import SkuDescription +from azure.cli.core.azclierror import ValidationError, ArgumentUsageError from ._constants import (NETCORE_VERSION_DEFAULT, NETCORE_VERSIONS, NODE_VERSION_DEFAULT, NODE_VERSIONS, NETCORE_RUNTIME_NAME, NODE_RUNTIME_NAME, DOTNET_RUNTIME_NAME, diff --git a/src/appservice-kube/azext_appservice_kube/_utils.py b/src/appservice-kube/azext_appservice_kube/_utils.py index b0bff4ecc8b..28b98fa1a8d 100644 --- a/src/appservice-kube/azext_appservice_kube/_utils.py +++ b/src/appservice-kube/azext_appservice_kube/_utils.py @@ -28,11 +28,12 @@ def _validate_asp_sku(app_service_environment, custom_location, sku): if sku.upper() in ['I1', 'I2', 'I3', 'I1V2', 'I2V2', 'I3V2']: if not app_service_environment: - raise ValidationError("The pricing tier 'Isolated' is not allowed for this app service plan. Use this link to " - "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + raise ValidationError("The pricing tier 'Isolated' is not allowed for this app service plan. " + "Use this link to learn more: " + "https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") elif app_service_environment: raise ValidationError("Only pricing tier 'Isolated' is allowed in this app service plan. Use this link to " - "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") + "learn more: https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans") elif custom_location: # Custom Location only supports K1 if sku.upper() != 'K1': From aa2a8224d9d6e404d2b3fe1a33ef871df992b6b6 Mon Sep 17 00:00:00 2001 From: Silas Strawn Date: Tue, 26 Oct 2021 16:59:20 -0700 Subject: [PATCH 125/125] revert version and erase history --- src/appservice-kube/HISTORY.rst | 114 +------------------------------- src/appservice-kube/setup.py | 2 +- 2 files changed, 2 insertions(+), 114 deletions(-) diff --git a/src/appservice-kube/HISTORY.rst b/src/appservice-kube/HISTORY.rst index 8adb810bb68..3b56fc6da4d 100644 --- a/src/appservice-kube/HISTORY.rst +++ b/src/appservice-kube/HISTORY.rst @@ -3,119 +3,7 @@ Release History =============== -0.2.3 -++++++ -* Rewrite commands to use the CLI's SDKs - -0.2.2 -++++++ -* Fix wrong custom location being used if multiple custom locations of the same name in different RG - -0.2.1 -++++++ -* Fix AppService plan creation -* location and static ip should be optional parameters in "az kube create" - -0.2.0 -++++++ -* Requires core CLI 2.26.0 or later -* Validate extended location in "az kube create" - -0.1.21 -++++++ -* Remove vsts_cd_manager that was removed from core CLI - -0.1.20 -++++++ -* Fix regression when using main CLI validator - -0.1.19 -++++++ -* Use update and delete appsettings from core CLI -* Remove webapp up code (not in use) - -0.1.18 -++++++ -* Handle 202 response from webapp/functionapp restart (edited SDK manually) -* Pass ExtendedLocationEnvelope in webapp/functionapp/plan/kube creates (edited SDK manually) - -0.1.17 -++++++ -* az webapp scale command - -0.1.16 -++++++ -* Change k8se app sku to "K1" instead of "ANY", "ELASTICANY" - -0.1.15 -++++++ -* Clean up az kube create parameters -* Update to 2020-12-01 SDK for k8se commands (removes --force parameter for az appservice kube delete) - -0.1.14 -++++++ -* Stop using webapp list in creates - temporary fix for demo - -0.1.13 -++++++ -* az webapp/functionapp create without --plan for k8se apps -* Change ASP "kind" back to "linux,kubernetes..." and detect k8se apps in webapp/functionapp create using customlocation/plan sku - -0.1.12 -++++++ -* Allow specifying custom location by name as well, in appservice plan create -* az appservice kube create command -* Change ASP "kind" back to "K8SE", reserved to None so that "kind" is saved properly - -0.1.11 -++++++ -* Oops broke AppService plan create for non-k8se - -0.1.10 -++++++ -* Functions should not pull docker image -* Functionapp deployment source config-zip command -* AppService plan create should drop --kube-environment and --kube-sku -* Change kind to 'linux,kubernetes' - -0.1.9 -++++++ -* Fix webapp zipdeploy command -* Fix webapp config container set command - -0.1.8 -++++++ -* Remove azure-cli-core dependency - -0.1.7 -++++++ -* Update kube environments SDK -* Delete old parameters no longer in API - -0.1.6 -++++++ -* Update SDK to fix appservice kube delete command - -0.1.5 -++++++ -* Fix webapp show command - -0.1.4 -++++++ -* Fix for including getfunctionsjson.sh in the extension package - -0.1.3 -++++++ -* Add bring your own AKS cluster support - -0.1.2 -++++++ -* Retrieve function triggers for kube function apps - -0.1.1 -++++++ -* Add az webapp up support 0.1.0 ++++++ -* Initial release. \ No newline at end of file +* Initial public preview release. diff --git a/src/appservice-kube/setup.py b/src/appservice-kube/setup.py index ac9eb096831..b857d57665d 100644 --- a/src/appservice-kube/setup.py +++ b/src/appservice-kube/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.2.3' +VERSION = '0.1.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers